Vue前端开发中页面标题的动态变化和设置Title

1:index.html中一般设置了

   <title><%= htmlWebpackPlugin.options.title %></title>

 

2:不同的Vue页面中,mounted(){}函数中增加标题设置

 

  mounted(){
    document.title = "公司档案信息";
  }

 

posted @ 2021-12-21 14:56  KP陈  阅读(481)  评论(0编辑  收藏  举报