From cc1d7095ec6df622efbdaaabe3dec78ca3599d90 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 27 五月 2022 17:01:14 +0800
Subject: [PATCH] X轴自定义名称长度

---
 src/components/normalform/modalform/index.jsx |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx
index bc471f7..5915aaf 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 = [
           {
@@ -102,7 +109,9 @@
 
         if (cell.hidden) return
 
-        if (supItem.hidden) {
+        if (cell.skip && supItem.forbid) { // 涓婄骇琛ㄥ崟绂佺敤鏃讹紝姝よ〃鍗曚笉鍙楁帶鍒�
+
+        } else if (supItem.hidden) {
           cell.hidden = true
         } else if (supItem.type === 'checkbox') {
           let vals = [...supItem.initval, ...item.values]
@@ -253,6 +262,8 @@
         content = (<MkEditIcon allowClear={item.allowClear}/>)
       } else if (item.type === 'source') {
         content = (<SourceComponent type="" placement="right"/>)
+      } else if (item.type === 'table') {
+        content = (<MKTable tip={item.tip || ''} columns={item.columns || []} actions={item.actions || []}/>)
       }
 
       if (!content) return

--
Gitblit v1.8.0