mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix: cell 组件新增 no-border 属性 (#369)
This commit is contained in:
parent
bcaf4095e6
commit
bf652cb425
@ -53,7 +53,7 @@
|
|||||||
bindtap="handleTap"
|
bindtap="handleTap"
|
||||||
></zan-cell>
|
></zan-cell>
|
||||||
<block wx:if="{{ show }}">
|
<block wx:if="{{ show }}">
|
||||||
<zan-cell title="单行列表" label="附加描述" value="详细信息"></zan-cell>
|
<zan-cell no-border title="单行列表" label="附加描述" value="不想有 border"></zan-cell>
|
||||||
<zan-cell title="表单">
|
<zan-cell title="表单">
|
||||||
<input slot="footer" type="digit" placeholder="带小数点的数字键盘"/>
|
<input slot="footer" type="digit" placeholder="带小数点的数字键盘"/>
|
||||||
</zan-cell>
|
</zan-cell>
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
| title | String | 否 | 无 | 左侧标题 |
|
| title | String | 否 | 无 | 左侧标题 |
|
||||||
| label | Boolean | 否 | false | 标题下方的描述信息 |
|
| label | Boolean | 否 | false | 标题下方的描述信息 |
|
||||||
| value | String | 否 | 取消 | 右侧内容 |
|
| value | String | 否 | 取消 | 右侧内容 |
|
||||||
|
| noBorder | Boolean | 否 | false | 不显示下边线 |
|
||||||
| isLink | Boolean | 否 | false | 是否展示右侧箭头并开启尝试以 url 跳转 |
|
| isLink | Boolean | 否 | false | 是否展示右侧箭头并开启尝试以 url 跳转 |
|
||||||
| url | String | 否 | - | 当 isLink 设置为 true 时,点击 cell 会尝试跳转到该路径 |
|
| url | String | 否 | - | 当 isLink 设置为 true 时,点击 cell 会尝试跳转到该路径 |
|
||||||
| linkType | String | 否 | navigateTo | 链接跳转类型,可选值为 `navigateTo`,`redirectTo`,`switchTab`,`reLaunch` |
|
| linkType | String | 否 | navigateTo | 链接跳转类型,可选值为 `navigateTo`,`redirectTo`,`switchTab`,`reLaunch` |
|
||||||
|
@ -43,7 +43,8 @@ Component({
|
|||||||
url: {
|
url: {
|
||||||
type: String,
|
type: String,
|
||||||
value: ''
|
value: ''
|
||||||
}
|
},
|
||||||
|
noBorder: Boolean
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
isLastCell: true,
|
isLastCell: true,
|
||||||
|
@ -8,65 +8,74 @@
|
|||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
|
||||||
|
|
||||||
.zan-cell::after {
|
&::after {
|
||||||
@mixin hairline;
|
@mixin hairline;
|
||||||
border-bottom-width: 1px;
|
border-bottom-width: 1px;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.zan-cell .zan-cell__icon {
|
&__icon {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
|
||||||
.zan-cell .zan-cell__icon:empty {
|
&:empty {
|
||||||
display: none
|
display: none
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.zan-cell__title {
|
&__title {
|
||||||
min-width: 65px;
|
min-width: 65px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
&:empty {
|
||||||
|
|
||||||
.zan-cell__title:empty {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.zan-cell__bd {
|
&__bd {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
.zan-cell__text {
|
|
||||||
|
&__text {
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.zan-cell__desc {
|
|
||||||
|
&__desc {
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
.zan-cell__ft {
|
|
||||||
|
&__ft {
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
.zan-cell__no-pading{
|
|
||||||
|
&__no-pading{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
|
||||||
.zan-cell__no-pading .zan-cell__bd_padding {
|
.zan-cell__bd_padding {
|
||||||
padding: 12px 0 12px 15px;
|
padding: 12px 0 12px 15px;
|
||||||
}
|
|
||||||
.zan-cell__no-pading .zan-cell__bd_padding .zan-form__input{
|
.zan-form__input{
|
||||||
height: 26px;
|
height: 26px;
|
||||||
}
|
}
|
||||||
.zan-cell__no-pading .zan-cell__ft_padding {
|
|
||||||
padding: 12px 15px 12px 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.zan-cell.last-cell::after {
|
.zan-cell__ft_padding {
|
||||||
|
padding: 12px 15px 12px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.last-cell::after, &.no-border::after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.zan-cell--access .zan-cell__ft {
|
.zan-cell--access .zan-cell__ft {
|
||||||
padding-right: 13px;
|
padding-right: 13px;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<view
|
<view
|
||||||
catchtap="cellTap"
|
catchtap="cellTap"
|
||||||
class="cell-class zan-cell {{ isLastCell ? 'last-cell' : '' }} {{ isLink ? 'zan-cell--access' : '' }}"
|
class="cell-class zan-cell {{ isLastCell ? 'last-cell' : '' }} {{ isLink ? 'zan-cell--access' : '' }} {{ noBorder ? 'no-border' : ''}}"
|
||||||
>
|
>
|
||||||
|
|
||||||
<view class="zan-cell__icon">
|
<view class="zan-cell__icon">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user