hanshang
hanshang
  • 发布:2021-05-12 07:33
  • 更新:2021-08-14 17:58
  • 阅读:927

favicon不显示

分类:uni-app

uni-app自定义index.html

添加

<link rel="shortcut icon" href="<%= BASE_URL %>favicon.ico" type="image/x-icon">

开发时可显示favicon
生产上传至前端网页托管后,项目可正常显示和操作,只是不显示favicon

后尝试

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">

均不显示

访问文件,显示

Whitelabel Error Page  
This application has no explicit mapping for /error, so you are seeing this as a fallback.  

Wed May 12 07:07:56 CST 2021  
There was an unexpected error (type=Not Found, status=404).  
No message available

请问是需要额外配置还是哪里出了问题?

2021-05-12 07:33 负责人:无 分享
已邀请:
f***@163.com

f***@163.com

同样的问题。。

DuD

DuD - 任何不快乐的时光都是浪费。——Any unhappy is a waste of time.

可以在打包好的文件根目录添加favicon.ico图标

Zsan

Zsan

前端网页托管的域名好像不能显示.ico文件,换成png就可以啦

该问题目前已经被锁定, 无法添加新回复