feat: 外观设置
This commit is contained in:
parent
d5ca5eeaf4
commit
2b308ba929
@ -20,11 +20,11 @@ defineOptions({ name: 'LoginLayout' })
|
|||||||
const { user } = useStore()
|
const { user } = useStore()
|
||||||
|
|
||||||
const fileURL = computed(() => {
|
const fileURL = computed(() => {
|
||||||
if (user.themeInfo.loginImage) {
|
if (user.themeInfo?.loginImage) {
|
||||||
if (typeof user.themeInfo.loginImage === 'string') {
|
if (typeof user.themeInfo?.loginImage === 'string') {
|
||||||
return user.themeInfo.loginImage
|
return user.themeInfo?.loginImage
|
||||||
} else {
|
} else {
|
||||||
return URL.createObjectURL(user.themeInfo.loginImage)
|
return URL.createObjectURL(user.themeInfo?.loginImage)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<img v-if="user.themeInfo.loginLogo" :src="fileURL" alt="" height="45px" class="mr-8" />
|
<img v-if="user.themeInfo?.loginLogo" :src="fileURL" alt="" height="45px" class="mr-8" />
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<svg
|
<svg
|
||||||
v-if="!isDefaultTheme"
|
v-if="!isDefaultTheme"
|
||||||
@ -75,11 +75,11 @@ const isDefaultTheme = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const fileURL = computed(() => {
|
const fileURL = computed(() => {
|
||||||
if (user.themeInfo.loginLogo) {
|
if (user.themeInfo?.loginLogo) {
|
||||||
if (typeof user.themeInfo.loginLogo === 'string') {
|
if (typeof user.themeInfo?.loginLogo === 'string') {
|
||||||
return user.themeInfo.loginLogo
|
return user.themeInfo?.loginLogo
|
||||||
} else {
|
} else {
|
||||||
return URL.createObjectURL(user.themeInfo.loginLogo)
|
return URL.createObjectURL(user.themeInfo?.loginLogo)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user