提交 a5bea1fc 编写于 作者: 檀越@新空间's avatar 檀越@新空间 🐭

整理

上级 90e411b5
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/kwan.png"><title>kwan66</title><link href="/css/app.90eacce6.css" rel="preload" as="style"><link href="/css/chunk-vendors.bedbfba9.css" rel="preload" as="style"><link href="/js/app.43ffce99.js" rel="preload" as="script"><link href="/js/chunk-vendors.8385d186.js" rel="preload" as="script"><link href="/css/chunk-vendors.bedbfba9.css" rel="stylesheet"><link href="/css/app.90eacce6.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan66 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.8385d186.js"></script><script src="/js/app.43ffce99.js"></script></body></html> <!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/kwan.png"><title>kwan</title><link href="/css/app.90eacce6.css" rel="preload" as="style"><link href="/css/chunk-vendors.bedbfba9.css" rel="preload" as="style"><link href="/js/app.62350d76.js" rel="preload" as="script"><link href="/js/chunk-vendors.8385d186.js" rel="preload" as="script"><link href="/css/chunk-vendors.bedbfba9.css" rel="stylesheet"><link href="/css/app.90eacce6.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.8385d186.js"></script><script src="/js/app.62350d76.js"></script></body></html>
\ No newline at end of file \ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
{ {
"name": "kwan66", "name": "kwan",
"version": "0.1.0", "description": "kwan的解忧杂货铺",
"private": true, "version": "0.1.0",
"scripts": { "private": true,
"serve": "vue-cli-service serve --port 3001", "scripts": {
"build": "vue-cli-service build" "serve": "vue-cli-service serve --port 3001",
}, "build": "vue-cli-service build"
"dependencies": { },
"axios": "^1.4.0", "dependencies": {
"clipboard": "^2.0.11", "axios": "^1.4.0",
"core-js": "^3.6.5", "clipboard": "^2.0.11",
"dayjs": "^1.11.9", "core-js": "^3.6.5",
"element-ui": "^2.15.13", "dayjs": "^1.11.9",
"vue": "^2.6.11", "element-ui": "^2.15.13",
"vue-router": "^3.5.2" "vue": "^2.6.11",
}, "vue-router": "^3.5.2"
"devDependencies": { },
"@vue/cli-plugin-babel": "~4.5.0", "devDependencies": {
"@vue/cli-service": "~4.5.0", "@vue/cli-plugin-babel": "~4.5.0",
"less": "^3.0.4", "@vue/cli-service": "~4.5.0",
"less-loader": "^5.0.0", "less": "^3.0.4",
"prettier": "^3.0.0", "less-loader": "^5.0.0",
"vue-template-compiler": "^2.6.11" "prettier": "^3.0.0",
} "vue-template-compiler": "^2.6.11"
}
} }
...@@ -25,6 +25,14 @@ Vue.filter("dateFormat", function (time) { ...@@ -25,6 +25,14 @@ Vue.filter("dateFormat", function (time) {
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.config.productionTip = false Vue.config.productionTip = false
// 在路由导航前设置页面标题
router.beforeEach((to, from, next) => {
if (to.meta.title) {
document.title = to.meta.title;
}
next();
});
new Vue({ new Vue({
render: h => h(App), render: h => h(App),
router router
......
...@@ -28,7 +28,10 @@ const router = new VueRouter({ ...@@ -28,7 +28,10 @@ const router = new VueRouter({
// 登录的路由规则 // 登录的路由规则
{ {
path: '/login', path: '/login',
component: Login component: Login,
meta: {
title: '登录' // 设置默认标题
}
}, },
// 后台主页的路由规则 // 后台主页的路由规则
{ {
...@@ -38,40 +41,65 @@ const router = new VueRouter({ ...@@ -38,40 +41,65 @@ const router = new VueRouter({
children: [ children: [
{ {
path: 'interview', path: 'interview',
component: Interview component: Interview,
meta: {
title: '面试题' // 设置默认标题
}
}, },
{ {
path: 'algorithmic', path: 'algorithmic',
component: Algorithmic component: Algorithmic,
meta: {
title: '算法题' // 设置默认标题
}
}, },
{ {
path: 'aphorismpoetry', path: 'aphorismpoetry',
component: AphorismPoetry component: AphorismPoetry,
meta: {
title: '名言警句' // 设置默认标题
}
}, },
{ {
path: 'chat', path: 'chat',
component: Chat component: Chat,
}, meta: {
{ title: 'chatgpt记录' // 设置默认标题
}
}, {
path: 'pic', path: 'pic',
component: Pic component: Pic,
}, meta: {
{ title: '图片' // 设置默认标题
}
}, {
path: 'users', path: 'users',
component: Users component: Users,
}, meta: {
title: '用户管理' // 设置默认标题
}
},
// 用户详情页的路由规则 // 用户详情页的路由规则
{ {
path: 'userinfo/:id', path: 'userinfo/:id',
component: UserDetail, component: UserDetail,
props: true props: true,
meta: {
title: '用户信息' // 设置默认标题
}
}, { }, {
path: 'chatinfo/:id', path: 'chatinfo/:id',
component: MyChatDetail, component: MyChatDetail,
props: true props: true,
meta: {
title: 'chat信息' // 设置默认标题
}
}, { }, {
path: 'addChat', path: 'addChat',
component: AddChatDetail component: AddChatDetail,
meta: {
title: '添加chat信息' // 设置默认标题
}
}, },
] ]
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册