king
2021-07-28 137fb8ea6af2789b3238b22bac31d80bced41dfe
src/menu/popview/index.jsx
@@ -19,8 +19,10 @@
const { confirm } = Modal
const MenuForm = asyncComponent(() => import('./menuform'))
const Header = asyncComponent(() => import('@/menu/header'))
const SourceWrap = asyncComponent(() => import('@/menu/modulesource'))
const MenuShell = asyncComponent(() => import('@/menu/menushell'))
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
const BgController = asyncComponent(() => import('@/menu/bgcontroller'))
const PasteController = asyncComponent(() => import('@/menu/pastecontroller'))
const PaddingController = asyncComponent(() => import('@/menu/padcontroller'))
@@ -84,6 +86,7 @@
  updateCustomComponent = () => {
    Api.getSystemConfig({
      func: 's_get_custom_components',
      typename: sessionStorage.getItem('appType'),
      typecharone: ''
    }).then(res => {
      let coms = []
@@ -245,7 +248,7 @@
            buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`)
            _sort++
          })
          item.subcards.forEach(card => {
          item.subcards && item.subcards.forEach(card => {
            card.elements && card.elements.forEach(cell => {
              if (cell.eleType !== 'button') return
              this.checkBtn(cell)
@@ -527,6 +530,18 @@
    window.GLOB.customMenu = config
  }
  resetConfig = (config) => {
    this.setState({
      config: {...config, components: []},
    }, () => {
      this.setState({
        config: config
      })
    })
    window.GLOB.customMenu = config
  }
  /**
   * @description 更新常用表信息,快捷添加后更新配置信息
   */
@@ -550,6 +565,8 @@
    const { activeKey, MenuType, dict, config, menuloading, customComponents } = this.state
    return (
      <div className="pc-poper-view">
        <Header />
      <DndProvider backend={HTML5Backend}>
        <div className="menu-body">
          <div className="menu-setting">
@@ -581,6 +598,7 @@
              <div> {config && config.MenuName} </div>
            } bordered={false} extra={
              <div>
                  <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                <StyleCombControlButton menu={config} />
                <PasteController type="menu" Tab={null} insert={this.insert} />
                {config ? <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config.enabled} onChange={this.onEnabledChange} /> : null}
@@ -593,6 +611,7 @@
          </div>
        </div>
      </DndProvider>
      </div>
    )
  }
}