如果要从附件组件存储的json中获取docID、fileID等信息,需要对json传进行解析
js中参考如下:
var data = this.comp("mainData"); var fFJ = data.getValue("fFJ"); var jsonList = eval("(" + fFJ + ")"); if (jsonList.length > 0) { for (var i = 0; i < jsonList.length; i++) { var docID = jsonList[i]["docID"]; var fileID = jsonList[i]["fileID"]; } }
评一波