king
2025-02-06 d1cd5af5adb53e91efdd278328e1b6f8ad834fb5
src/menu/components/module/account/index.jsx
@@ -11,6 +11,7 @@
import './index.scss'
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
class Account extends Component {
@@ -80,7 +81,7 @@
  changeStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle)
    MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear', 'position'], card.style, this.getStyle)
  }
  getStyle = (style) => {
@@ -96,9 +97,27 @@
  }
  updateWrap = (res) => {
    let _card = {...this.state.card, wrap: res}
    if (res.linkmenu) {
      let list = null
      try {
        list = JSON.parse(sessionStorage.getItem('thdMenuList')) || []
      } catch (e) {
        list = []
      }
    this.updateComponent(_card)
      let id = res.linkmenu[res.linkmenu.length - 1]
      res.MenuID = id
      list.forEach(item => {
        if (item.MenuID === id) {
          res.MenuName = item.MenuName
          res.MenuNo = item.MenuNo
          res.tabType = item.type
        }
      })
    }
    this.updateComponent({...this.state.card, wrap: res})
  }
  render() {
@@ -111,6 +130,7 @@
            <NormalForm title="基本设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="account" card={card}/>
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
          </div>