ant-design-vue/components/config-provider/index.jsx

24 lines
469 B
Vue
Raw Normal View History

2019-01-12 03:33:27 +00:00
import PropTypes from '../_util/vue-types';
2019-01-02 12:13:25 +00:00
const ConfigProvider = {
name: 'AConfigProvider',
props: {
getPopupContainer: PropTypes.func,
},
2019-01-12 03:33:27 +00:00
provide() {
2019-01-02 12:13:25 +00:00
return {
configProvider: this.$props,
2019-01-12 03:33:27 +00:00
};
2019-01-02 12:13:25 +00:00
},
2019-01-12 03:33:27 +00:00
render() {
return this.$slots.default ? this.$slots.default[0] : null;
2019-01-02 12:13:25 +00:00
},
2019-01-12 03:33:27 +00:00
};
2019-01-02 12:13:25 +00:00
/* istanbul ignore next */
2019-01-12 03:33:27 +00:00
ConfigProvider.install = function(Vue) {
Vue.component(ConfigProvider.name, ConfigProvider);
};
2019-01-02 12:13:25 +00:00
2019-01-12 03:33:27 +00:00
export default ConfigProvider;