From 85bc1f2340532e563cb4ffe81e0c4347d57eef4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=84=BF=E6=97=B6=E7=9A=84=E5=A4=8F=E6=97=A5?= <495294080@qq.com> Date: Fri, 10 Mar 2023 11:32:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20vxe-table=E4=B8=8Evben=20ApiTreeSelect?= =?UTF-8?q?=E9=80=82=E9=85=8D=20(#2613)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/AApiTreeSelect.tsx | 20 +++++++++++++++++++ .../VxeTable/src/components/index.tsx | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 src/components/VxeTable/src/components/AApiTreeSelect.tsx diff --git a/src/components/VxeTable/src/components/AApiTreeSelect.tsx b/src/components/VxeTable/src/components/AApiTreeSelect.tsx new file mode 100644 index 000000000..8fb1d3d80 --- /dev/null +++ b/src/components/VxeTable/src/components/AApiTreeSelect.tsx @@ -0,0 +1,20 @@ +import XEUtils from 'xe-utils'; +import { createDefaultRender, createEditRender, createFormItemRender } from './common'; + +export default { + renderDefault: createDefaultRender({}, (_, params) => { + return { + params: XEUtils.get(params, 'row'), + }; + }), + renderEdit: createEditRender({}, (_, params) => { + return { + params: XEUtils.get(params, 'row'), + }; + }), + renderItemContent: createFormItemRender({}, (_, params) => { + return { + params: XEUtils.get(params, 'row'), + }; + }), +}; diff --git a/src/components/VxeTable/src/components/index.tsx b/src/components/VxeTable/src/components/index.tsx index cf5095c30..ba8c6d858 100644 --- a/src/components/VxeTable/src/components/index.tsx +++ b/src/components/VxeTable/src/components/index.tsx @@ -17,6 +17,7 @@ import ACheckboxGroup from './ACheckboxGroup'; import AButton from './AButton'; import AButtonGroup from './AButtonGroup'; import AApiSelect from './AApiSelect'; +import AApiTreeSelect from './AApiTreeSelect'; import AEmpty from './AEmpty'; import AInputSearch from './AInputSearch'; import AYearPicker from './AYearPicker'; @@ -94,6 +95,7 @@ export const VXETablePluginAntd = { AButton, AButtonGroup, AApiSelect, + AApiTreeSelect, AEmpty, AInputSearch, AYearPicker,