| | |
| | | const { config } = this.props |
| | | let actions = [] |
| | | |
| | | 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, |
| | |
| | | this.setState({ |
| | | visible: false |
| | | }) |
| | | |
| | | this.props.updateConfig({...config, autoMatic: res}) |
| | | }) |
| | | } |