king
2021-09-06 d4c2669215ef211e52496e69a89010a9b545e04a
src/menu/popview/index.jsx
@@ -19,6 +19,7 @@
const { confirm } = Modal
const MenuForm = asyncComponent(() => import('./menuform'))
const Versions = asyncComponent(() => import('@/menu/versions'))
const Header = asyncComponent(() => import('@/menu/header'))
const SourceWrap = asyncComponent(() => import('@/menu/modulesource'))
const MenuShell = asyncComponent(() => import('@/menu/menushell'))
@@ -39,9 +40,7 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    MenuType: '',
    MenuId: '',
    MenuNo: '',
    delButtons: [],
    activeKey: 'basedata',
    menuloading: false,
@@ -556,9 +555,21 @@
    window.GLOB.customMenu = config
  }
  refreshConfig = () => {
    this.setState({
      delButtons: [],
      activeKey: 'basedata',
      menuloading: false,
      oriConfig: null,
      config: null,
    }, () => {
      this.getMenuParam()
    })
  }
  render () {
    const { btn } = this.props
    const { activeKey, MenuType, dict, config, menuloading, customComponents } = this.state
    const { activeKey, dict, config, menuloading, customComponents, MenuId } = this.state
    return (
      <div className="pc-poper-view">
@@ -576,10 +587,10 @@
                </Panel>
                {/* 组件添加 */}
                <Panel header={dict['mob.component']} key="component">
                  <SourceWrap MenuType={MenuType} />
                  <SourceWrap MenuType="" />
                </Panel>
                {customComponents && customComponents.length ? <Panel header="自定义组件" key="cuscomponent">
                  <SourceWrap components={customComponents} MenuType={MenuType} />
                  <SourceWrap components={customComponents} MenuType="" />
                </Panel> : null}
                <Panel header={'页面背景'} key="background">
                  {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null}
@@ -594,6 +605,7 @@
                <div> {config && config.MenuName} </div>
              } bordered={false} extra={
                <div>
                  <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''} updateConfig={this.refreshConfig}/>
                  <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                  <StyleCombControlButton menu={config} />
                  <PasteController type="menu" Tab={null} insert={this.insert} />