修改Vue网页标题和图标文档
修改图标
1.找到public文件夹
与src文件同级的文件夹
2.在这个文件夹中找到favicon.ico(这就是页面标题图标文件)
3.把需要修改的文件放到这里面
注意!!!,这里需要时ico文件,可以去网上搜一下转ico文件的在线工具(例如 jpg转ico等)
4.在public文件夹中找到index.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.0">
<link rel="icon" href="<%= BASE_URL %>agszv-hpysl-001.ico">把这里的ico文件名字换成自己需要的ico文件的名字就可以了
<title></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
修改标题
这里也是在public文件夹中找到index.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.0">
<link rel="icon" href="<%= BASE_URL %>agszv-hpysl-001.ico">
<title>把这里改成需要修改的标题即可</title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
!-- built files will be auto injected -->
</body>
</html>
大家也可以关注我的个人博客两边是同步的哦~