12345678910111213141516171819202122232425262728293031323334 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = useInjectLegacySelectContext;
- exports.useProvideLegacySelectContext = useProvideLegacySelectContext;
- var _vue = require("vue");
- /**
- * BaseSelect provide some parsed data into context.
- * You can use this hooks to get them.
- */
- 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?.();
- // },
- // });
- function useProvideLegacySelectContext(props) {
- return (0, _vue.provide)(TreeSelectLegacyContextPropsKey, props);
- }
- function useInjectLegacySelectContext() {
- return (0, _vue.inject)(TreeSelectLegacyContextPropsKey, {});
- }
|