待整理
# 全局样式覆盖
如何更优雅地覆盖组件库样式? (opens new window) 聊聊样式穿透 vue 中的 scoped (opens new window)
.html页面缓存问题 (opens new window)
onActivated(() => {
console.log('onActivated')
})
meta: { keepAlive: true },
1
2
3
4
5
2
3
4
5
https://developer.mozilla.org/zh-CN/docs/Web/API/Document/visibilityState
const activated = () => {
if (document.visibilityState === 'visible') {
option1.value[0].text = getLocalStorage('defaultPark').name
}
}
onMounted(() => {
getInfo()
getNews()
document.addEventListener('visibilitychange', activated)
})
onUnmounted(() => {
document.removeEventListener('visibilitychange', activated)
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 树结构,子查父
# js获取图片大小
编辑 (opens new window)
上次更新: 2022/11/02