2020-10-28 15:03:45 +00:00
|
|
|
// import PropTypes from '../_util/vue-types';
|
2020-10-20 15:13:49 +00:00
|
|
|
import { provide, reactive } from 'vue';
|
2020-10-28 15:03:45 +00:00
|
|
|
export const injectExtraPropsKey = Symbol();
|
2020-10-20 15:13:49 +00:00
|
|
|
const FunctionProvider = {
|
|
|
|
inheritAttrs: false,
|
|
|
|
setup(props, { slots, attrs }) {
|
2020-10-28 15:03:45 +00:00
|
|
|
provide(injectExtraPropsKey, reactive(attrs));
|
2020-10-24 12:36:57 +00:00
|
|
|
return () => slots.default?.();
|
2020-10-20 15:13:49 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default FunctionProvider;
|