fix: wave configprovide
parent
ec4d6597d1
commit
3c292a51e1
|
@ -1 +1 @@
|
|||
Subproject commit adbfcd30aeb6c125defa35102ed659f1be03c672
|
||||
Subproject commit f3b049411f17e556d8795f40d41bfadb471ae630
|
|
@ -1,4 +1,4 @@
|
|||
import { nextTick } from 'vue';
|
||||
import { nextTick, inject } from 'vue';
|
||||
import TransitionEvents from './css-animation/Event';
|
||||
import raf from './raf';
|
||||
import { ConfigConsumerProps } from '../config-provider';
|
||||
|
@ -31,8 +31,11 @@ export default {
|
|||
this.instance = this.bindAnimationEvent(node);
|
||||
});
|
||||
},
|
||||
inject: {
|
||||
configProvider: { default: () => ConfigConsumerProps },
|
||||
setup() {
|
||||
const configProvider = inject('configProvider', ConfigConsumerProps);
|
||||
return {
|
||||
configProvider,
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.instance) {
|
||||
|
@ -162,10 +165,10 @@ export default {
|
|||
},
|
||||
|
||||
render() {
|
||||
const csp = this.configProvider().csp;
|
||||
const csp = this.configProvider.csp;
|
||||
if (csp) {
|
||||
this.csp = csp;
|
||||
}
|
||||
return this.$slots.default() && this.$slots.default()[0];
|
||||
return this.$slots.default && this.$slots.default()[0];
|
||||
},
|
||||
};
|
||||
|
|
|
@ -14,7 +14,7 @@ export default {
|
|||
__ANT_BUTTON: true,
|
||||
props,
|
||||
setup() {
|
||||
const configProvider = inject('configProvider') || ConfigConsumerProps;
|
||||
const configProvider = inject('configProvider', ConfigConsumerProps);
|
||||
return {
|
||||
configProvider,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue