king
2019-12-25 af0db2414ced6089cdb829304a4409ea4231d57a
src/components/sidemenu/editthdmenu/index.jsx
@@ -57,6 +57,7 @@
    loading: false,        // 编辑菜单或使用已使用模板时,获取配置信息
    preview: null,         // 图片预览url
    pretemplate: null,     // 预览模板
    btnParam: null,        // 编辑按钮的配置信息
    sysTemplates: sysTemps // 系统模板
  }
@@ -439,14 +440,16 @@
  handleSubConfig = (item, originMenu, config, type) => {
    if (type === 'button') {
      if (item.OpenType === 'pop') {
        item.pageParam = ''
        let pageParam = ''
        if (config && config.type === 'Modal') {
          item.pageParam = config
          pageParam = config
        }
  
        this.setState({
          editMenu: originMenu,
          editTab: '',
          editAction: item,
          btnParam: pageParam,
          tabview: 'Modal'
        })
      }
@@ -455,20 +458,23 @@
        this.setState({
          editMenu: originMenu,
          editTab: config,
          editAction: '',
          tabview: 'SubTable'
        })
      }
    } else if (type === 'tabButton') {
      // item.pageParam = ''
      // if (config && config.type === 'Modal') {
      //   item.pageParam = config
      // }
      let pageParam = ''
      console.log(config)
      if (config && config.type === 'Modal') {
        pageParam = config
      }
      // this.setState({
      //   editMenu: originMenu,
      //   editAction: item,
      //   tabview: 'Modal'
      // })
      this.setState({
        editTab: originMenu,
        editAction: item,
        btnParam: pageParam,
        tabview: 'Modal'
      })
    }
  }
@@ -595,7 +601,9 @@
        {this.state.tabview === 'Modal' &&
          <ModalConfig
            menu={this.state.editMenu}
            editTab={this.state.editTab}
            editAction={this.state.editAction}
            btnParam={this.state.btnParam}
            handleConfig={this.handleConfig}
          />
        }