title_id0001title_name左心房item_listitem_id1000101item_name12item_value122unitmmQML 查询里面的item_list
可以使用以下QML代码来查询item_list:
ListModel {
id: titleModel
ListElement {
title_id: "0001"
title_name: "左心房"
item_list: [
{item_id: "1000101", item_name: "12", item_value: 12.2, unit: "mm"}
]
}
}
// 查询item_list
var itemList = titleModel.get(0).item_list;
console.log(itemList);
这里使用了一个ListModel来存储数据,然后通过get()方法获取第一个元素的item_list属性,即可得到该列表的内容。
原文地址: https://www.cveoy.top/t/topic/e24J 著作权归作者所有。请勿转载和采集!