button中的文字使用setdata无法修改

发布于 7 年前作者 lei4015520 次浏览最后编辑 7 年前来自 ask

<button class=‘txt’ style=‘background: rgba(255, 255, 255, 255);padding:0px 20px 0px 25px;’ bindtap=“sayfocus”>{{say}}</button>

sayfocus:function(e)

{

var that = this;

that.setData(

{say:“haha”}

)

},

当中的{{say}}在开发环境显示没问题,到手机上就没效果了

3 回复
xiongxiuying
xiongxiuying1 楼6 年前

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

lilong
lilong2 楼6 年前

谢谢大家

kdai
kdai3 楼5 年前

报错了吧,最后为啥是逗号?