Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0afa0bb1
authored
Feb 20, 2025
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【缺陷修复】IoT: 物模型编辑已经添加的结构体,里面的参数加不上
parent
4f1c79ba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/views/iot/thingmodel/dataSpecs/ThingModelStructDataSpecs.vue
+7
-4
No files found.
src/views/iot/thingmodel/dataSpecs/ThingModelStructDataSpecs.vue
View file @
0afa0bb1
...
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment