index.vue 974 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <div class="layout-navbars-container">
  3. <BreadcrumbIndex />
  4. <TagsView v-if="setShowTagsView" />
  5. </div>
  6. </template>
  7. <script setup lang="ts" name="layoutNavBars">
  8. import { defineAsyncComponent, computed } from 'vue';
  9. import { storeToRefs } from 'pinia';
  10. import { useThemeConfig } from '/@/stores/themeConfig';
  11. // 引入组件
  12. const BreadcrumbIndex = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/index.vue'));
  13. const TagsView = defineAsyncComponent(() => import('/@/layout/navBars/tagsView/tagsView.vue'));
  14. // 定义变量内容
  15. const storesThemeConfig = useThemeConfig();
  16. const { themeConfig } = storeToRefs(storesThemeConfig);
  17. // 是否显示 tagsView
  18. const setShowTagsView = computed(() => {
  19. let { layout, isTagsview } = themeConfig.value;
  20. return layout !== 'classic' && isTagsview;
  21. });
  22. </script>
  23. <style scoped lang="scss">
  24. .layout-navbars-container {
  25. display: flex;
  26. flex-direction: column;
  27. width: 100%;
  28. height: 100%;
  29. }
  30. </style>