mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: 外观设置
This commit is contained in:
parent
7a9d8bf96d
commit
ffc896666f
|
|
@ -20,11 +20,11 @@ defineOptions({ name: 'LoginLayout' })
|
|||
const { user } = useStore()
|
||||
|
||||
const fileURL = computed(() => {
|
||||
if (user.themeInfo.loginImage) {
|
||||
if (typeof user.themeInfo.loginImage === 'string') {
|
||||
return user.themeInfo.loginImage
|
||||
if (user.themeInfo?.loginImage) {
|
||||
if (typeof user.themeInfo?.loginImage === 'string') {
|
||||
return user.themeInfo?.loginImage
|
||||
} else {
|
||||
return URL.createObjectURL(user.themeInfo.loginImage)
|
||||
return URL.createObjectURL(user.themeInfo?.loginImage)
|
||||
}
|
||||
} else {
|
||||
return ''
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<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>
|
||||
<svg
|
||||
v-if="!isDefaultTheme"
|
||||
|
|
@ -75,11 +75,11 @@ const isDefaultTheme = computed(() => {
|
|||
})
|
||||
|
||||
const fileURL = computed(() => {
|
||||
if (user.themeInfo.loginLogo) {
|
||||
if (typeof user.themeInfo.loginLogo === 'string') {
|
||||
return user.themeInfo.loginLogo
|
||||
if (user.themeInfo?.loginLogo) {
|
||||
if (typeof user.themeInfo?.loginLogo === 'string') {
|
||||
return user.themeInfo?.loginLogo
|
||||
} else {
|
||||
return URL.createObjectURL(user.themeInfo.loginLogo)
|
||||
return URL.createObjectURL(user.themeInfo?.loginLogo)
|
||||
}
|
||||
} else {
|
||||
return ''
|
||||
|
|
|
|||
Loading…
Reference in New Issue