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