king
2022-08-10 dd2540a2cec5f495db0ce246319a795df45d4535
src/views/pcdesign/index.jsx
@@ -140,9 +140,17 @@
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent)
    setTimeout(() => {
      if (sessionStorage.getItem('app_custom_components')) {
        let list = sessionStorage.getItem('app_custom_components')
        list = JSON.parse(list)
        this.setCustomComponent(list)
      } else {
      this.updateCustomComponent()
      }
      this.getAppPictures()
      this.getSmStemp()
      this.getRoleFields()
      setGLOBFuncs()
    }, 1000)
@@ -457,15 +465,23 @@
      typename: 'pc',
      typecharone: ''
    }).then(res => {
      let coms = []
      if (!res.status) {
        notification.warning({
          top: 92,
          message: res.message,
          duration: 5
        })
      } else if (res.cus_list && res.cus_list.length > 0) {
        res.cus_list.forEach(item => {
      } else if (res.cus_list) {
        sessionStorage.setItem('app_custom_components', JSON.stringify(res.cus_list))
        this.setCustomComponent(res.cus_list)
      }
    })
  }
  setCustomComponent = (cus_list) => {
    let coms = []
    cus_list.forEach(item => {
          let config = ''
          try {
@@ -485,14 +501,10 @@
            url: item.images,
            component: config.type,
            subtype: config.subtype,
            width: config.width || 24,
            config
          })
        })
      }
      this.setState({customComponents: coms})
      this.getRoleFields()
    })
  }
  updateComponentStyle = (parentId, keys, style) => {