From e1dbf60b536abc743a946d0194e55d413535e7ad Mon Sep 17 00:00:00 2001 From: wangzenghua <1048523306@qq.com> Date: Tue, 11 Mar 2025 09:39:25 +0100 Subject: [PATCH] =?UTF-8?q?feat:action/tree=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/custom-table-operate/index.vue | 8 ++- .../components/custom-table-tree/index.vue | 67 +++++++++++++++++++ main/src/components/index.js | 13 +++- 3 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 main/src/components/custom-table-tree/index.vue diff --git a/main/src/components/custom-table-operate/index.vue b/main/src/components/custom-table-operate/index.vue index 9e86264..3504e34 100644 --- a/main/src/components/custom-table-operate/index.vue +++ b/main/src/components/custom-table-operate/index.vue @@ -5,8 +5,8 @@ @@ -26,6 +26,10 @@ const onPermission = (row) => { if (row.auth === undefined) return true; return typeof row.auth === 'function' ? row.auth(props.data) : row.auth; }; + +const formatterIcon = (row) => { + return typeof row.icon === 'function' ? row.icon(props.data) : row.icon; +}; diff --git a/main/src/components/index.js b/main/src/components/index.js index b95d513..9e092b9 100644 --- a/main/src/components/index.js +++ b/main/src/components/index.js @@ -1,5 +1,6 @@ import SvgIcon from './svg-icon'; import CustomTableOperate from './custom-table-operate'; +import CustomTableTree from './custom-table-tree'; import CustomImportExcel from './custom-import-excel'; import CustomRichEditor from './custom-rich-editor'; import CustomEchartBar from './custom-echart-bar'; @@ -7,4 +8,14 @@ import CustomEchartPie from './custom-echart-pie'; import CustomEchartLine from './custom-echart-line'; import CustomEchartMixin from './custom-echart-mixin'; -export { SvgIcon, CustomTableOperate, CustomImportExcel, CustomRichEditor, CustomEchartBar, CustomEchartPie, CustomEchartLine, CustomEchartMixin }; +export { + SvgIcon, + CustomTableOperate, + CustomTableTree, + CustomImportExcel, + CustomRichEditor, + CustomEchartBar, + CustomEchartPie, + CustomEchartLine, + CustomEchartMixin, +};