king
2022-10-19 8f394e7ef20cc0abba3f47c23a63b069e9dd0e45
src/views/mobdesign/index.jsx
@@ -152,7 +152,6 @@
    MKEmitter.addListener('modalStatus', this.modalStatus)
    MKEmitter.addListener('triggerMenuSave', this.submitConfig)
    MKEmitter.addListener('changeEditMenu', this.changeEditMenu)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent)
    setTimeout(() => {
      if (sessionStorage.getItem('app_custom_components')) {
@@ -220,7 +219,6 @@
    MKEmitter.removeListener('modalStatus', this.modalStatus)
    MKEmitter.removeListener('triggerMenuSave', this.submitConfig)
    MKEmitter.removeListener('changeEditMenu', this.changeEditMenu)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent)
  }
@@ -457,28 +455,6 @@
    this.setState({customComponents: coms})
  }
  updateComponentStyle = (parentId, keys, style) => {
    const { config } = this.state
    if (config.uuid !== parentId) return
    let components = config.components.map(item => {
      if (keys.includes(item.uuid)) {
        item.style = {...item.style, ...style}
      }
      return item
    })
    this.setState({
      config: {...config, components},
      comloading: true
    }, () => {
      this.setState({
        comloading: false
      })
    })
  }
  closeView = () => {
    const { oriConfig, config } = this.state
@@ -656,18 +632,16 @@
            backElements: []
          }
        ],
        headerStyle: {}, parentId: '', width: 24, scripts: [], pageable: false,
        headerStyle: {}, width: 24, scripts: [], pageable: false,
        wrap: {name: 'logo', width: 24, datatype: 'static', cardType: '', blacklist: []},
        name: 'logo', floor: 1, switchable: true,
        setting:{interType: 'system'}, tabId: '', style:{paddingTop: '8vh', paddingBottom: '10vh'}, format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: []
        setting:{interType: 'system'}, style:{paddingTop: '8vh', paddingBottom: '10vh'}, format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: []
      })
      config.components.push({
        uuid: Utils.getuuid(),
        type: 'login',
        floor: 1,
        tabId: '',
        parentId: '',
        width: 24,
        name: '用户绑定',
        subtype: 'bindlogin',
@@ -687,10 +661,10 @@
            backElements: []
          }
        ],
        headerStyle: {}, parentId: '', width: 24, scripts: [], pageable: false,
        headerStyle: {}, width: 24, scripts: [], pageable: false,
        wrap: {name: 'Power', width: 24, datatype: 'static', cardType: '', blacklist: []},
        name: 'Power', floor: 1, switchable: true,
        setting:{interType: 'system'}, tabId: '', style:{}, format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: []
        setting:{interType: 'system'}, style:{}, format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: []
      })
    }