We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59062a1 commit 38f0affCopy full SHA for 38f0aff
src/views/iot/rule/databridge/IoTDataBridgeForm.vue
@@ -22,7 +22,7 @@
22
</el-radio-group>
23
</el-form-item>
24
<el-form-item label="桥梁类型" prop="type">
25
- <el-radio-group v-model="formData.type">
+ <el-radio-group :model-value="formData.type" @change="handleTypeChange">
26
<el-radio
27
v-for="dict in getIntDictOptions(DICT_TYPE.IOT_DATA_BRIDGE_TYPE_ENUM)"
28
:key="dict.value"
@@ -185,6 +185,13 @@ const submitForm = async () => {
185
}
186
187
188
+/** 处理类型切换事件 */
189
+const handleTypeChange = (val: number) => {
190
+ formData.value.type = val
191
+ // 切换类型时重置配置
192
+ formData.value.config = {} as any
193
+}
194
+
195
/** 重置表单 */
196
const resetForm = () => {
197
formData.value = {
0 commit comments