button中带图片 setdata后第一次正常,后面在执行就不正常了?

发布于 7 年前作者 jxiong3843 次浏览最后编辑 7 年前来自 ask
<button class="kaituan" open-type="getUserInfo" bindgetuserinfo="getUserInfo" data-url="wo" class="touxiang">
  <image src="{{url}}" class="touxiang"></image>
 </button>

在setData({

url:‘xxxx.jpg’

}) 执行后,第一次正常,如果这个时候再次点击按钮,执行setdata

url的值就为空了… 请官方检查下

 

2 回复
jieliao
jieliao1 楼5 年前

麻烦提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。