button
按钮。
button属性
注
- :button-hover 默认为{background-color: rgba(0, 0, 0, 0.1); opacity: 0.7;}
- :bindgetphonenumber 从1.2.0 开始支持,但是在1.5.3以下版本中无法使用wx.canIUse进行检测,建议使用基础库版本进行判断。
- :在bindgetphonenumber 等返回加密信息的回调中调用 wx.login 登录,可能会刷新登录态。此时服务器使用 code 换取的 sessionKey 不是加密时使用的 sessionKey,导致解密失败。建议开发者提前进行
login;或者在回调中先使用 checkSession 进行登录态检查,避免 login 刷新登录态。- :从 2.1.0 起,button 可作为原生组件的子节点嵌入,以便在原生组件上使用 open-type 的能力