May 21, 2021 WeChat Mini Program Development Document
Cells are list groupings, often used to nest a set of Cell or Checkbox, note that Checkbox-group and Cell components must be placed under the Cells components, as shown in the Cells effect below.
Introduce components in page.json
{
"usingComponents": {
"mp-cell": "../../components/cell/cell",
"mp-cells": "../../components/cells/cells"
}
}
<!--WXML示例代码-->
<mp-cells ext-class="my-cells" title="带说明的列表项">
<mp-cell value="标题文字" footer="说明文字"></mp-cell>
<mp-cell>
<view>标题文字(使用slot)</view>
<view slot="footer">说明文字</view>
</mp-cell>
</mp-cells>
// page.js示例代码
Page({
});
Property | Type | The default | Required | Description |
---|---|---|---|---|
ext-class | string | Whether | A class added to the internal structure of a component that can be used to modify the style inside a component | |
title | string | Whether | The title of Cells | |
footer | string | Whether | The text at the bottom of cells |
Name | Describe |
---|---|
Default | Content slot |