king
2022-05-12 b8aa5da1b2873bea760483cc5ab335fde9fb6de6
src/views/menudesign/index.jsx
@@ -4,7 +4,7 @@
import moment from 'moment'
import HTML5Backend from 'react-dnd-html5-backend'
import { ConfigProvider, notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd'
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons'
import { DoubleLeftOutlined, DoubleRightOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons'
import html2canvas from 'html2canvas'
import Api from '@/api'
@@ -74,7 +74,8 @@
    visible: false,
    customComponents: [],
    comloading: false,
    settingshow: !['linkage_navigation', 'linkage', 'menu_board', 'menu_board_navigation'].includes(window.GLOB.navBar)
    settingshow: true,
    eyeopen: false
  }
  UNSAFE_componentWillMount() {
@@ -399,9 +400,7 @@
          config = null
        }
        let _settingshow = this.state.settingshow
        if (!config) {
          _settingshow = true
          config = {
            version: 1.0,
            uuid: MenuId,
@@ -446,7 +445,6 @@
        window.GLOB.urlFields = config.urlFields || []
        this.setState({
          settingshow: _settingshow,
          oriConfig: config,
          config: fromJS(config).toJS()
        })
@@ -1102,7 +1100,7 @@
  }
  render () {
    const { activeKey, comloading, MenuType, popBtn, visible, dict, MenuId, config, settingshow, ParentId, MenuName, MenuNo, menuloading, customComponents } = this.state
    const { activeKey, comloading, MenuType, popBtn, visible, dict, MenuId, config, settingshow, ParentId, MenuName, MenuNo, menuloading, customComponents, eyeopen } = this.state
    return (
      <ConfigProvider locale={_locale}>
@@ -1160,11 +1158,12 @@
                  </Panel>
                </Collapse>
              </div>
              <div className={'menu-view ' + (menuloading ? 'saving' : '')}>
              <div className={'menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}>
                <Card title={
                  <div style={{paddingLeft: '15px'}}> {config && config.MenuName} </div>
                } bordered={false} extra={
                  <div>
                    <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button>
                    <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
                    <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                    <SysInterface config={config} updateConfig={this.updateConfig}/>