设置button的type、size和plain属性的代码

  1. <view style='padding:20px;'>
  2. <view class='button-group'>
  3. <!-- size 为default默认大小 -->
  4. <button type="default">default</button>
  5. <button type="primary">default</button>
  6. <button type="warn">default</button>
  7. </view>
  8. <view class='button-group'>
  9. <!-- 设置为镂空按钮 -->
  10. <button type="default" plain>default</button>
  11. <button type="primary" plain>default</button>
  12. <button type="warn" plain>default</button>
  13. </view>
  14. <view class='button-group'>
  15. <!-- size 为mini小尺寸大小 -->
  16. <button type="default" size="mini">default</button>
  17. <button type="primary" size="mini">default</button>
  18. <button type="warn" size="mini">default</button>
  19. </view>
  20. </view>

image.png