【缺陷修复】IoT: 物模型编辑已经添加的结构体,里面的参数加不上

This commit is contained in:
puhui999 2025-02-20 16:57:35 +08:00
parent 4f1c79ba6d
commit 0afa0bb165

View File

@ -5,7 +5,6 @@
:rules="[{ required: true, validator: validateList, trigger: 'change' }]"
label="JSON 对象"
>
<!-- TODO @puhui999编辑已经添加的结构体里面的参数加不上 -->
<div
v-for="(item, index) in dataSpecsList"
:key="index"
@ -118,9 +117,6 @@ const submitForm = async () => {
}
// identifier
if (isEmpty(dataSpecsList.value)) {
dataSpecsList.value = []
}
const existingIndex = dataSpecsList.value.findIndex(
(spec) => spec.identifier === data.identifier
)
@ -158,6 +154,13 @@ const validateList = (_: any, __: any, callback: any) => {
}
callback()
}
/** 组件初始化 */
onMounted(async () => {
await nextTick()
// dataSpecsList
isEmpty(dataSpecsList.value) && (dataSpecsList.value = [])
})
</script>
<style lang="scss" scoped>