From 5abbd5a874f4cbd2763dd9d3a8e33429b932f656 Mon Sep 17 00:00:00 2001 From: rex-zsd Date: Fri, 13 Dec 2019 11:57:49 +0800 Subject: [PATCH] build: compile 0.5.26 --- dist/stepper/index.js | 10 +++++++++- lib/stepper/index.js | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/dist/stepper/index.js b/dist/stepper/index.js index 247eece8..b1836ea4 100644 --- a/dist/stepper/index.js +++ b/dist/stepper/index.js @@ -53,7 +53,9 @@ VantComponent({ if (typeof newValue === 'number' && +this.data.value !== newValue) { this.set({ value: newValue }); } - } + }, + max: 'check', + min: 'check', }, data: { focus: false @@ -64,6 +66,12 @@ VantComponent({ }); }, methods: { + check() { + const newValue = this.range(this.data.value); + if (typeof newValue === 'number' && +this.data.value !== newValue) { + this.set({ value: newValue }); + } + }, onFocus(event) { this.$emit('focus', event.detail); }, diff --git a/lib/stepper/index.js b/lib/stepper/index.js index 3ee5b445..6ea1a5ec 100644 --- a/lib/stepper/index.js +++ b/lib/stepper/index.js @@ -55,7 +55,9 @@ component_1.VantComponent({ if (typeof newValue === 'number' && +this.data.value !== newValue) { this.set({ value: newValue }); } - } + }, + max: 'check', + min: 'check', }, data: { focus: false @@ -66,6 +68,12 @@ component_1.VantComponent({ }); }, methods: { + check: function () { + var newValue = this.range(this.data.value); + if (typeof newValue === 'number' && +this.data.value !== newValue) { + this.set({ value: newValue }); + } + }, onFocus: function (event) { this.$emit('focus', event.detail); },