From de516477e7c11d667b3d77f6a37b5df8e893bd29 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 22 二月 2022 09:50:45 +0800
Subject: [PATCH] 2022-02-22

---
 src/views/mobdesign/index.jsx |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx
index c10b914..5ff6ea4 100644
--- a/src/views/mobdesign/index.jsx
+++ b/src/views/mobdesign/index.jsx
@@ -1102,13 +1102,17 @@
 
       let roleParam = {type: 'view', key: config.uuid, title: config.MenuName, children: []}
       roleParam.children = this.getMenuMessage()
+      config.loginview = false
+      config.tabview = false
 
-      if (config.components.findIndex(item => item.type === 'login') > -1) {
-        roleParam.login = true
-        config.loginview = true
-      } else {
-        config.loginview = false
-      }
+      config.components.forEach(item => {
+        if (item.type === 'login') {
+          roleParam.login = true
+          config.loginview = true
+        } else if (item.type === 'navbar') {
+          config.tabview = true
+        }
+      })
 
       if (adapters.includes('wxmini')) {
         config = this.getMiniStyle(config)
@@ -1402,6 +1406,7 @@
           swipes.push(item.name)
         }
 
+        if (['voucher'].includes(item.subtype)) return
         if (['propcard', 'brafteditor', 'sandbox', 'tabbar', 'stepform', 'tabform'].includes(item.subtype) && item.wrap.datatype === 'static') return
         if (['balcony'].includes(item.type) && item.wrap.datatype === 'static') return
         if (['menubar'].includes(item.type) && item.wrap.datatype !== 'dynamic') return
@@ -1464,14 +1469,28 @@
   insert = (item) => {
     let config = fromJS(this.state.config).toJS()
 
-    if (item.type === 'topbar' && config.components.findIndex(m => m.type === 'topbar') > -1) {
+    if (item.type === 'search') {
       notification.warning({
         top: 92,
-        message: '瀵艰埅鏍忎笉鍙噸澶嶆坊鍔狅紒',
+        message: '绉诲姩绔悳绱㈢粍浠朵笉鍙矘璐达紒',
         duration: 5
       })
       return
     }
+    
+    if (item.type === 'topbar') {
+      if (config.components.findIndex(m => m.type === 'topbar') > -1) {
+        notification.warning({
+          top: 92,
+          message: '瀵艰埅鏍忎笉鍙噸澶嶆坊鍔狅紒',
+          duration: 5
+        })
+        return
+      }
+      if (!config.style.paddingTop) {
+        config.style.paddingTop = '50px'
+      }
+    }
 
     config.components.push(item)
 

--
Gitblit v1.8.0