This commit is contained in:
sjl
2025-12-30 10:02:01 +08:00
parent 83e57c92b4
commit 0fc7b528d4
14 changed files with 186 additions and 114 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="layout-logo">
<img v-if="!config.layout.menuCollapse" class="logo-img" :src="getTheme.logoUrl" />
<img v-if="!config.layout.menuCollapse && getTheme && getTheme.logoUrl" class="logo-img" :src="getTheme.logoUrl" />
<!-- <div-->
<!-- v-if="!config.layout.menuCollapse"-->
<!-- :style="{ color: config.getColorVal('menuActiveColor') }"-->
@@ -28,7 +28,9 @@ import { Session } from '@/utils/storage'
import { setNavTabsWidth } from '@/utils/layout'
const config = useConfig()
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
const getTheme = window.localStorage.getItem('getTheme')
? JSON.parse(window.localStorage.getItem('getTheme') as string)
: null
const onMenuCollapse = function () {
if (config.layout.shrink && !config.layout.menuCollapse) {
closeShade()

View File

@@ -9,7 +9,7 @@
/>
</div>
<span class="nav-bar-title">
{{ getTheme.name }}
{{ getTheme?.name || '' }}
<span style="font-size: 14px">({{ Version || 'v1.0.0' }})</span>
<!-- <span style="font-size: 14px;" v-if="Version?.versionName">
({{ Version?.versionName }})
@@ -28,7 +28,9 @@ import { getLastData } from '@/api/systerm'
const Version: any = ref(null)
const config = useConfig()
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
const getTheme = window.localStorage.getItem('getTheme')
? JSON.parse(window.localStorage.getItem('getTheme') as string)
: { name: '' }
const VITE_FLAG = import.meta.env.VITE_NAME == 'hainan'
const onMenuCollapse = () => {
showShade('ba-aside-menu-shade', () => {
@@ -43,7 +45,7 @@ onMounted(() => {
})
}
document.title = getTheme.name
document.title = getTheme?.name || ''
})
</script>