大佬帮忙看下map对象的问题?

小程序 文章 2022-04-21 09:00 237 0 全屏看文

AI助手支持GPT4.0

大佬帮忙看下map对象的问题?Can you help me to look at the problem of the map object?

大佬帮忙看下map对象的问题?

因为没有多少js基础,不知道这个问题怎么解决。小程序中setData之后,map对象始终为空。打印控制台也没有问题,但是wxml用{{map.get()}}来渲染没有值

Because there is not much JS foundation, I don't know how to solve this problem. After SetData in the applet, the map object is always empty. There's no problem with the print console, but wxml renders with {{map. Get()}} and has no value

回答:

dreamhunter:

数据是异步拿到的吧,setdata要在异步完成时候。百度学习下异步处理吧

邹昌旺:柜
菜得安详:

解决了,但是没用map,还是希望大佬解答一下map的问题,谢谢

-EOF-

AI助手支持GPT4.0