小游戏demo程序和自己创建的白版程序
用下面代码
var button = wx.createUserInfoButton({ type: 'text' , text: '获取用户信息' , style: { left: 0, top: 0, width: 200, height: 200, lineHeight: 200, backgroundColor: '#000000' , color: '#000000' , textAlign: 'center' , fontSize: 16, borderRadius: 4 } }) button.onTap((res) => { console.log(res) }) button.show() |
没有显示出按钮
console.log(button) |
打印出button后 查看
text:[Exception: ReferenceError: value is not defined at t.get [as text] (http://127.0.0.1:51637/game/__dev__/WAGame.js:14:4761) at t.remoteFunction (<anonymous>:2:26)]
我怎么调试这次的用户授权更新的公告。
@13楼,真机上显示不出来,是不是button的style的问题,看看位置和颜色是不是设置透明了
开发者工具上暂不支持调试这个按钮,请使用最新版微信进行调试
试了,真机上也显示不出来
https://mp.weixin.qq.com/s/yD5G_XH9GiVUrZZnEZA-Ug可以关注下这个文章的公众号,过段时间可能做踩坑分享
不知道开发文档写写给谁看的,例子用了也不行,也不说清楚到底应该怎么用
官方能帮解答一下吗?在小游戏中 怎么显示UserInfoButton?
右边调试基础库2.0.2,就不会包这个错,但是按钮怎么都出不来,加我qq1291940886
一样的问题啊,怎么解决
大家都没问题吗?