From 393e36e0cfcd9812c307e6e9d34dde61f405eb21 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 29 Mar 2023 18:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=B9=E9=87=8F=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=A8=A1=E6=9D=BF=E5=8F=AF=E5=8F=96=E6=B6=88=E5=B7=B2?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=9A=84=E4=B8=BB=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/exec/template/Form.js | 2 +- spug_web/src/pages/host/Selector.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 }