Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

AtButton 无法绑定微信的 getUserInfo #56

Closed
whyour opened this issue Oct 28, 2020 · 1 comment
Closed

AtButton 无法绑定微信的 getUserInfo #56

whyour opened this issue Oct 28, 2020 · 1 comment
Labels
bug Something isn't working 小程序 All issues related to 小程序

Comments

@whyour
Copy link

whyour commented Oct 28, 2020

问题描述

AtButton 无法绑定微信的 getUserInfo

版本信息

v1.0.0-alpha.12

涉及的平台

weapp

错误信息

代码

<at-button
  type="primary"
  class="login-btn"
  open-type="getUserInfo"
  @getuserinfo="onGotUserInfo"
>
  微信登录
</at-button>
@b2nil b2nil added bug Something isn't working 小程序 All issues related to 小程序 labels Oct 28, 2020
@b2nil b2nil added this to the v1.0.0-alpha.13 milestone Oct 28, 2020
@b2nil
Copy link
Owner

b2nil commented Oct 28, 2020

这个组件在重写的时候没修改事件监听的写法,下个版本修改过来。

const miniAppButton = h(Button, {
      class: 'at-button__wxbutton',
      formType: props.formType,
      openType: props.openType,
      lang: props.lang,
      sessionFrom: props.sessionFrom,
      sendMessageTitle: props.sendMessageTitle,
      sendMessagePath: props.sendMessagePath,
      sendMessageImg: props.sendMessageImg,
      showMessageCard: props.showMessageCard,
      appParameter: props.appParameter,
      ...{ on: getWxButtonProps() }  // 应改为: `on${eventName}`: eventHandler
    })

@b2nil b2nil closed this as completed Oct 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working 小程序 All issues related to 小程序
Projects
None yet
Development

No branches or pull requests

2 participants