style:导航菜单样式调整

main
黄伟杰 1 day ago
parent 38ea323e3d
commit 8ac3637580

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, onMounted, ref, unref, watch } from 'vue'
import { computed } from 'vue'
import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign'
import { brandingLogoConfig } from '@/config/brandingLogo'
@ -12,49 +12,7 @@ const prefixCls = getPrefixCls('logo')
const appStore = useAppStore()
const show = ref(true)
const title = computed(() => appStore.getTitle)
const layout = computed(() => appStore.getLayout)
const collapse = computed(() => appStore.getCollapse)
onMounted(() => {
if (unref(collapse)) show.value = false
})
watch(
() => collapse.value,
(collapse: boolean) => {
if (unref(layout) === 'topLeft' || unref(layout) === 'cutMenu') {
show.value = true
return
}
if (!collapse) {
setTimeout(() => {
show.value = !collapse
}, 400)
} else {
show.value = !collapse
}
}
)
watch(
() => layout.value,
(layout) => {
if (layout === 'top' || layout === 'cutMenu') {
show.value = true
} else {
if (unref(collapse)) {
show.value = false
} else {
show.value = true
}
}
}
)
</script>
<template>
@ -76,19 +34,6 @@ watch(
:src="brandingLogoConfig.webHeaderLogo"
class="ml-6px h-[calc(var(--logo-height)-10px)] w-[calc(var(--logo-height)-10px)] object-contain"
/>
<div
v-if="show"
:class="[
'ml-10px text-14px font-700',
{
'text-[var(--logo-title-text-color)]': layout === 'classic',
'text-[var(--top-header-text-color)]':
layout === 'topLeft' || layout === 'top' || layout === 'cutMenu'
}
]"
>
{{ title }}
</div>
</router-link>
</div>
</template>

Loading…
Cancel
Save