import type { PropType } from 'vue'; import { Dropdown } from '/@/components/Dropdown/index'; import { defineComponent, unref, FunctionalComponent } from 'vue'; import { TabContentProps } from './types'; import { RightOutlined } from '@ant-design/icons-vue'; import { TabContentEnum } from './types'; import { useTabDropdown } from './useTabDropdown'; import { useI18n } from '/@/hooks/web/useI18n'; import { RouteLocationNormalized } from 'vue-router'; const { t: titleT } = useI18n(); const ExtraContent: FunctionalComponent = () => { return ( ); }; const TabContent: FunctionalComponent<{ tabItem: RouteLocationNormalized; handler: Fn }> = ( props ) => { const { tabItem: { meta } = {} } = props; return (
{meta && titleT(meta.title)}
); }; export default defineComponent({ name: 'TabContent', props: { tabItem: { type: Object as PropType, default: null, }, type: { type: Number as PropType, default: TabContentEnum.TAB_TYPE, }, }, setup(props) { const { getDropMenuList, handleMenuEvent, handleContextMenu, getTrigger, isTabs, } = useTabDropdown(props as TabContentProps); return () => { return ( {() => { if (!unref(isTabs)) { return ; } return ; }} ); }; }, });