为什么在promise或则callback里通过setdata无法刷新swiper-item的内容?

微信问答 文章 2021-12-03 10:20 400 0 全屏看文

AI助手支持GPT4.0

为什么在promise或则callback里通过setdata无法刷新swiper-item的内容?Why can't I refresh the content of swiper-item through setdata in promise or callback?

为什么在promise或则callback里通过setdata无法刷新swiper-item的内容?

最近遇到很奇怪的一个现象,在promise或callback里是无法通过setdata有效刷新swiper-item 的显示内容的。比如我需要在服务器通过异步获取一些url,然后通过setdata更新到与swiper-item相关的array中,然后你会发现,在promis或callback里无论通过怎样形式的setdata都是没效果的,在此外却可以正常刷新,请问这是问什么?是异步闭包的问题?不应该啊~其他组件的更新都一切正常,唯独swiper-item不行!谁能教教我?急急急急急急!!!感谢!

Recently, I encountered a strange phenomenon. In promise or callback, it is impossible to effectively refresh the display content of swiper item through SetData. For example, I need to get some URLs asynchronously on the server, and then update them to the array related to swiper item through SetData. Then you will find that no matter what form of SetData is used in promise or callback, it can be refreshed normally. What is this? Is it an asynchronous closure problem? No, the updates of other components are normal, except for the wiper item! Who can teach me? Urgent, urgent, urgent!!! thank!

鍥炵瓟锛�

八九:

排查下作用域

任性༄:

this的作用域问题?

武曲心:

没遇到过这问题,贴出你的代码和数据结构看看

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
微信网站授权登录成功后为什么没有城市省份国家等信息呢?
微信商户平台收入需要交税吗?
我的小程序为什么搜索不到?
可以检测到视频播放完成吗?
为什么tabbar list里面不能超过5个,多角色场景怎么处理?
随便看看
老爷子收到了057128256416的电话号码 3113
阿里云com、cn域名续费优惠码(2020年3月可用) 2863
线上防疫题库正确答案 2932
线上防疫题库正确答案(多选题) 4825
微信设置不可以使用小程序(游戏小程序) 5636
adsense申请已经支付的订单回退的网址 3212
BT面板查看网站入口、账号密码的命令 6009
ucloud海外服务器超级优惠券 3274
根据您的消费情况,您的延停权益已发生变化,变更后的延停权益为延停额度20.00元 5831
为什么我们喜欢迈克尔杰克逊。 4164