mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-23 15:09:16 +08:00
[bugfix] Stepper: change event error when clear input (#635)
This commit is contained in:
parent
e0664d7f82
commit
a2f0ebdf8b
@ -2,9 +2,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<van-nav-bar
|
<van-nav-bar
|
||||||
v-show="title"
|
v-show="title"
|
||||||
fixed
|
|
||||||
class="van-doc-nav-bar"
|
class="van-doc-nav-bar"
|
||||||
:title="title"
|
:title="title"
|
||||||
|
fixed
|
||||||
left-arrow
|
left-arrow
|
||||||
@click-left="onBack"
|
@click-left="onBack"
|
||||||
/>
|
/>
|
||||||
@ -40,6 +40,7 @@ body {
|
|||||||
|
|
||||||
.van-doc-nav-bar {
|
.van-doc-nav-bar {
|
||||||
.van-nav-bar__title {
|
.van-nav-bar__title {
|
||||||
|
font-size: 15px;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,9 +79,11 @@ export default create({
|
|||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
value(val) {
|
value(val) {
|
||||||
val = this.correctValue(+val);
|
if (val !== '') {
|
||||||
if (val !== this.currentValue) {
|
val = this.correctValue(+val);
|
||||||
this.currentValue = val;
|
if (val !== this.currentValue) {
|
||||||
|
this.currentValue = val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -99,8 +101,8 @@ export default create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onInput(event) {
|
onInput(event) {
|
||||||
const val = +event.target.value;
|
const { value } = event.target;
|
||||||
this.currentValue = this.correctValue(val);
|
this.currentValue = value ? this.correctValue(+value) : value;
|
||||||
this.emitInput();
|
this.emitInput();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user