除了按钮, 还有其他组件响应bindgetuserinfo?

除了按钮, 还有其他组件响应bindgetuserinfo?

咱们的样例代码是用view的, 但是,

  • view是不能唤起这个事件响应的,
  • button是可以的,

但是, 咱们的button设置了一堆的默认样式, 甚至于margin: 0 auto, 这样导致, 每次使用button要搞一大堆css.

所以, 我的疑问是, 咱们还有其他组件可以响应这个事件handle吗?

<button open-type="getUserInfo" bindgetuserinfo="onGetUserInfo" class="userinfo" size="default">          <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>            {{userInfo.nickName}}


  • 就是说, 这里的这个</button> 标签, 还能换成什么?

Our sample code uses view. However, view can't evoke this event response. Button is OK. However, our button has set a lot of default styles, even margin: 0 auto. As a result, a lot of CSS will be needed every time we use button, Do we have any other components that can respond to this event handle? < button open type = "getUserInfo" bindituserinfo = "ongetuserinfo" class = "userinfo" size = "default" > < image bindmap = "bindviewtap" class = "userinfo Avatar" SRC = "{{ userInfo.avatarUrl }}" mode="cover"> {{ userInfo.nickName }}That is to say, the < / button > tag here, What else?

回答:

圣殿骑士:

不能,官方文档的规矩

可以写一个class,统一清btn的样式

-EOF-