马宇豪
2023-08-07 7ed4982b8f2a345bfad95a96070143c32142bc61
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<template>
    <div class="layout-navbars-container">
        <BreadcrumbIndex />
        <TagsView v-if="setShowTagsView" />
    </div>
</template>
 
<script lang="ts">
import { computed, defineComponent } from 'vue';
import { storeToRefs } from 'pinia';
import { useThemeConfig } from '/@/stores/themeConfig';
import BreadcrumbIndex from '/@/layout/navBars/breadcrumb/index.vue';
import TagsView from '/@/layout/navBars/tagsView/tagsView.vue';
 
export default defineComponent({
    name: 'layoutNavBars',
    components: { BreadcrumbIndex, TagsView },
    setup() {
        const storesThemeConfig = useThemeConfig();
        const { themeConfig } = storeToRefs(storesThemeConfig);
        // 是否显示 tagsView
        const setShowTagsView = computed(() => {
            let { layout, isTagsview } = themeConfig.value;
            return layout !== 'classic' && isTagsview;
        });
        return {
            setShowTagsView,
        };
    },
});
</script>
 
<style scoped lang="scss">
.layout-navbars-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
</style>