整理

上级 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>
\ No newline at end of file
<!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
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
{
"name": "kwan66",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --port 3001",
"build": "vue-cli-service build"
},
"dependencies": {
"axios": "^1.4.0",
"clipboard": "^2.0.11",
"core-js": "^3.6.5",
"dayjs": "^1.11.9",
"element-ui": "^2.15.13",
"vue": "^2.6.11",
"vue-router": "^3.5.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"prettier": "^3.0.0",
"vue-template-compiler": "^2.6.11"
}
"name": "kwan",
"description": "kwan的解忧杂货铺",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --port 3001",
"build": "vue-cli-service build"
},
"dependencies": {
"axios": "^1.4.0",
"clipboard": "^2.0.11",
"core-js": "^3.6.5",
"dayjs": "^1.11.9",
"element-ui": "^2.15.13",
"vue": "^2.6.11",
"vue-router": "^3.5.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"prettier": "^3.0.0",
"vue-template-compiler": "^2.6.11"
}
}
......@@ -25,6 +25,14 @@ Vue.filter("dateFormat", function (time) {
Vue.use(ElementUI);
Vue.config.productionTip = false
// 在路由导航前设置页面标题
router.beforeEach((to, from, next) => {
if (to.meta.title) {
document.title = to.meta.title;
}
next();
});
new Vue({
render: h => h(App),
router
......
......@@ -28,7 +28,10 @@ const router = new VueRouter({
// 登录的路由规则
{
path: '/login',
component: Login
component: Login,
meta: {
title: '登录' // 设置默认标题
}
},
// 后台主页的路由规则
{
......@@ -38,40 +41,65 @@ const router = new VueRouter({
children: [
{
path: 'interview',
component: Interview
component: Interview,
meta: {
title: '面试题' // 设置默认标题
}
},
{
path: 'algorithmic',
component: Algorithmic
component: Algorithmic,
meta: {
title: '算法题' // 设置默认标题
}
},
{
path: 'aphorismpoetry',
component: AphorismPoetry
component: AphorismPoetry,
meta: {
title: '名言警句' // 设置默认标题
}
},
{
path: 'chat',
component: Chat
},
{
component: Chat,
meta: {
title: 'chatgpt记录' // 设置默认标题
}
}, {
path: 'pic',
component: Pic
},
{
component: Pic,
meta: {
title: '图片' // 设置默认标题
}
}, {
path: 'users',
component: Users
},
component: Users,
meta: {
title: '用户管理' // 设置默认标题
}
},
// 用户详情页的路由规则
{
path: 'userinfo/:id',
component: UserDetail,
props: true
props: true,
meta: {
title: '用户信息' // 设置默认标题
}
}, {
path: 'chatinfo/:id',
component: MyChatDetail,
props: true
props: true,
meta: {
title: 'chat信息' // 设置默认标题
}
}, {
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.
先完成此消息的编辑!
想要评论请 注册