feat(utils): Add color utils
This commit is contained in:
@@ -1,16 +1,43 @@
|
||||
<script setup lang="ts">
|
||||
// import { computed } from 'vue'
|
||||
// const getCaches = computed((): string[] => {
|
||||
// return []
|
||||
// })
|
||||
</script>
|
||||
<script lang="tsx">
|
||||
import { computed, defineComponent, KeepAlive } from 'vue'
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import { Menu } from '@/components/Menu'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
|
||||
<template>
|
||||
<RouterView>
|
||||
<template #default="{ Component, route }">
|
||||
<KeepAlive>
|
||||
<Component :is="Component" :key="route.fullPath" />
|
||||
</KeepAlive>
|
||||
</template>
|
||||
</RouterView>
|
||||
</template>
|
||||
const tagsViewStore = useTagsViewStore()
|
||||
|
||||
const getCaches = computed((): string[] => {
|
||||
return tagsViewStore.getCachedViews
|
||||
})
|
||||
|
||||
const appStore = useAppStore()
|
||||
console.log(appStore)
|
||||
const classSuffix = computed(() => appStore.getLayout)
|
||||
|
||||
const { getPrefixCls } = useDesign()
|
||||
|
||||
const perFixCls = getPrefixCls('app')
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Layout',
|
||||
setup() {
|
||||
return () => (
|
||||
<section
|
||||
class={[perFixCls, `${perFixCls}__${classSuffix.value}`, 'w-[100%] h-[100%] relative']}
|
||||
>
|
||||
<Menu></Menu>
|
||||
<router-view class="absolute top-0 right-0 ">
|
||||
{{
|
||||
default: ({ Component, route }) => (
|
||||
<KeepAlive include={getCaches.value}>
|
||||
<Component is={Component} key={route.fullPath}></Component>
|
||||
</KeepAlive>
|
||||
)
|
||||
}}
|
||||
</router-view>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user