diff --git a/spug_web/src/pages/exec/template/Form.js b/spug_web/src/pages/exec/template/Form.js index c67c9b5..aa40bfa 100644 --- a/spug_web/src/pages/exec/template/Form.js +++ b/spug_web/src/pages/exec/template/Form.js @@ -135,7 +135,7 @@ export default observer(function () { - info.host_ids = ids}/> + info.host_ids = ids}/> diff --git a/spug_web/src/pages/host/Selector.js b/spug_web/src/pages/host/Selector.js index ae6257e..54e233d 100644 --- a/spug_web/src/pages/host/Selector.js +++ b/spug_web/src/pages/host/Selector.js @@ -167,7 +167,7 @@ function HostSelector(props) { className={styles.modal} title={props.title || '主机列表'} onOk={handleSubmit} - okButtonProps={{disabled: selectedRowKeys.length === 0}} + okButtonProps={{disabled: selectedRowKeys.length === 0 && !props.nullable}} confirmLoading={loading} onCancel={handleClose}> @@ -231,6 +231,7 @@ HostSelector.defaultProps = { type: 'text', mode: 'ids', onlyOne: false, + nullable: false, onChange: () => null }