May 20, 2021 WeChat Mini Program Development Document
A number or status marker that appears near a button, icon, or icon.
{
"usingComponents": {
"mp-cells": "../components/cells/cells",
"mp-cell": "../components/cell/cell",
"mp-badge": "../components/badge/badge"
}
}
For multiple photo presentations, similar to native wx.previewImage displays.
{
"usingComponents": {
"mp-gallery": "../components/gallery/gallery"
}
}
The loading effect when the data is loaded
{
"usingComponents": {
"mp-loading": "../components/loading/loading"
},
"navigationBarTitleText": "UI组件库"
}
Icon
Introduce components in page.json
{
"usingComponents": {
"mp-icon": "../../components/icon/icon"
}
}
<!--WXML示例代码-->
<mp-icon type="field" icon="add" color="black" size="{{25}}"></mp-icon>
<mp-icon icon="add" color="black" size="{{25}}"></mp-icon>
Property | Type | The default | Description |
---|---|---|---|
extClass | string | The name of the component class | |
type | string | outline | Icon type, optional value outline( stroke), field (fill) |
icon | string | Icon's name | |
size | number | 20 | Icon's size, px |
color | string | black | Icon color, default black |