2024-05-19 21:20:42 +08:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { TabsView } from '@vben-core/tabs-ui';
|
|
|
|
|
|
|
|
import { useTabs } from './use-tabs';
|
|
|
|
|
|
|
|
defineOptions({
|
|
|
|
name: 'LayoutTabs',
|
|
|
|
});
|
|
|
|
|
|
|
|
defineProps<{ showIcon?: boolean }>();
|
|
|
|
|
|
|
|
const {
|
|
|
|
createContextMenus,
|
|
|
|
currentActive,
|
|
|
|
currentTabs,
|
|
|
|
handleClick,
|
|
|
|
handleClose,
|
|
|
|
handleUnPushPin,
|
|
|
|
} = useTabs();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<TabsView
|
2024-06-09 13:31:43 +08:00
|
|
|
:active="currentActive"
|
|
|
|
:menus="createContextMenus"
|
2024-05-19 21:20:42 +08:00
|
|
|
:show-icon="showIcon"
|
|
|
|
:tabs="currentTabs"
|
|
|
|
@close="handleClose"
|
|
|
|
@un-push-pin="handleUnPushPin"
|
2024-06-09 13:31:43 +08:00
|
|
|
@update:active="handleClick"
|
2024-05-19 21:20:42 +08:00
|
|
|
/>
|
|
|
|
</template>
|