Commit 2ea7f851 authored by wenmo's avatar wenmo

[Fix-299] [web] Fix to DingTalk form does not display correctly

parent 3092f185
...@@ -43,7 +43,7 @@ const DingTalkForm: React.FC<AlertInstanceFormProps> = (props) => { ...@@ -43,7 +43,7 @@ const DingTalkForm: React.FC<AlertInstanceFormProps> = (props) => {
handleSubmit(buildJSONData(formVals,fieldsValue)); handleSubmit(buildJSONData(formVals,fieldsValue));
}; };
const renderContent = () => { const renderContent = (vals) => {
return ( return (
<> <>
<Divider>钉钉配置</Divider> <Divider>钉钉配置</Divider>
...@@ -77,9 +77,9 @@ const DingTalkForm: React.FC<AlertInstanceFormProps> = (props) => { ...@@ -77,9 +77,9 @@ const DingTalkForm: React.FC<AlertInstanceFormProps> = (props) => {
name="isEnableProxy" name="isEnableProxy"
label="开启代理"> label="开启代理">
<Switch checkedChildren="是" unCheckedChildren="否" <Switch checkedChildren="是" unCheckedChildren="否"
defaultChecked={formVals.isEnableProxy}/> defaultChecked={vals.isEnableProxy}/>
</Form.Item> </Form.Item>
{formVals.isEnableProxy?<> {vals.isEnableProxy?<>
<Form.Item <Form.Item
name="proxy" name="proxy"
label="代理" label="代理"
...@@ -109,13 +109,13 @@ const DingTalkForm: React.FC<AlertInstanceFormProps> = (props) => { ...@@ -109,13 +109,13 @@ const DingTalkForm: React.FC<AlertInstanceFormProps> = (props) => {
name="isAtAll" name="isAtAll"
label="@所有人"> label="@所有人">
<Switch checkedChildren="启用" unCheckedChildren="禁用" <Switch checkedChildren="启用" unCheckedChildren="禁用"
defaultChecked={formVals.isAtAll}/> defaultChecked={vals.isAtAll}/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name="enabled" name="enabled"
label="是否启用"> label="是否启用">
<Switch checkedChildren="启用" unCheckedChildren="禁用" <Switch checkedChildren="启用" unCheckedChildren="禁用"
defaultChecked={formVals.enabled}/> defaultChecked={vals.enabled}/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name="msgtype" name="msgtype"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment