博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
VUE-CLI 设置页面title
阅读量:7258 次
发布时间:2019-06-29

本文共 514 字,大约阅读时间需要 1 分钟。

 

router > index.js

{            path: '/worklist',            name: 'worklist',            component: worklist,            meta: {title:'维修工列表',keyword:'success-list',description:'维修工列表'},        },

 

main.js

router.beforeEach((to, from, next) => {  /* 路由发生变化修改页面title */  if (to.meta.title) {    document.title = to.meta.title  }  next()})

 

router.
beforeEach((
to,
from,
next)
=> {
/* 路由发生变化修改页面title */
if (to.meta.title) {
document.title
= to.meta.title
}
next()
})

转载于:https://www.cnblogs.com/hzx-5/p/9761921.html

你可能感兴趣的文章
解决 'chromedriver' executable needs to be in PATH.'报错
查看>>
构建之法
查看>>
找到当前mysql group replication 环境的primary结点
查看>>
Fibonacci
查看>>
12.4.1 压缩索引
查看>>
springmvc图片上传(兼容ie8以上,实时预览)
查看>>
联想G510安装win7系统
查看>>
@P0或@P1附近有语法错误
查看>>
rpm 与压缩解压缩
查看>>
CSS扩展技术-less
查看>>
组合数学的卡特兰数 TOJ 3551: Game of Connections
查看>>
易宝典文章——用ISA 2006标准版发布Exchange 2010的OWA系列之外网客户端
查看>>
SCCM 2012系列4 配置SCCM2012 Endpoint Protection上
查看>>
分享做老师的幸福
查看>>
动软发布微信营销服务系统,微信商城系统!
查看>>
艺术是什么?不懂很难泡到妞!
查看>>
Open-E DSS V7 应用系列之三 Web管理简介
查看>>
phpunit 单元测试案例--签到任务
查看>>
python与shell校验IP地址合法性
查看>>
大话测试之BT思维
查看>>