[Improvement] Field: support clearable (#1309)

This commit is contained in:
neverland
2018-06-20 20:09:04 +08:00
committed by GitHub
parent c368e36aea
commit 0a99da352e
19 changed files with 312 additions and 231 deletions

View File

@@ -30,5 +30,6 @@
&-detail__finish {
color: $blue;
font-size: 12px;
display: block;
}
}

View File

@@ -9,6 +9,11 @@
position: relative;
}
&__body {
display: flex;
align-items: center;
}
&__control {
border: 0;
margin: 0;
@@ -25,17 +30,24 @@
}
}
&__icon {
position: absolute;
right: 0;
top: 50%;
color: $gray-dark;
padding: 10px 0 10px 10px;
transform: translate3d(0, -50%, 0);
&__clear,
&__icon,
&__button {
flex-shrink: 0;
}
.van-icon {
display: block;
}
&__clear,
&__icon {
padding: 0 10px;
color: $gray-dark;
line-height: inherit;
margin-right: -10px;
}
&__icon .van-icon {
display: block;
font-size: 16px;
line-height: inherit;
}
&__button {
@@ -68,10 +80,4 @@
min-height: 60px;
}
}
&--has-icon {
.van-field__control {
padding-right: 20px;
}
}
}