forked from github/dataease
fix: 浏览器tab页中网站icon无效
This commit is contained in:
parent
c4a082e4da
commit
af32627ada
@ -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
@ -1 +1 @@
|
||||
Subproject commit 5c725cace2794fe5c8be59f1a299b0650e2dfa82
|
||||
Subproject commit 345818bea9a59d5741a0b6ff272ad0adaddce18f
|
Loading…
Reference in New Issue
Block a user