From 31ec63f0419895876cbaba99637a884a32d33d0d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 01 九月 2021 10:31:45 +0800
Subject: [PATCH] 2021-09-01

---
 src/templates/formtabconfig/index.jsx |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx
index 38b589d..e2aacac 100644
--- a/src/templates/formtabconfig/index.jsx
+++ b/src/templates/formtabconfig/index.jsx
@@ -16,23 +16,25 @@
 
 import TabsComponent from '@/templates/sharecomponent/tabscomponent'
 
-import ModalForm from '@/templates/zshare/modalform'
 import PasteForm from '@/templates/zshare/pasteform'
 import ActionForm from './actionform'
 import SettingForm from './settingform'
 import DragElement from './dragelement'
 import GroupForm from './groupform'
 import EditCard from '@/templates/zshare/editcard'
-import VerifyCard from '@/templates/zshare/verifycard'
+
 import MenuForm from '@/templates/zshare/menuform'
 import SourceElement from '@/templates/zshare/dragsource'
-import CreateFunc from '@/templates/zshare/createfunc'
+import asyncComponent from '@/utils/asyncComponent'
 import Source from './source'
 import './index.scss'
 
 const { Panel } = Collapse
 const { Option } = Select
 const { confirm } = Modal
+const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform'))
+const CreateFunc = asyncComponent(() => import('@/templates/zshare/createfunc'))
+const VerifyCard = asyncComponent(() => import('@/templates/zshare/verifycard'))
 
 class ComTableConfig extends Component {
   static propTpyes = {
@@ -43,7 +45,7 @@
   }
 
   state = {
-    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,        // 瀛楀吀
+    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,        // 瀛楀吀
     config: null,            // 椤甸潰閰嶇疆
     modaltype: '',           // 妯℃�佹绫诲瀷锛屾帶鍒舵ā鎬佹鏄剧ず
     tableVisible: false,     // 鏁版嵁琛ㄥ瓧娈垫ā鎬佹
@@ -496,7 +498,7 @@
     if (usefulFields) {
       try {
         usefulFields = JSON.parse(usefulFields)
-      } catch {
+      } catch (e) {
         usefulFields = []
       }
     } else {
@@ -905,7 +907,7 @@
         if (_ismutil && group.sublist.length === 0) {
           _config.enabled = false
         }
-        let arr = group.sublist.filter(item => item.field.toLowerCase() === _primary)
+        let arr = group.sublist.filter(item => item.field && item.field.toLowerCase() === _primary)
 
         if (arr.length > 0) {
           _config.enabled = false
@@ -1619,7 +1621,7 @@
     let primaryrepeat = false
 
     config.groups.forEach(group => {
-      let arr = group.sublist.filter(item => item.field.toLowerCase() === _primary)
+      let arr = group.sublist.filter(item => item.field && item.field.toLowerCase() === _primary)
 
       if (arr.length > 0) {
         primaryrepeat = true
@@ -2013,7 +2015,6 @@
           visible={this.state.tableVisible}
           width={'65vw'}
           maskClosable={false}
-          style={{minWidth: '900px', maxWidth: '1200px'}}
           cancelText={this.state.dict['model.close']}
           onOk={this.addFieldSubmit}
           onCancel={() => { // 鍙栨秷娣诲姞
@@ -2037,7 +2038,6 @@
           visible={this.state.profileVisible}
           width={'75vw'}
           maskClosable={false}
-          style={{minWidth: '900px', maxWidth: '1200px'}}
           okText={this.state.dict['model.submit']}
           onOk={this.verifySubmit}
           onCancel={() => { this.setState({ profileVisible: false }) }}

--
Gitblit v1.8.0