view 组件使用
最基本的视图组件,通过wxss
样式调整,可以实现视图的摆放。
button 组件使用
button
组件是常用的组件,有些特定功能是需要button
的 open-type
进行标识,才能使用微信开放能力。
基本示例,在 wxml
文件中编写组件:
<view class="page-body">
<view class="btn-area" id="buttonContainer">
<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 组件官方文档
更多组件使用请查看 官方文档