view 组件使用

最基本的视图组件,通过wxss样式调整,可以实现视图的摆放。

view 组件官方文档

button 组件使用



button组件是常用的组件,有些特定功能是需要buttonopen-type进行标识,才能使用微信开放能力。

基本示例,在 wxml文件中编写组件:

<view class="page-body">
  <view class="btn-area" >
    <button type="primary" open-type="share">页面主操作 Normal</button>
    <button type="primary" loading="true">页面主操作 Loading</button>
    <button type="primary" disabled="true">页面主操作 Disabled</button>

    <button type="default" bindtap="onDefaultButtonClick">页面次要操作 Normal</button>
    <button type="default" disabled="true">页面次要操作 Disabled</button>

    <button type="warn">警告类操作 Normal</button>
    <button type="warn" disabled="true">警告类操作 Disabled</button>

  </view>
</view>

按钮点击:bindtap
按钮大小:size
按钮样式:type
按钮是否可用:disabled

更多button属性的使用,请查看官方 button 组件官方文档

更多组件使用请查看 官方文档

相关文章:

  • 2021-06-16
  • 2022-12-23
  • 2021-08-21
  • 2021-12-07
  • 2022-12-23
  • 2022-01-15
猜你喜欢
  • 2021-08-14
  • 2021-09-20
  • 2021-10-06
  • 2021-12-23
  • 2021-09-19
相关资源
相似解决方案