button.wxml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <import src="../../../common/head.wxml" />
  2. <import src="../../../common/foot.wxml" />
  3. <view class="container page" data-weui-theme="{{theme}}">
  4. <template is="head" data="{{title: 'button'}}"/>
  5. <view class="page-body">
  6. <view class="btn-area" id="buttonContainer">
  7. <button type="primary">页面主操作 Normal</button>
  8. <button type="primary" loading="true">页面主操作 Loading</button>
  9. <button type="primary" disabled="true">页面主操作 Disabled</button>
  10. <button type="default">页面次要操作 Normal</button>
  11. <button type="default" disabled="true">页面次要操作 Disabled</button>
  12. <button type="warn">警告类操作 Normal</button>
  13. <button type="warn" disabled="true">警告类操作 Disabled</button>
  14. <view class="button-sp-area">
  15. <button type="primary" plain="true">按钮</button>
  16. <button type="primary" disabled="true" plain="true">不可点击的按钮</button>
  17. <button type="default" plain="true">按钮</button>
  18. <button type="default" disabled="true" plain="true">按钮</button>
  19. <button class="mini-btn" type="primary" size="mini">按钮</button>
  20. <button class="mini-btn" type="default" size="mini">按钮</button>
  21. <button class="mini-btn" type="warn" size="mini">按钮</button>
  22. </view>
  23. <button type="primary" open-type="contact" bindcontact="handleContact" show-message-card="{{true}}" send-message-title="临时会话">打开客服会话</button>
  24. <button type="primary" open-type="share">触发用户转发</button>
  25. <button type="primary" open-type="getPhoneNumber" bindgetphonenumber="handleGetPhoneNumber">获取用户手机号</button>
  26. <button wx:if="{{canIUseGetUserProfile}}" type="primary" lang="zh_CN" bindtap="handleGetUserProfile"> 获取用户信息 </button>
  27. <button wx:else type="primary" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="handleGetUserInfo">获取用户信息</button>
  28. <button type="primary" open-type="openSetting" bindopensetting="handleOpenSetting">打开设置授权页</button>
  29. <button type="primary" open-type="feedback">打开意见反馈</button>
  30. </view>
  31. </view>
  32. <template is="foot" />
  33. </view>