求大佬帮帮,微信小程序一次性上传多张图片之后,怎么只渲染生成第一张图片?

小程序 文章 2022-02-21 15:00 301 0 全屏看文

AI助手支持GPT4.0

求大佬帮帮,微信小程序一次性上传多张图片之后,怎么只渲染生成第一张图片?Please help me, how can I only render the first image after uploading multiple images at one time in the WeChat applet?

求大佬帮帮,微信小程序一次性上传多张图片之后,怎么只渲染生成第一张图片?

我现在这个会把每个图片都渲染到首页,我想要只渲染第一张,求大佬帮帮,十分感谢


Now I will render every picture to the home page. I want to render only the first one. Please help me. Thank you very much

回答:

不平:

不用wx:for

圣殿骑士:

你for循环,当然是渲染所有的

你可以写判断 array[0]

微喵网络:

只渲染第一个就不要用wx:for,直接在wxml中渲染图片数组第一项就行

-EOF-

AI助手支持GPT4.0