相关文档:https://uniapp.dcloud.io/component/button

示例:

  1. <template>
  2. <view>
  3. <view class="uni-padding-wrap uni-common-mt">
  4. <button type="primary">页面主操作 Normal</button>
  5. <button type="primary" loading="true">页面主操作 Loading</button>
  6. <button type="primary" disabled="true">页面主操作 Disabled</button>
  7. <button type="default">页面次要操作 Normal</button>
  8. <button type="default" disabled="true">页面次要操作 Disabled</button>
  9. <button type="warn">警告类操作 Normal</button>
  10. <button type="warn" disabled="true">警告类操作 Disabled</button>
  11. <view class="button-sp-area">
  12. <button type="primary" plain="true">按钮</button>
  13. <button type="primary" disabled="true" plain="true">不可点击的按钮</button>
  14. <button type="default" plain="true">按钮</button>
  15. <button type="default" disabled="true" plain="true">按钮</button>
  16. <button class="mini-btn" type="primary" size="mini">按钮</button>
  17. <button class="mini-btn" type="default" size="mini">按钮</button>
  18. <button class="mini-btn" type="warn" size="mini">按钮</button>
  19. </view>
  20. </view>
  21. </view>
  22. </template>