king
2022-10-22 03a22ec6f9ad7303d10b4c65bb5bc6fa5cbd448a
src/templates/zshare/unattended/index.jsx
@@ -27,12 +27,20 @@
    const { config } = this.props
    let actions = []
    config.action.forEach(item => {
      if (item.position !== 'toolbar') return
      if (['pop', 'prompt', 'exec'].includes(item.OpenType) || (item.OpenType === 'funcbutton' && item.funcType === 'print')) {
        actions.push(item)
      }
    })
    if (config.components) {
      config.components[0].action.forEach(item => {
        if (['pop', 'prompt', 'exec'].includes(item.OpenType) || (item.OpenType === 'funcbutton' && item.funcType === 'print')) {
          actions.push(item)
        }
      })
    } else {
      config.action.forEach(item => {
        if (item.position !== 'toolbar') return
        if (['pop', 'prompt', 'exec'].includes(item.OpenType) || (item.OpenType === 'funcbutton' && item.funcType === 'print')) {
          actions.push(item)
        }
      })
    }
    this.setState({
      actions,
@@ -48,6 +56,7 @@
      this.setState({
        visible: false
      })
      this.props.updateConfig({...config, autoMatic: res})
    })
  }