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 f2ab447..c424352 100644 --- a/spug_web/src/pages/host/Selector.js +++ b/spug_web/src/pages/host/Selector.js @@ -146,7 +146,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}> @@ -209,6 +209,7 @@ HostSelector.defaultProps = { value: [], type: 'text', mode: 'ids', + nullable: false, onChange: () => null }