| | |
| | | |
| | | 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) |
| | |
| | | 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 |
| | |
| | | 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) |
| | | |