fix:【IoT 物联网】场景联动首次添加条件失败的 bug

This commit is contained in:
puhui999
2025-08-02 11:22:10 +08:00
parent cb52fbe71e
commit 32ce19fcd8
3 changed files with 26 additions and 13 deletions

View File

@ -153,11 +153,17 @@ const addSubGroup = () => {
container.value = []
}
if (container.value.length >= maxSubGroups) {
// 检查是否达到最大子组数量限制
if (container.value?.length >= maxSubGroups) {
return
}
container.value.push([])
// 使用 nextTick 确保响应式更新完成后再添加新的子组
nextTick(() => {
if (container.value) {
container.value.push([])
}
})
}
const removeSubGroup = (index: number) => {