vue.js - How to change the favicon dynamically in VueJs
问题描述
I would like to do this very common trick that is to be able to change the favicon of my VueJs app dynamically.
For example : I have a timer in my app that is running in background and I would like to change the favicon when the timer is running.
In VueJs since the favicon is set in the index.html file I really don't know how could I do to be able to modify it in others component of my app. ?
I tried this approach but it did not work
Thanks for your help
解决方案
这会有所帮助,它是 Vue 2 和 3 的实用工具 库。VueUse useFavicon
推荐阅读
- powershell - 用于检索第二个模式值的 Powershell 命令
- ios - 有时会出现错误,否则工作正常,如何确保消除错误?
- java - 访问由已实现接口引用的枚举的注释
- swiftui - SwiftUI 获取某些视图的 EnvironmentValues,仅给出对视图的引用
- scala - 仅为类标记参数实现函子映射
- elasticsearch - elasticsearch6.4.3中如何设置集群重启优雅并控制分片分配方式
- png - 如何调整PNG文件的大小?
- javascript - 如何从数组中的数组的第一个元素创建新数组
- python - ldap3 连接绑定后返回错误代码
- postgresql - 当“检查 X Min”标志设置为真时,为什么不使用索引?