From 8e5e35eac41ba16f4b875bbcf07bab3878d8e2e4 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 06 七月 2024 14:34:35 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/pastecontroller/index.jsx | 57 +++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 49 insertions(+), 8 deletions(-) diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx index 1ef0452..b9b8937 100644 --- a/src/menu/pastecontroller/index.jsx +++ b/src/menu/pastecontroller/index.jsx @@ -9,6 +9,8 @@ import asyncComponent from '@/utils/asyncComponent' // import './index.scss' +const { confirm } = Modal + const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform')) class PasteController extends Component { @@ -253,7 +255,7 @@ options = ['tabs', 'timeline', 'datacard', 'doublecard', 'propcard', 'cardatacard', 'carpropcard', 'simpleform', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'editor', 'pie', 'scatter', 'iframe', 'sandbox'] if (appType === 'mob') { - options.push('menubar', 'singleSearch') + options.push('menubar', 'singleSearch', 'mobnavbar') if (sessionStorage.getItem('editMenuType') !== 'popview') { options.push('topbar') } @@ -336,6 +338,15 @@ }) return } + } else if (res.type === 'navbar') { + if (menu.components.findIndex(m => m.type === 'navbar') > -1) { + notification.warning({ + top: 92, + message: '鑿滃崟鏍忎笉鍙噸澶嶆坊鍔狅紒', + duration: 5 + }) + return + } } } else if (res.type === 'search') { if (tab) { @@ -376,15 +387,45 @@ this.resetlink(res, commonId) - this.props.insert(res) - this.setState({visible: false}) - notification.success({ - top: 92, - message: '绮樿创鎴愬姛锛�', - duration: 2 - }) + let skip = true + if (appType === 'mob' && res.type === 'navbar') { + let appMenus = sessionStorage.getItem('appViewList') + if (appMenus) { + try { + appMenus = JSON.parse(appMenus) + appMenus = appMenus.filter(item => item.keys_type === 'navbar') + } catch (e) { + appMenus = [] + } + } else { + appMenus = [] + } + + if (appMenus.length) { + const that = this + skip = false + + confirm({ + title: '濡傞渶浣跨敤褰撳墠搴旂敤涓凡鏈夌殑鑿滃崟鏍忥紝璇风偣鍑诲彸渚у叧鑱旇彍鍗曟爮锛屽闇�娣诲姞璇风偣纭畾銆�', + onOk() { + that.props.insert(res) + }, + onCancel() {} + }) + } + } + + if (skip) { + this.props.insert(res) + + notification.success({ + top: 92, + message: '绮樿创鎴愬姛锛�', + duration: 2 + }) + } }) } -- Gitblit v1.8.0