[Improvement] Cell: update to flex-box (#770)

This commit is contained in:
neverland 2018-03-23 21:23:57 +08:00 committed by GitHub
parent 0030024282
commit eda842ce07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -14,7 +14,7 @@
</slot>
<slot name="title">
<span class="van-cell__text" v-text="title" />
<span class="van-cell__label" v-if="label" v-text="label" />
<div class="van-cell__label" v-if="label" v-text="label" />
</slot>
</div>
<div

View File

@ -2,7 +2,7 @@
.van-cell {
width: 100%;
display: table;
display: flex;
padding: 10px 15px;
box-sizing: border-box;
line-height: 24px;
@ -25,8 +25,6 @@
}
&__title {
display: table-cell;
.van-icon {
font-size: 16px;
margin-right: 5px;
@ -39,14 +37,13 @@
}
&__label {
display: block;
font-size: 12px;
line-height: 1.2;
color: $gray-darker;
}
&__value {
display: table-cell;
flex: 1;
text-align: right;
vertical-align: middle;
overflow: hidden;