update 优化代码 统一store用法
This commit is contained in:
@ -15,8 +15,8 @@
|
||||
</template>
|
||||
|
||||
<script setup name="AppMain" lang="ts">
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import useTagsViewStore from '@/store/modules/tagsView';
|
||||
import { useSettingsStore } from '@/store/modules/settings';
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView';
|
||||
|
||||
import IframeToggle from './IframeToggle/index.vue';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<script setup lang="ts">
|
||||
import InnerLink from '../InnerLink/index.vue';
|
||||
|
||||
import useTagsViewStore from '@/store/modules/tagsView';
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView';
|
||||
|
||||
const route = useRoute();
|
||||
const tagsViewStore = useTagsViewStore();
|
||||
|
||||
@ -90,10 +90,10 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import SearchMenu from './TopBar/search.vue';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import useNoticeStore from '@/store/modules/notice';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { useSettingsStore } from '@/store/modules/settings';
|
||||
import { useNoticeStore } from '@/store/modules/notice';
|
||||
import { getTenantList } from '@/api/login';
|
||||
import { dynamicClear, dynamicTenant } from '@/api/system/tenant';
|
||||
import { TenantVO } from '@/api/types';
|
||||
|
||||
@ -89,9 +89,9 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useDynamicTitle } from '@/utils/dynamicTitle';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import usePermissionStore from '@/store/modules/permission';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useSettingsStore } from '@/store/modules/settings';
|
||||
import { usePermissionStore } from '@/store/modules/permission';
|
||||
import { handleThemeStyle } from '@/utils/theme';
|
||||
import { SideThemeEnum } from '@/enums/SideThemeEnum';
|
||||
import defaultSettings from '@/settings';
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<script setup lang="ts">
|
||||
import variables from '@/assets/styles/variables.module.scss';
|
||||
import logo from '@/assets/logo/logo.png';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import { useSettingsStore } from '@/store/modules/settings';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
defineProps({
|
||||
|
||||
@ -24,9 +24,9 @@
|
||||
import Logo from './Logo.vue';
|
||||
import SidebarItem from './SidebarItem.vue';
|
||||
import variables from '@/assets/styles/variables.module.scss';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import usePermissionStore from '@/store/modules/permission';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useSettingsStore } from '@/store/modules/settings';
|
||||
import { usePermissionStore } from '@/store/modules/permission';
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { RouteLocationNormalized } from 'vue-router';
|
||||
import useTagsViewStore from '@/store/modules/tagsView';
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView';
|
||||
|
||||
const tagAndTagSpacing = ref(4);
|
||||
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
<script setup lang="ts">
|
||||
import ScrollPane from './ScrollPane.vue';
|
||||
import { getNormalPath } from '@/utils/ruoyi';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import usePermissionStore from '@/store/modules/permission';
|
||||
import useTagsViewStore from '@/store/modules/tagsView';
|
||||
import { useSettingsStore } from '@/store/modules/settings';
|
||||
import { usePermissionStore } from '@/store/modules/permission';
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView';
|
||||
import { RouteRecordRaw, RouteLocationNormalized } from 'vue-router';
|
||||
|
||||
const visible = ref(false);
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<script setup lang="ts" name="layoutBreadcrumbSearch">
|
||||
import { getNormalPath } from '@/utils/ruoyi';
|
||||
import { isHttp } from '@/utils/validate';
|
||||
import usePermissionStore from '@/store/modules/permission';
|
||||
import { usePermissionStore } from '@/store/modules/permission';
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
type Router = Array<{
|
||||
path: string;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
<script setup lang="ts" name="layoutBreadcrumbUserNews">
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useNoticeStore from '@/store/modules/notice';
|
||||
import { useNoticeStore } from '@/store/modules/notice';
|
||||
|
||||
const noticeStore = storeToRefs(useNoticeStore());
|
||||
const { readAll } = useNoticeStore();
|
||||
|
||||
@ -24,8 +24,8 @@
|
||||
<script setup lang="ts">
|
||||
import SideBar from './components/Sidebar/index.vue';
|
||||
import { AppMain, Navbar, Settings, TagsView } from './components';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useSettingsStore } from '@/store/modules/settings';
|
||||
import { initWebSocket } from '@/utils/websocket';
|
||||
import { initSSE } from '@/utils/sse';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user