@varlet/ui
Version:
A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.
17 lines (16 loc) • 424 B
JavaScript
import { useChildren } from "@varlet/use";
const MENU_SELECT_BIND_MENU_OPTION_KEY = Symbol("MENU_SELECT_BIND_MENU_OPTION_KEY");
function useMenuOptions() {
const { length, childProviders, bindChildren } = useChildren(
MENU_SELECT_BIND_MENU_OPTION_KEY
);
return {
length,
menuOptions: childProviders,
bindMenuOptions: bindChildren
};
}
export {
MENU_SELECT_BIND_MENU_OPTION_KEY,
useMenuOptions
};