@varlet/ui
Version:
A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.
14 lines (13 loc) • 325 B
JavaScript
import { useParent } from "@varlet/use";
import { TAB_ITEM_BIND_LIST_KEY } from "../tab-item/provide.mjs";
function useTabItem() {
const { parentProvider, bindParent, index } = useParent(TAB_ITEM_BIND_LIST_KEY);
return {
index,
tabItem: parentProvider,
bindTabItem: bindParent
};
}
export {
useTabItem
};