[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
+2 -1
View File
@@ -2,9 +2,10 @@
<div :class="b()">
<cell-group v-if="showExchangeBar" :class="b('top')">
<field
v-model="currentCode"
clearable
:class="b('field')"
class="van-hairline--surround"
v-model="currentCode"
:placeholder="inputPlaceholder || $t('placeholder')"
:maxlength="20"
/>
@@ -22,9 +22,12 @@ exports[`renders demo correctly 1`] = `
<!---->
<!---->
<div class="van-cell__value van-cell__value--alone">
<input type="text" placeholder="请输入优惠码" maxlength="20" value="" class="van-field__control">
<!---->
<!---->
<div class="van-field__body">
<input type="text" placeholder="请输入优惠码" maxlength="20" value="" class="van-field__control">
<!---->
<!---->
<!---->
</div>
<!---->
</div>
<!---->