微信小程序 button按钮 image图片
语法
<!--pages/page/mybutton/btn.wxml--> <view>---通过type指定按钮类型---</view> <button>普通按钮</button> <button type="primary" >主色调按钮</button> <button type="warn">警告按钮</button> <view>---小尺寸按钮---</view> <view> <button size="mini">普通按钮</button> <button type="primary" size="mini">主色调按钮</button> <button type="warn" size="mini" >警告按钮</button> </view> <view>---镂空按钮---</view> <button plain>普通按钮</button> <button type="primary" plain>主色调按钮</button> <button type="warn" plain>警告按钮</button> <view>---状态---</view> <button loading>普通按钮</button> <button type="primary" loading>主色调按钮</button> <button type="warn" loading disabled>被禁用的loding中的警告按钮</button>
常用属性
语法
<image src="/pages/static/images/test.png"></image>
常用属性
mode合法值:
注意事项
-
支持 JPG、PNG、SVG、WEBP、GIF 等格式,2.3.0 起支持云文件ID image组件默认宽度320px、高度240px image组件中二维码/小程序码图片不支持长按识别。仅在 wx.previewImage 中支持长按识别
上一篇:
uniapp开发微信小程序-2.页面制作
下一篇:
制作一个人物介绍界面