1234567891011121314151617181920212223242526 |
- /**
- * BaseSelect provide some parsed data into context.
- * You can use this hooks to get them.
- */
- import { inject, provide } from 'vue';
- var TreeSelectLegacyContextPropsKey = Symbol('TreeSelectLegacyContextPropsKey');
- // export const LegacySelectContext = defineComponent({
- // compatConfig: { MODE: 3 },
- // name: 'SelectContext',
- // props: {
- // value: { type: Object as PropType<LegacyContextProps> },
- // },
- // setup(props, { slots }) {
- // provide(
- // TreeSelectLegacyContextPropsKey,
- // computed(() => props.value),
- // );
- // return () => slots.default?.();
- // },
- // });
- export function useProvideLegacySelectContext(props) {
- return provide(TreeSelectLegacyContextPropsKey, props);
- }
- export default function useInjectLegacySelectContext() {
- return inject(TreeSelectLegacyContextPropsKey, {});
- }
|