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

微信问答 文章 2021-12-03 10:20 309 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群

相关文章
小程序注册好没来得及用,现在被封禁了,我要怎么办?
微信公众号后台内容分析全部显示没有数据是怎么回事?
关于物力返回事件开发思路?
一个没有绑定域名的IP地址,在微信里访问时没有出现提示页?
为什么tabbar list里面不能超过5个,多角色场景怎么处理?
随便看看
教育科技公司申请微信支付被拒绝? 3866
微信公众号免300认证教程 4964
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4083
小程序广告组件通过审核,但是小程序内没有显示广告? 4161
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8041
问题? 7265
如何快速搭建抽奖助手小程序(无需代码知识) 5048
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6006
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5519
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5216