2020-10-28 15:03:45 +00:00
|
|
|
// import PropTypes from '../_util/vue-types';
|
2020-11-23 06:21:18 +00:00
|
|
|
import { computed, provide } from 'vue';
|
|
|
|
import { propTypes } from '../vc-progress/src/types';
|
2020-10-28 15:03:45 +00:00
|
|
|
export const injectExtraPropsKey = Symbol();
|
2020-10-20 15:13:49 +00:00
|
|
|
const FunctionProvider = {
|
|
|
|
inheritAttrs: false,
|
2020-11-26 15:43:22 +00:00
|
|
|
isMenuProvider: true,
|
2020-11-23 06:21:18 +00:00
|
|
|
props: {
|
|
|
|
extraProps: propTypes.object,
|
|
|
|
},
|
|
|
|
setup(props, { slots }) {
|
|
|
|
provide(
|
|
|
|
injectExtraPropsKey,
|
|
|
|
computed(() => props.extraProps),
|
|
|
|
);
|
2020-10-24 12:36:57 +00:00
|
|
|
return () => slots.default?.();
|
2020-10-20 15:13:49 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default FunctionProvider;
|