From 418d1f6ef7504d77345fcc0979190aa9be4580cf Mon Sep 17 00:00:00 2001 From: vapao Date: Mon, 13 Mar 2023 17:44:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=89=A7=E8=A1=8C=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=8F=AF=E5=8F=96=E6=B6=88=E5=B7=B2=E9=80=89=E6=8B=A9?= =?UTF-8?q?=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 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 }