mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-02 12:07:54 +08:00
21 lines
504 B
Vue
21 lines
504 B
Vue
// import PropTypes from '../_util/vue-types';
|
|
import { computed, provide } from 'vue';
|
|
import { propTypes } from '../vc-progress/src/types';
|
|
export const injectExtraPropsKey = Symbol();
|
|
const FunctionProvider = {
|
|
inheritAttrs: false,
|
|
isMenuProvider: true,
|
|
props: {
|
|
extraProps: propTypes.object,
|
|
},
|
|
setup(props, { slots }) {
|
|
provide(
|
|
injectExtraPropsKey,
|
|
computed(() => props.extraProps),
|
|
);
|
|
return () => slots.default?.();
|
|
},
|
|
};
|
|
|
|
export default FunctionProvider;
|