king
2022-01-22 56cf1b98d331c88eb6b0de8d03a85ce06f19f901
src/views/mobdesign/index.jsx
@@ -1464,13 +1464,18 @@
  insert = (item) => {
    let config = fromJS(this.state.config).toJS()
    if (item.type === 'topbar' && config.components.findIndex(m => m.type === 'topbar') > -1) {
      notification.warning({
        top: 92,
        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)