标签:nbsp pre his clu name key 初始化 for ons
1.初始化
resultMap: {
"near": [],
"join": [],
"publish": []
}
2.js中直接取
const val = this.data.apiMap[key];
3.页面取值
wx:for="{{resultMap.near}}"
4.赋值
let key = "resultMap." + keyName;
this.setData({[key]: newList});
来源:湖北网站优化
标签:nbsp pre his clu name key 初始化 for ons
原文地址:https://www.cnblogs.com/1994july/p/12080419.html