File tree Expand file tree Collapse file tree 3 files changed +24
-9
lines changed Expand file tree Collapse file tree 3 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 117
117
<el-col :span =" 12" />
118
118
<el-col v-if =" !typesWithoutMaxConnectionRate.includes(listenerRecord.type)" :span =" 12" >
119
119
<el-form-item :label =" t('Gateway.maxConnRate')" prop =" max_conn_rate" >
120
- <InputWithUnit
120
+ <Oneof
121
+ class =" in-one-row"
121
122
v-model =" listenerRecord.max_conn_rate"
122
- :units =" [{ label: `/${t('Base.second')}`, value: '/s ' }]"
123
+ :items =" [{ type: 'rate' }, { symbols: [INFINITY_VALUE], type: 'enum ' }]"
123
124
/>
124
125
</el-form-item >
125
126
</el-col >
126
127
<el-col :span =" 12" >
127
128
<el-form-item :label =" t('Gateway.maxMsgPubRate')" prop =" messages_rate" >
128
- <InputWithUnit
129
+ <Oneof
130
+ class =" in-one-row"
129
131
v-model =" listenerRecord.messages_rate"
130
- :units =" [{ label: `/${t('Base.second')}`, value: '/s ' }]"
132
+ :items =" [{ type: 'rate' }, { symbols: [INFINITY_VALUE], type: 'enum ' }]"
131
133
/>
132
134
</el-form-item >
133
135
</el-col >
134
136
<el-col :span =" 12" >
135
137
<el-form-item :label =" t('Gateway.maxMsgPubTraffic')" prop =" bytes_rate" >
136
- <InputWithUnit
138
+ <Oneof
139
+ class =" in-one-row"
137
140
v-model =" listenerRecord.bytes_rate"
138
- :units =" [
139
- { label: `MB/${t('Base.second')}`, value: 'MB/s' },
140
- { label: `KB/${t('Base.second')}`, value: 'KB/s' },
141
+ :items =" [
142
+ {
143
+ type: 'rate',
144
+ units: [
145
+ { label: `MB/${t('Base.second')}`, value: 'MB/s' },
146
+ { label: `KB/${t('Base.second')}`, value: 'KB/s' },
147
+ ],
148
+ },
149
+ { symbols: [INFINITY_VALUE], type: 'enum' },
141
150
]"
142
151
/>
143
152
</el-form-item >
Original file line number Diff line number Diff line change 63
63
:disabled =" disabled"
64
64
:units =" ['MB', 'GB', 'KB', 'B']"
65
65
/>
66
+ <input-with-unit
67
+ v-else-if =" oneOfInfo.propEnabled.type === 'rate'"
68
+ v-model =" valueProxy"
69
+ :disabled =" disabled"
70
+ :units =" oneOfInfo.propEnabled.units ?? [{ label: `/${$t('Base.second')}`, value: '/s' }]"
71
+ />
66
72
<el-input
67
73
v-model =" valueProxy"
68
74
v-else-if =" oneOfInfo.propEnabled.type === 'ip_port'"
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ const SchemaForm = defineComponent({
173
173
props . needRules ,
174
174
)
175
175
176
- const { createInitValueByType , initRecordByComponents } = useSchemaRecord ( )
176
+ const { initRecordByComponents } = useSchemaRecord ( )
177
177
178
178
let formEle : any = null
179
179
You can’t perform that action at this time.
0 commit comments