Browse Source

fix: config provider error when vue3.1.1 #4225

refactor-list
tangjinzhou 3 years ago
parent
commit
edca829e09
  1. 10
      components/config-provider/index.tsx
  2. 2
      v2-doc

10
components/config-provider/index.tsx

@ -139,9 +139,13 @@ const ConfigProvider = defineComponent({
getPrefixCls: getPrefixClsWrapper,
renderEmpty: renderEmptyComponent,
});
watch(props, () => {
Object.assign(configProvider, props);
Object.keys(props).forEach(key => {
watch(
() => props[key],
() => {
configProvider[key] = props[key];
},
);
});
provide('configProvider', configProvider);

2
v2-doc

@ -1 +1 @@
Subproject commit 0f6d531d088d5283250c8cec1c7e8be0e0d36a36
Subproject commit 082898c0188de1c83f27696487bd6d4db7f29749
Loading…
Cancel
Save