diff --git a/example/pages/cell/index.wxml b/example/pages/cell/index.wxml index 030d0995..3b7c3297 100644 --- a/example/pages/cell/index.wxml +++ b/example/pages/cell/index.wxml @@ -53,7 +53,7 @@ bindtap="handleTap" > - + diff --git a/packages/cell/README.md b/packages/cell/README.md index 5113c3a7..0c094044 100644 --- a/packages/cell/README.md +++ b/packages/cell/README.md @@ -49,6 +49,7 @@ | title | String | 否 | 无 | 左侧标题 | | label | Boolean | 否 | false | 标题下方的描述信息 | | value | String | 否 | 取消 | 右侧内容 | +| noBorder | Boolean | 否 | false | 不显示下边线 | | isLink | Boolean | 否 | false | 是否展示右侧箭头并开启尝试以 url 跳转 | | url | String | 否 | - | 当 isLink 设置为 true 时,点击 cell 会尝试跳转到该路径 | | linkType | String | 否 | navigateTo | 链接跳转类型,可选值为 `navigateTo`,`redirectTo`,`switchTab`,`reLaunch` | diff --git a/packages/cell/index.js b/packages/cell/index.js index 25151ac8..c7a2ad63 100644 --- a/packages/cell/index.js +++ b/packages/cell/index.js @@ -43,7 +43,8 @@ Component({ url: { type: String, value: '' - } + }, + noBorder: Boolean }, data: { isLastCell: true, diff --git a/packages/cell/index.pcss b/packages/cell/index.pcss index 13101913..56610499 100644 --- a/packages/cell/index.pcss +++ b/packages/cell/index.pcss @@ -8,64 +8,73 @@ line-height: 1.4; background-color: #fff; font-size: 14px; + + &::after { + @mixin hairline; + border-bottom-width: 1px; + left: 15px; + right: 0; + } + + &__icon { + margin-right: 5px; + + &:empty { + display: none + } + } + + &__title { + min-width: 65px; + padding-right: 10px; + &:empty { + display: none; + } + } + + &__bd { + flex: 1; + } + + &__text { + line-height: 24px; + font-size: 14px; + } + + &__desc { + line-height: 1.2; + font-size: 12px; + color: #666; + } + + &__ft { + position: relative; + text-align: right; + color: #666; + } + + &__no-pading{ + padding: 0; + + .zan-cell__bd_padding { + padding: 12px 0 12px 15px; + + .zan-form__input{ + height: 26px; + } + } + + .zan-cell__ft_padding { + padding: 12px 15px 12px 0; + } + } + + &.last-cell::after, &.no-border::after { + display: none; + } + } -.zan-cell::after { - @mixin hairline; - border-bottom-width: 1px; - left: 15px; - right: 0; -} - -.zan-cell .zan-cell__icon { - margin-right: 5px; -} -.zan-cell .zan-cell__icon:empty { - display: none -} - -.zan-cell__title { - min-width: 65px; - padding-right: 10px; -} - -.zan-cell__title:empty { - display: none; -} - -.zan-cell__bd { - flex: 1; -} -.zan-cell__text { - line-height: 24px; - font-size: 14px; -} -.zan-cell__desc { - line-height: 1.2; - font-size: 12px; - color: #666; -} -.zan-cell__ft { - position: relative; - text-align: right; - color: #666; -} -.zan-cell__no-pading{ - padding: 0; -} -.zan-cell__no-pading .zan-cell__bd_padding { - padding: 12px 0 12px 15px; -} -.zan-cell__no-pading .zan-cell__bd_padding .zan-form__input{ - height: 26px; -} -.zan-cell__no-pading .zan-cell__ft_padding { - padding: 12px 15px 12px 0; -} - -.zan-cell.last-cell::after { - display: none; -} .zan-cell--access .zan-cell__ft { padding-right: 13px; diff --git a/packages/cell/index.wxml b/packages/cell/index.wxml index db6db63d..dd7bc431 100644 --- a/packages/cell/index.wxml +++ b/packages/cell/index.wxml @@ -1,6 +1,6 @@