修改标题和做菜单

This commit is contained in:
spllzh
2025-08-09 20:57:16 +08:00
parent 4c18a3f47b
commit b62c9209e0
4 changed files with 10 additions and 10 deletions

View File

@@ -33,7 +33,7 @@ export default {
const first = matched[0] const first = matched[0]
if (!this.isDashboard(first)) { if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched) matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched)
} }
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)

View File

@@ -26,9 +26,9 @@ import Layout from '@/layout'
*/ */
/** /**
* constantRoutes *
* a base page that does not have permission requirements 静态路由constantRoutes 菜单内容是前端写死
* all roles can be accessed 动态路由: 菜单内容是动态获取
*/ */
export const constantRoutes = [ export const constantRoutes = [
{ {
@@ -51,7 +51,7 @@ export const constantRoutes = [
path: 'dashboard', path: 'dashboard',
name: 'Dashboard', name: 'Dashboard',
component: () => import('@/views/dashboard/index'), component: () => import('@/views/dashboard/index'),
meta: { title: 'Dashboard', icon: 'dashboard' } meta: { title: '首页', icon: 'dashboard' }
}] }]
}, },
@@ -60,19 +60,19 @@ export const constantRoutes = [
component: Layout, component: Layout,
redirect: '/example/table', redirect: '/example/table',
name: 'Example', name: 'Example',
meta: { title: 'Example', icon: 'el-icon-s-help' }, meta: { title: '案例', icon: 'el-icon-s-help' },
children: [ children: [
{ {
path: 'table', path: 'table',
name: 'Table', name: 'Table',
component: () => import('@/views/table/index'), component: () => import('@/views/table/index'),
meta: { title: 'Table', icon: 'table' } meta: { title: '表格', icon: 'table' }
}, },
{ {
path: 'tree', path: 'tree',
name: 'Tree', name: 'Tree',
component: () => import('@/views/tree/index'), component: () => import('@/views/tree/index'),
meta: { title: 'Tree', icon: 'tree' } meta: { title: '树状表格', icon: 'el-icon-share' }
} }
] ]
}, },

View File

@@ -1,6 +1,6 @@
module.exports = { module.exports = {
title: 'Vue Admin Template', title: '荣景AI智能平台',
/** /**
* @type {boolean} true | false * @type {boolean} true | false

View File

@@ -4,7 +4,7 @@ const title = defaultSettings.title || 'Vue Admin Template'
export default function getPageTitle(pageTitle) { export default function getPageTitle(pageTitle) {
if (pageTitle) { if (pageTitle) {
return `${pageTitle} - ${title}` return ` ${title}-${pageTitle}`
} }
return `${title}` return `${title}`
} }