Skip to content

Commit 01f8c72

Browse files
authored
[fix] Fix handler required problem (#525)
* [type:fix] fix handler required flag * [type:fix] fix handler required flag * [type:fix] fix handler required flag
1 parent 60b8f21 commit 01f8c72

File tree

9 files changed

+30
-20
lines changed

9 files changed

+30
-20
lines changed

src/locales/en-US.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
"SHENYU.COMMON.INPUTMATCHTYPE": "MatchMode",
3939
"SHENYU.COMMON.CONDITION": "Conditions",
4040
"SHENYU.COMMON.DEAL": "Handler",
41+
"SHENYU.COMMON.DEAL.COMPONENT": "Component Handler",
42+
"SHENYU.COMMON.DEAL.CUSTOM": "Custom Handler",
4143
"SHENYU.COMMON.SETTING": "Configuration",
4244
"SHENYU.COMMON.YES": "YES",
4345
"SHENYU.COMMON.NO": "NO",

src/locales/zh-CN.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"SHENYU.COMMON.INPUTMATCHTYPE": "请选择匹配方式",
3838
"SHENYU.COMMON.CONDITION": "条件",
3939
"SHENYU.COMMON.DEAL": "处理",
40+
"SHENYU.COMMON.DEAL.COMPONENT": "组件处理",
41+
"SHENYU.COMMON.DEAL.CUSTOM": "自定义处理",
4042
"SHENYU.COMMON.SETTING": "配置",
4143
"SHENYU.COMMON.YES": "",
4244
"SHENYU.COMMON.NO": "",

src/routes/Plugin/Common/CommonRuleHandle.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ const { Option } = Select;
2626

2727
const formItemLayout = {
2828
labelCol: {
29-
sm: { span: 3 },
29+
sm: { span: 4 },
3030
},
3131
wrapperCol: {
32-
sm: { span: 21 },
32+
sm: { span: 20 },
3333
},
3434
};
3535

@@ -46,7 +46,8 @@ export default class CommonRuleHandle extends Component {
4646
const { getFieldDecorator, getFieldValue } = form;
4747
return (
4848
<FormItem
49-
label={getIntlContent("SHENYU.COMMON.DEAL")}
49+
required={true}
50+
label={getIntlContent("SHENYU.COMMON.DEAL.CUSTOM")}
5051
{...formItemLayout}
5152
className={styles.rootFormItem}
5253
>

src/routes/Plugin/Common/Rule.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,10 @@ class AddModal extends Component {
509509
const { getFieldDecorator } = form;
510510
const formItemLayout = {
511511
labelCol: {
512-
sm: { span: 3 },
512+
sm: { span: 4 },
513513
},
514514
wrapperCol: {
515-
sm: { span: 21 },
515+
sm: { span: 20 },
516516
},
517517
};
518518
const formCheckLayout = {

src/routes/Plugin/PluginRuleHandle/GeneralContextRuleHandle.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ export default class GeneralContextRuleHandle extends Component {
111111

112112
return (
113113
<FormItem
114-
label={getIntlContent("SHENYU.COMMON.DEAL")}
115-
labelCol={{ span: 3 }}
116-
wrapperCol={{ span: 21 }}
114+
required={true}
115+
label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
116+
labelCol={{ span: 4 }}
117+
wrapperCol={{ span: 20 }}
117118
className={styles.rootFormItem}
118119
>
119120
<Tabs defaultActiveKey={currentType} onChange={this.handleTabChange}>

src/routes/Plugin/PluginRuleHandle/HystrixRuleHandle.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ export default class HystrixRuleHandle extends Component {
165165
} = this.state;
166166
const formItemLayout = {
167167
labelCol: {
168-
sm: { span: 3 },
168+
sm: { span: 4 },
169169
},
170170
wrapperCol: {
171-
sm: { span: 21 },
171+
sm: { span: 20 },
172172
},
173173
};
174174
// eslint-disable-next-line
@@ -203,7 +203,8 @@ export default class HystrixRuleHandle extends Component {
203203
)}
204204
</FormItem>
205205
<FormItem
206-
label={getIntlContent("SHENYU.COMMON.DEAL")}
206+
required={true}
207+
label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
207208
{...formItemLayout}
208209
>
209210
<div className={styles.handleWrap} style={{ marginTop: 0 }}>

src/routes/Plugin/PluginRuleHandle/ParamPluginRuleHandle.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,10 @@ export default class ParamPluginRuleHandle extends Component {
326326

327327
return (
328328
<Form.Item
329-
label={getIntlContent("SHENYU.COMMON.DEAL")}
330-
labelCol={{ span: 3 }}
331-
wrapperCol={{ span: 21 }}
329+
required={true}
330+
label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
331+
labelCol={{ span: 4 }}
332+
wrapperCol={{ span: 20 }}
332333
>
333334
{getFieldDecorator("handle", {
334335
initialValue: handle,

src/routes/Plugin/PluginRuleHandle/RequestRuleHandle.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,10 @@ export default class RequestRuleHandle extends Component {
415415
const rowStyle = { display: "flex", alignItems: "center" };
416416
return (
417417
<FormItem
418-
label={getIntlContent("SHENYU.COMMON.DEAL")}
419-
labelCol={{ span: 3 }}
420-
wrapperCol={{ span: 21 }}
418+
required={true}
419+
label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
420+
labelCol={{ span: 4 }}
421+
wrapperCol={{ span: 20 }}
421422
className={styles.rootFormItem}
422423
>
423424
<Tabs defaultActiveKey={currentType} onChange={this.handleTabChange}>

src/routes/Plugin/PluginRuleHandle/ResponseRuleHandle.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,10 @@ export default class ResponseRuleHandle extends Component {
423423

424424
return (
425425
<Form.Item
426-
label={getIntlContent("SHENYU.COMMON.DEAL")}
427-
labelCol={{ span: 3 }}
428-
wrapperCol={{ span: 21 }}
426+
required={true}
427+
label={getIntlContent("SHENYU.COMMON.DEAL.COMPONENT")}
428+
labelCol={{ span: 4 }}
429+
wrapperCol={{ span: 20 }}
429430
>
430431
{getFieldDecorator("handle", {
431432
initialValue: handle,

0 commit comments

Comments
 (0)