基于vue-element-damin项目开发,想要改变浏览器的标头与图标。
图标:public文件夹下的index.hhtml文件
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>logo1.png">
<title>
<%= webpackConfig.name %>
</title>
</head>
修改头部信息的 link链接,修改后面的图片名就可以了
标头:
vue.config.js文件,修改配置name
const name = defaultSettings.title || '你需要的名’
在html文件中的title中webpackConfig.name就是这个,定义为当前的页面名或者你需要的名称,如果不要可以把defaultSettings.title删掉。