本人小白一名,看着开发文档做的。希望有大神能指点一二。谢谢,下面放上代码截图。
做了一个图片放大预览的小段代码,一直提示Object。是怎么回事?I made a small piece of code for zooming in and previewing the picture, always prompting Object. what's going on?
做了一个图片放大预览的小段代码,一直提示Object。是怎么回事?本人小白一名,看着开发文档做的。希望有大神能指点一二。谢谢,下面放上代码截图。
I Xiaobai a, looking at the development document to do. I hope there is a great God to give some advice. Thank you. Here is a screenshot of the code.
回答:
你的错误很多
1.abc需要是数组格式的
2.data-*自定义属性获取的urls是个文件地址不是list数组
3.abc在data中是一个字符串类型的变量 在wxml内直接{{}}绑定到image的src里面就行 不能wx:for循环
多看下文档还是有好处的
https://developers.weixin.qq.com/miniprogram/deveference/wxml/list.html
https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.previewImage.html
确认一下是不是数组呢
abc都不是数组呀