Skip to content

Commit

Permalink
fix(VxeTable): 修复VxeTable自定义组件重复注册导致控制台警告 (#3944)
Browse files Browse the repository at this point in the history
  • Loading branch information
fourteendp committed Jul 4, 2024
1 parent dd1b16a commit cec5c11
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/VxeTable/src/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const VXETablePluginAntd = {
install(vxetablecore: VxeUIExport) {
const { interceptor, renderer } = vxetablecore;

renderer.mixin({
const customRenderComponents = {
AAutoComplete,
AInput,
AInputNumber,
Expand All @@ -99,6 +99,11 @@ export const VXETablePluginAntd = {
AEmpty,
AInputSearch,
AYearPicker,
};

Object.keys(customRenderComponents).forEach((name) => {
if (renderer.get(name)) return;
renderer.add(name, customRenderComponents[name]);
});

interceptor.add('event.clearFilter', handleClearEvent);
Expand Down

0 comments on commit cec5c11

Please sign in to comment.