From ab10e496feff0d7de81af939cd7ca1973e1ea220 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 14 一月 2022 18:46:02 +0800 Subject: [PATCH] 2022-01-14 --- src/components/normalform/modalform/index.jsx | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx index bc471f7..7162b0c 100644 --- a/src/components/normalform/modalform/index.jsx +++ b/src/components/normalform/modalform/index.jsx @@ -13,6 +13,7 @@ const { TextArea } = Input const MKRadio = asyncComponent(() => import('./mkRadio')) +const MKTable = asyncComponent(() => import('./mkTable')) const MKCheckbox = asyncComponent(() => import('./mkCheckbox')) const StyleInput = asyncComponent(() => import('./styleInput')) const MKFileUpload = asyncComponent(() => import('@/tabviews/zshare/fileupload')) @@ -66,13 +67,19 @@ validator: (rule, value, callback) => this.handleConfirmPassword(rule, value, callback, item) }] } else if (item.type === 'textarea') { - let _rules = [ + item.rules = [ { required: item.required, message: item.label + '涓嶅彲涓虹┖!' } ] - item.rules = _rules + } else if (item.type === 'table') { + item.rules = [ + { + required: item.required, + message: '璇锋坊鍔�' + item.label + '!' + } + ] } else { item.rules = [ { @@ -253,6 +260,8 @@ content = (<MkEditIcon allowClear={item.allowClear}/>) } else if (item.type === 'source') { content = (<SourceComponent type="" placement="right"/>) + } else if (item.type === 'table') { + content = (<MKTable columns={item.columns || []}/>) } if (!content) return -- Gitblit v1.8.0