mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 22:41:06 +08:00
Merge pull request #12825 from dataease/pr@dev-v2@fix_web_icon
fix: 浏览器tab页中网站icon无效
This commit is contained in:
@@ -241,6 +241,7 @@ export const useAppearanceStore = defineStore('appearanceStore', {
|
||||
if (!resData?.length) {
|
||||
if (!isDataEaseBi) {
|
||||
document.title = 'DataEase'
|
||||
setLinkIcon()
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -258,6 +259,7 @@ export const useAppearanceStore = defineStore('appearanceStore', {
|
||||
this.showDemoTips = data.showDemoTips
|
||||
this.demoTipsContent = data.demoTipsContent
|
||||
this.loaded = true
|
||||
setLinkIcon()
|
||||
return
|
||||
}
|
||||
this.navigate = data.navigate
|
||||
@@ -319,18 +321,22 @@ export const useAppearanceStore = defineStore('appearanceStore', {
|
||||
document.title = 'DataEase'
|
||||
setTitle('DataEase')
|
||||
}
|
||||
const link = document.querySelector('link[rel="icon"]')
|
||||
if (link) {
|
||||
if (this.web) {
|
||||
link['href'] = baseUrl + this.web
|
||||
} else {
|
||||
link['href'] = '/dataease.svg'
|
||||
}
|
||||
}
|
||||
setLinkIcon(this.web)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const setLinkIcon = (linkWeb?: string) => {
|
||||
const link = document.querySelector('link[rel="icon"]')
|
||||
if (link) {
|
||||
if (linkWeb) {
|
||||
link['href'] = baseUrl + linkWeb
|
||||
} else {
|
||||
link['href'] = '/dataease.svg'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const useAppearanceStoreWithOut = () => {
|
||||
return useAppearanceStore(store)
|
||||
}
|
||||
|
||||
2
de-xpack
2
de-xpack
Submodule de-xpack updated: 5c725cace2...345818bea9
Reference in New Issue
Block a user