gpt4 book ai didi

Vue 修改网站图标的方法

转载 作者:qq735679552 更新时间:2022-09-27 22:32:09 33 4
gpt4 key购买 nike

CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.

这篇CFSDN的博客文章Vue 修改网站图标的方法由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.

1、在stateic下新增favicon.ico文件

Vue 修改网站图标的方法

2、修改index.html文件,如图

Vue 修改网站图标的方法

?
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>
< html >
  < head >
   < meta charset = "utf-8" >
   < meta name = "viewport" content = "width=device-width,initial-scale=1.0" >
   < link rel = "icon" type = "image/x-icon" href = "static/favicon.ico" rel = "external nofollow" >
   < title >网站名称</ title >
  </ head >
  < body >
   < div id = "app" ></ div >
   <!-- built files will be auto injected -->
  </ body >
</ html >

3、如果有新开页面无法显示图标问题,修改bulid下的webpack.dev.conf.js文件

Vue 修改网站图标的方法

Vue 修改网站图标的方法

?
1
2
3
4
5
6
new HtmlWebpackPlugin({
  filename: 'index.html' ,
  template: 'index.html' ,
  inject: true ,
  favicon: 'static/favicon.ico' //新增
}),

4、这个时候再重新启动一次项目就好啦

以上就是Vue 修改网站图标的方法的详细内容,更多关于Vue 修改网站图标的资料请关注我其它相关文章! 。

原文链接:https://www.cnblogs.com/xiaoxiaomini/p/13206249.html 。

最后此篇关于Vue 修改网站图标的方法的文章就讲到这里了,如果你想了解更多关于Vue 修改网站图标的方法的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com