fix: 修复 IoT 物模型表单 Form.Item 嵌套字段 name 误用点号字符串,事件类型等校验始终失败 / resetFields 写错路径
parent
50ee691191
commit
228c5463da
|
|
@ -29,7 +29,10 @@ function handleChange(val: any) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Form.Item label="元素类型" name="property.dataSpecs.childDataType">
|
<Form.Item
|
||||||
|
:name="['property', 'dataSpecs', 'childDataType']"
|
||||||
|
label="元素类型"
|
||||||
|
>
|
||||||
<Radio.Group v-model:value="dataSpecs.childDataType" @change="handleChange">
|
<Radio.Group v-model:value="dataSpecs.childDataType" @change="handleChange">
|
||||||
<template v-for="item in getDataTypeOptions()" :key="item.value">
|
<template v-for="item in getDataTypeOptions()" :key="item.value">
|
||||||
<Radio
|
<Radio
|
||||||
|
|
@ -50,7 +53,7 @@ function handleChange(val: any) {
|
||||||
</template>
|
</template>
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="元素个数" name="property.dataSpecs.size">
|
<Form.Item :name="['property', 'dataSpecs', 'size']" label="元素个数">
|
||||||
<Input
|
<Input
|
||||||
v-model:value="dataSpecs.size"
|
v-model:value="dataSpecs.size"
|
||||||
placeholder="请输入数组中的元素个数"
|
placeholder="请输入数组中的元素个数"
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ watch(
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
:name="['event', 'type']"
|
||||||
:rules="[{ required: true, message: '请选择事件类型', trigger: 'change' }]"
|
:rules="[{ required: true, message: '请选择事件类型', trigger: 'change' }]"
|
||||||
label="事件类型"
|
label="事件类型"
|
||||||
name="event.type"
|
|
||||||
>
|
>
|
||||||
<Radio.Group v-model:value="thingModelEvent.type">
|
<Radio.Group v-model:value="thingModelEvent.type">
|
||||||
<Radio
|
<Radio
|
||||||
|
|
|
||||||
|
|
@ -154,8 +154,8 @@ watch(
|
||||||
<!-- 文本型配置 -->
|
<!-- 文本型配置 -->
|
||||||
<Form.Item
|
<Form.Item
|
||||||
v-if="property.dataType === IoTDataSpecsDataTypeEnum.TEXT"
|
v-if="property.dataType === IoTDataSpecsDataTypeEnum.TEXT"
|
||||||
|
:name="['property', 'dataSpecs', 'length']"
|
||||||
label="数据长度"
|
label="数据长度"
|
||||||
name="property.dataSpecs.length"
|
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
v-model:value="property.dataSpecs.length"
|
v-model:value="property.dataSpecs.length"
|
||||||
|
|
@ -189,8 +189,8 @@ watch(
|
||||||
/>
|
/>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
v-if="!isStructDataSpecs && !isParams"
|
v-if="!isStructDataSpecs && !isParams"
|
||||||
|
:name="['property', 'accessMode']"
|
||||||
label="读写类型"
|
label="读写类型"
|
||||||
name="property.accessMode"
|
|
||||||
>
|
>
|
||||||
<Radio.Group v-model:value="property.accessMode">
|
<Radio.Group v-model:value="property.accessMode">
|
||||||
<Radio
|
<Radio
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ watch(
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
:name="['service', 'callType']"
|
||||||
:rules="[{ required: true, message: '请选择调用方式', trigger: 'change' }]"
|
:rules="[{ required: true, message: '请选择调用方式', trigger: 'change' }]"
|
||||||
label="调用方式"
|
label="调用方式"
|
||||||
name="service.callType"
|
|
||||||
>
|
>
|
||||||
<Radio.Group v-model:value="service.callType">
|
<Radio.Group v-model:value="service.callType">
|
||||||
<Radio
|
<Radio
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue