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});
来源:湖北网站优化
原文地址:https://www.cnblogs.com/1994july/p/12080419.html
时间: 2024-10-09 19:51:29