Browse Source

title优化

pull/3/head
wangxy 3 years ago
parent
commit
f35389fd2c
3 changed files with 12 additions and 0 deletions
  1. BIN
      public/favicon.ico
  2. +6
    -0
      src/router/index.js
  3. +6
    -0
      src/router/routers.js

BIN
public/favicon.ico View File

Before After
Width: 129  |  Height: 129  |  Size: 3.5 KiB

+ 6
- 0
src/router/index.js View File

@ -27,4 +27,10 @@ const router = createRouter({
routes, routes,
}); });
const defaultTitle = 'ETL列表';
router.beforeEach((to, from, next) => {
document.title = to.meta.title ? to.meta.title : defaultTitle;
next();
});
export default router; export default router;

+ 6
- 0
src/router/routers.js View File

@ -4,6 +4,7 @@ const routes = [
path: "/etl", path: "/etl",
name: "etl", name: "etl",
title: "ETL列表", title: "ETL列表",
meta: { title: 'ETL列表' },
component: () => import("../views/etl"), component: () => import("../views/etl"),
}, },
{ {
@ -11,6 +12,7 @@ const routes = [
path: "/record", path: "/record",
name: "record", name: "record",
title: "ETL记录", title: "ETL记录",
meta: { title: 'ETL记录' },
component: () => import("../views/record"), component: () => import("../views/record"),
}, },
{ {
@ -18,6 +20,7 @@ const routes = [
path: "/etlDB", path: "/etlDB",
name: "etlDB", name: "etlDB",
title: "ETL数据库", title: "ETL数据库",
meta: { title: 'ETL数据库' },
component: () => import("../views/etlDB"), component: () => import("../views/etlDB"),
}, },
{ {
@ -25,6 +28,7 @@ const routes = [
path: "/standard", path: "/standard",
name: "standard", name: "standard",
title: "标准定义", title: "标准定义",
meta: { title: '标准定义' },
component: () => import("../views/standard"), component: () => import("../views/standard"),
}, },
{ {
@ -32,6 +36,7 @@ const routes = [
path: "/field", path: "/field",
name: "field", name: "field",
title: "字段列表", title: "字段列表",
meta: { title: '字段列表' },
component: () => import("../views/field"), component: () => import("../views/field"),
}, },
{ {
@ -39,6 +44,7 @@ const routes = [
path: "/oneimport", path: "/oneimport",
name: "oneimport", name: "oneimport",
title: "一维表导入", title: "一维表导入",
meta: { title: '一维表导入' },
component: () => import("../views/oneimport"), component: () => import("../views/oneimport"),
}, },
]; ];


Loading…
Cancel
Save