ant-design-vue/components/_util/store/Provider.jsx
2020-06-16 22:55:02 +08:00

16 lines
314 B
Vue

import { provide } from 'vue';
import { storeShape } from './PropTypes';
import { getSlot } from '../props-util';
export default {
name: 'StoreProvider',
props: {
store: storeShape.isRequired,
},
created() {
provide('storeContext', this.$props);
},
render() {
return getSlot(this);
},
};