From 81e9f636c0348ca2ba896f066351f2741fd9497f Mon Sep 17 00:00:00 2001 From: eternallycyf <969475322@qq.com> Date: Sun, 29 Oct 2023 23:39:47 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(ims-view-pc):=20add=20CommonEd?= =?UTF-8?q?itTable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/AccessBtn/index.tsx | 4 +- .../src/components/AccessBtn/interface.ts | 8 +- .../src/components/AudioPlayer/index.md | 2 +- .../src/components/CommonCard/index.md | 2 +- .../components/CommonEditTable/EditTable.tsx | 358 ++++++++++++++++++ .../src/components/CommonEditTable/Item.tsx | 9 + .../src/components/CommonEditTable/README.md | 12 + .../components/CommonEditTable/TableBtn.tsx | 35 ++ .../CommonEditTable/demo/config/columns.tsx | 74 ++++ .../components/CommonEditTable/demo/demo1.tsx | 162 ++++++++ .../src/components/CommonEditTable/index.less | 49 +++ .../src/components/CommonEditTable/index.tsx | 42 ++ .../components/CommonEditTable/interface.ts | 212 +++++++++++ .../src/components/CommonEditTable/utils.tsx | 125 ++++++ .../components/CustomForm/FormItem/simple.tsx | 47 +-- .../src/components/CustomForm/index.md | 2 +- .../src/components/VideoViewer/index.md | 2 +- .../ims-view-pc/src/core/helpers/index.tsx | 110 +++++- .../ims-view-pc/src/core/helpers/utils.tsx | 68 +++- packages/ims-view-pc/src/index.tsx | 2 + 20 files changed, 1292 insertions(+), 33 deletions(-) create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/EditTable.tsx create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/Item.tsx create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/README.md create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/TableBtn.tsx create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/demo/config/columns.tsx create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/demo/demo1.tsx create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/index.less create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/index.tsx create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/interface.ts create mode 100644 packages/ims-view-pc/src/components/CommonEditTable/utils.tsx diff --git a/packages/ims-view-pc/src/components/AccessBtn/index.tsx b/packages/ims-view-pc/src/components/AccessBtn/index.tsx index f85bc39..bb7aa3c 100644 --- a/packages/ims-view-pc/src/components/AccessBtn/index.tsx +++ b/packages/ims-view-pc/src/components/AccessBtn/index.tsx @@ -19,7 +19,7 @@ const AccessBtn: React.FC = (props) => { const accessCodeList = accessCollection.map((item) => item); const btnEleList = (btnList || []).map((btn, index) => { - const { type, code, buttonType, element, visible, itemProps } = btn; + const { type = 'default', code, buttonType, element, visible, itemProps } = btn; const buttonProps = (btn?.itemProps?.buttonProps as IButtonItemProps['buttonProps']) || {}; const buttonGroupProps = btn?.itemProps?.buttonGroupProps || {}; const popConfirmProps = btn?.itemProps?.popConfirmProps || {}; @@ -79,7 +79,7 @@ const AccessBtn: React.FC = (props) => { return (