diff --git a/modules/Develop/views/router.ts b/modules/Develop/views/router.ts index 298af17..ea30fb9 100644 --- a/modules/Develop/views/router.ts +++ b/modules/Develop/views/router.ts @@ -5,18 +5,18 @@ const router: RouteRecordRaw[] = [ { path: '/develop', component: () => import('/admin/layout/index.vue'), - meta: { title: '开发工具', icon: 'wrench-screwdriver', hidden: false }, + meta: { title: '开发工具', icon: 'wrench-screwdriver' }, children: [ { path: 'modules', name: 'modules', - meta: { title: '模块管理', icon: 'home', hidden: false }, + meta: { title: '模块管理', icon: 'queue-list' }, component: () => import('./module/index.vue'), }, { path: 'schemas', name: 'schemas', - meta: { title: 'Schemas', icon: 'home', hidden: false }, + meta: { title: 'Schemas', icon: 'list-bullet' }, component: () => import('./schema/index.vue'), }, { diff --git a/modules/Develop/views/schema/create.vue b/modules/Develop/views/schema/create.vue index 705249a..6c91342 100644 --- a/modules/Develop/views/schema/create.vue +++ b/modules/Develop/views/schema/create.vue @@ -18,7 +18,6 @@ const next = () => { active.value = 2 } } -console.log(123) const prev = () => { if (active.value-- === 1) { active.value = 1 diff --git a/modules/User/views/router.ts b/modules/User/views/router.ts index a563712..876d4ea 100644 --- a/modules/User/views/router.ts +++ b/modules/User/views/router.ts @@ -9,13 +9,13 @@ const router: RouteRecordRaw[] = [ children: [ { path: 'index', - name: 'users', + name: 'user-account', meta: { title: '账号管理', icon: 'home' }, component: () => import('./user/index.vue'), }, { path: 'center', - name: 'center', + name: 'user-center', meta: { title: '个人中心', icon: 'home' }, component: () => import('./user/center.vue'), }, diff --git a/resources/admin/components/breadcrumbs/index.vue b/resources/admin/components/breadcrumbs/index.vue index 174a6a8..2e7851e 100644 --- a/resources/admin/components/breadcrumbs/index.vue +++ b/resources/admin/components/breadcrumbs/index.vue @@ -23,23 +23,27 @@ watch(router.currentRoute, (newValue, oldValue) => { if (newValue.meta.active_menu) { appStore.setActiveMenu(newValue.meta.active_menu) } + setActiveMenu(newValue) getBreadcrumbs(newValue) }) // get init breadcrumb onMounted(() => { - if (router.currentRoute.value.path !== '/') { - // 如果是内页,并且设置激活菜单 - if (router.currentRoute.value.meta.active_menu) { - appStore.setActiveMenu(router.currentRoute.value.meta.active_menu) - } else { - appStore.setActiveMenu(router.currentRoute.value.path) - } - } - + setActiveMenu(router.currentRoute.value) getBreadcrumbs(router.currentRoute.value) }) +const setActiveMenu = route => { + if (route.path !== '/') { + // 如果是内页,并且设置激活菜单 + if (route.meta.active_menu) { + appStore.setActiveMenu(route.meta.active_menu) + } else { + appStore.setActiveMenu(route.path) + } + } +} + // get breadcrums function getBreadcrumbs(newRoute: RouteLocationNormalizedLoaded) { breadcrumbs.value = [] diff --git a/resources/admin/components/editor/index.vue b/resources/admin/components/editor/index.vue index 564e30a..d991667 100644 --- a/resources/admin/components/editor/index.vue +++ b/resources/admin/components/editor/index.vue @@ -63,7 +63,6 @@ const uploaded = (blobInfo, progress) => params.append('image', blobInfo.blob()) Http.post(env('VITE_BASE_URL') + 'upload/image', params) .then(res => { - console.log(res) if (res.data.code === 10000) { resolve(res.data.data.path) } else { diff --git a/resources/admin/layout/components/header/profile.vue b/resources/admin/layout/components/header/profile.vue index 1529e46..ac30cc1 100644 --- a/resources/admin/layout/components/header/profile.vue +++ b/resources/admin/layout/components/header/profile.vue @@ -7,9 +7,7 @@