diff --git a/src/components/common-menu/index.vue b/src/components/common-menu/index.vue index e5a44d9..6e7db03 100644 --- a/src/components/common-menu/index.vue +++ b/src/components/common-menu/index.vue @@ -1,6 +1,7 @@ diff --git a/src/components/common-tabs-view/tabs-view-item.vue b/src/components/common-tabs-view/tabs-view-item.vue index 2131ca9..05523bc 100644 --- a/src/components/common-tabs-view/tabs-view-item.vue +++ b/src/components/common-tabs-view/tabs-view-item.vue @@ -1,6 +1,9 @@ diff --git a/src/components/utils/index.js b/src/components/utils/index.js index ae1fb3f..c2283d2 100644 --- a/src/components/utils/index.js +++ b/src/components/utils/index.js @@ -12,14 +12,17 @@ const calcWithIf = menuItem => { export const MENU_INFO_LIST = ref({}) -export const useMenuInfo = path => { - const menuInfo = MENU_INFO_LIST.value[path] - console.info('================', MENU_INFO_LIST.value) - return menuInfo +export const useMenuInfo = item => { + const path = item.path + if (path !== '/') { + const menuInfo = MENU_INFO_LIST.value[path] + console.info('config menu:', menuInfo) + return menuInfo + } } export const useMenuName = item => { - const menuInfo = useMenuInfo(item.path) + const menuInfo = useMenuInfo(item) if (menuInfo) { if (menuInfo.label) { return menuInfo.label diff --git a/src/route/routes.js b/src/route/routes.js index b4a5db4..58328df 100644 --- a/src/route/routes.js +++ b/src/route/routes.js @@ -11,6 +11,13 @@ const router = createRouter({ name: 'home', component: HomeView, children: [{ + path: '', + name: 'index', + component: () => import('@/views/Index.vue'), + meta: { + labelKey: 'common.label.index' + } + }, { path: 'about', name: 'about', component: () => import('@/views/account/AboutView.vue') diff --git a/src/services/global/GlobalService.js b/src/services/global/GlobalService.js index 7803200..d8ec36f 100644 --- a/src/services/global/GlobalService.js +++ b/src/services/global/GlobalService.js @@ -76,6 +76,7 @@ export const useBusinessMenus = () => { return ref([ { icon: 'HomeFilled', + index: '/', labelIf: () => $i18nBundle('common.label.title') }, { @@ -105,7 +106,7 @@ export const useBusinessMenus = () => { ] }, { - icon: 'BuildRound', + icon: 'BuildFilled', labelKey: 'menu.label.toolsManagement', children: [ { @@ -120,7 +121,7 @@ export const useBusinessMenus = () => { }, { index: '/forms', - icon: 'TableRowsTwotone', + icon: 'TableRowsFilled', labelKey: 'menu.label.toolsForms' }, { diff --git a/src/stores/TabsViewStore.js b/src/stores/TabsViewStore.js index 79f0258..0c65ff1 100644 --- a/src/stores/TabsViewStore.js +++ b/src/stores/TabsViewStore.js @@ -4,6 +4,7 @@ import { defineStore } from 'pinia' export const useTabsViewStore = defineStore('tabsView', () => { const isTabMode = ref(true) const isCachedTabMode = ref(true) + const isShowTabIcon = ref(true) const historyTabs = ref([]) const cachedTabs = ref([]) @@ -61,6 +62,7 @@ export const useTabsViewStore = defineStore('tabsView', () => { return { isTabMode, isCachedTabMode, + isShowTabIcon, historyTabs, cachedTabs, changeTabMode () { @@ -75,6 +77,9 @@ export const useTabsViewStore = defineStore('tabsView', () => { cachedTabs.value = [] } }, + changeShowTabIcon () { + isShowTabIcon.value = !isShowTabIcon.value + }, removeHistoryTab, clearHistoryTabs, findHistoryTab, diff --git a/src/views/Index.vue b/src/views/Index.vue new file mode 100644 index 0000000..b3eecd5 --- /dev/null +++ b/src/views/Index.vue @@ -0,0 +1,13 @@ + + + + +