mirror of
https://github.com/yudaocode/yudao-ui-admin-vue3.git
synced 2026-05-13 21:36:39 +00:00
【代码优化】IoT: 物模型
This commit is contained in:
@@ -4,15 +4,15 @@
|
||||
<el-radio-group v-model="dataSpecs.childDataType" @change="handleChange">
|
||||
<template v-for="item in dataTypeOptions" :key="item.value">
|
||||
<el-radio
|
||||
class="w-1/3"
|
||||
v-if="
|
||||
!(
|
||||
[DataSpecsDataType.ENUM, DataSpecsDataType.ARRAY, DataSpecsDataType.DATE] as any[]
|
||||
).includes(item.value)
|
||||
"
|
||||
:value="item.value"
|
||||
class="w-1/3"
|
||||
>
|
||||
{{ item.label }}
|
||||
{{ `${item.value}(${item.label})` }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
|
||||
@@ -118,6 +118,9 @@ const submitForm = async () => {
|
||||
}
|
||||
|
||||
// 查找是否已有相同 identifier 的项
|
||||
if (isEmpty(dataSpecsList.value)) {
|
||||
dataSpecsList.value = []
|
||||
}
|
||||
const existingIndex = dataSpecsList.value.findIndex(
|
||||
(spec) => spec.identifier === data.identifier
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user