From 316877c1d9e5b6d92334f30b03d97d7e833cd934 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 二月 2021 16:01:57 +0800
Subject: [PATCH] 2021-02-02

---
 src/templates/zshare/modalform/index.jsx |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index 1b9b8cf..b871d33 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -30,6 +30,7 @@
   textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'maxRows', 'encryption', 'interception', 'tooltip'],
   color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'entireLine', 'tooltip'],
   hint: ['label', 'type', 'blacklist', 'message'],
+  brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'tooltip', 'encryption'],
   funcvar: [],
   linkMain: ['readonly', 'required', 'hidden', 'fieldlength', 'entireLine', 'tooltip']
 }
@@ -231,7 +232,9 @@
             }
           } else if (form.key === 'fieldlength') {
             form.initVal = 50
-            if (value === 'textarea' || value === 'fileupload' || value === 'multiselect' || value === 'checkbox') {
+            if (value === 'textarea') {
+              form.initVal = 8000
+            } else if (value === 'fileupload' || value === 'multiselect' || value === 'checkbox') {
               form.initVal = 512
             }
 
@@ -254,6 +257,10 @@
             form.required = true
             if (value === 'hint') {
               form.required = false
+            }
+          } else if (form.key === 'encryption') {
+            if (value === 'brafteditor') {
+              fieldValue.encryption = 'true'
             }
           }
 
@@ -521,7 +528,7 @@
                   getPopupContainer={() => document.getElementById('modal-fields-form-box')}
                 >
                   {item.options.map((option, i) =>
-                    <Select.Option key={`${i}`} value={option.value || option.field}>
+                    <Select.Option key={`${i}`} value={option.value || option.field || ''}>
                       {item.key === 'icon' && <Icon type={option.text} />} {option.text || option.label}
                     </Select.Option>
                   )}

--
Gitblit v1.8.0