diff --git a/example/pages/cell/index.wxml b/example/pages/cell/index.wxml index 3b7c3297..a317d72d 100644 --- a/example/pages/cell/index.wxml +++ b/example/pages/cell/index.wxml @@ -1,16 +1,16 @@ - + - + - + - + - + - + @@ -32,14 +32,14 @@ - + - + diff --git a/packages/cell-group/index.js b/packages/cell-group/index.js index 19150663..dd3bc36b 100644 --- a/packages/cell-group/index.js +++ b/packages/cell-group/index.js @@ -1,11 +1,15 @@ const CELL_PATH = '../cell/index'; -const FIELD_PATH = '../field/index' +const FIELD_PATH = '../field/index'; Component({ properties: { titleWidth: { type: Number, value: null + }, + border: { + type: Boolean, + value: false } }, relations: { @@ -36,7 +40,7 @@ Component({ }, data: { - elementUpdateTimeout: 0 + elementUpdateTimeout: 0 }, methods: { diff --git a/packages/cell-group/index.pcss b/packages/cell-group/index.pcss index 6df43b1f..a273d5a7 100644 --- a/packages/cell-group/index.pcss +++ b/packages/cell-group/index.pcss @@ -1,3 +1,14 @@ +@import "../common/_mixins"; + .cell-group { + position: relative; background-color: #fff; -} \ No newline at end of file + overflow: hidden; +} + +.cell-group--with-border::after { + @mixin hairline; + + border-top-width: 1px; + border-bottom-width: 1px; +} diff --git a/packages/cell-group/index.wxml b/packages/cell-group/index.wxml index 9966b641..f84d06f4 100644 --- a/packages/cell-group/index.wxml +++ b/packages/cell-group/index.wxml @@ -1,3 +1,3 @@ - + - \ No newline at end of file + diff --git a/packages/cell/README.md b/packages/cell/README.md index 0c094044..3e19c823 100644 --- a/packages/cell/README.md +++ b/packages/cell/README.md @@ -15,33 +15,6 @@ ``` -#### cell 组使用示例 -多个 cell 组件必须作为 `cell-group` 组件的子组件,否则可能出现显示问题。 - -```json - { - "usingComponents": { - "zan-cell": "path/to/zanui-weapp/dist/cell/index", - "zan-cell-group": "path/to/zanui-weapp/dist/cell-group/index" - } - } -``` - -`cell-group`提供`title-width`控制组内整体 cell 的 title 区域宽度 -```wxml - - - - - - - - - - - -``` - ### 属性与事件 | 名称 | 类型 | 是否必须 | 默认 | 描述 | @@ -69,3 +42,37 @@ |-----------|-----------| | cell-class | 根节点自定义样式类,通过这个可以改变根节点上的样式 | | title-class | title区域自定义样式 | + +#### cell 组使用示例 +多个 cell 组件必须作为 `cell-group` 组件的子组件,否则可能出现显示问题。 + +```json + { + "usingComponents": { + "zan-cell": "path/to/zanui-weapp/dist/cell/index", + "zan-cell-group": "path/to/zanui-weapp/dist/cell-group/index" + } + } +``` + +`cell-group`提供`title-width`控制组内整体 cell 的 title 区域宽度 +```wxml + + + + + + + + + + + +``` + +### 属性与事件 + +| 名称 | 类型 | 是否必须 | 默认 | 描述 | +| ---------- | ------- | -------- | ----- | ---------------- | +| titleWidth | Number | 否 | 无 | title宽度 | +| border | Boolean | 否 | false | 是否显示上下边框 |