[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>
<slot name="title"> <slot name="title">
<span class="van-cell__text" v-text="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> </slot>
</div> </div>
<div <div

View File

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