refactor(project): business changed its name to effects, and universal-ui changed its name to common-ui

This commit is contained in:
vben
2024-07-13 17:25:15 +08:00
parent 5e0b01c725
commit 7eff46d80c
186 changed files with 110 additions and 107 deletions

View File

@@ -0,0 +1,45 @@
<script lang="ts" setup>
import { useRoute } from 'vue-router';
import { preferences } from '@vben-core/preferences';
import { useCoreTabbarStore } from '@vben-core/stores';
import { TabsView } from '@vben-core/tabs-ui';
import { useTabs } from './use-tabs';
defineOptions({
name: 'LayoutTabbar',
});
defineProps<{ showIcon?: boolean }>();
const route = useRoute();
const coreTabbarStore = useCoreTabbarStore();
const {
createContextMenus,
currentActive,
currentTabs,
handleClick,
handleClose,
handleUnpinTab,
} = useTabs();
// 刷新后如果不保持tab状态关闭其他tab
if (!preferences.tabbar.persist) {
coreTabbarStore.closeOtherTabs(route);
}
</script>
<template>
<TabsView
:active="currentActive"
:menus="createContextMenus"
:show-icon="showIcon"
:tabs="currentTabs"
@close="handleClose"
@unpin-tab="handleUnpinTab"
@update:active="handleClick"
/>
</template>