diff --git a/dist/field/index.js b/dist/field/index.js index dba92e0c..5b07135e 100644 --- a/dist/field/index.js +++ b/dist/field/index.js @@ -95,6 +95,9 @@ VantComponent({ onKeyboardHeightChange(event) { this.$emit('keyboardheightchange', event.detail); }, + onBindNicknameReview(event) { + this.$emit('nicknamereview', event.detail); + }, emitChange(detail) { const { extraEventParams } = this.data; this.setData({ value: detail.value }); diff --git a/dist/field/input.wxml b/dist/field/input.wxml index c10f4c41..86b288b9 100644 --- a/dist/field/input.wxml +++ b/dist/field/input.wxml @@ -27,4 +27,5 @@ bindfocus="onFocus" bindconfirm="onConfirm" bindkeyboardheightchange="onKeyboardHeightChange" + bindnicknamereview="onBindNicknameReview" /> diff --git a/dist/mixins/transition.js b/dist/mixins/transition.js index 7e4b613c..5b027ed7 100644 --- a/dist/mixins/transition.js +++ b/dist/mixins/transition.js @@ -21,7 +21,6 @@ export function transition(showDefaultValue) { duration: { type: null, value: 300, - observer: 'observeDuration', }, name: { type: String, diff --git a/dist/stepper/index.js b/dist/stepper/index.js index 937ae6e4..e49c6a5e 100644 --- a/dist/stepper/index.js +++ b/dist/stepper/index.js @@ -128,12 +128,7 @@ VantComponent({ if (value === '') { return; } - let formatted = this.filter(value); - // limit max decimal length - if (isDef(this.data.decimalLength) && formatted.indexOf('.') !== -1) { - const pair = formatted.split('.'); - formatted = `${pair[0]}.${pair[1].slice(0, this.data.decimalLength)}`; - } + let formatted = this.format(value); this.emitChange(formatted); }, emitChange(value) { diff --git a/lib/field/index.js b/lib/field/index.js index c20d266b..4fff56ae 100644 --- a/lib/field/index.js +++ b/lib/field/index.js @@ -109,6 +109,9 @@ var props_1 = require("./props"); onKeyboardHeightChange: function (event) { this.$emit('keyboardheightchange', event.detail); }, + onBindNicknameReview: function (event) { + this.$emit('nicknamereview', event.detail); + }, emitChange: function (detail) { var extraEventParams = this.data.extraEventParams; this.setData({ value: detail.value }); diff --git a/lib/field/input.wxml b/lib/field/input.wxml index c10f4c41..86b288b9 100644 --- a/lib/field/input.wxml +++ b/lib/field/input.wxml @@ -27,4 +27,5 @@ bindfocus="onFocus" bindconfirm="onConfirm" bindkeyboardheightchange="onKeyboardHeightChange" + bindnicknamereview="onBindNicknameReview" /> diff --git a/lib/mixins/transition.js b/lib/mixins/transition.js index 17317040..8cc6ca9f 100644 --- a/lib/mixins/transition.js +++ b/lib/mixins/transition.js @@ -24,7 +24,6 @@ function transition(showDefaultValue) { duration: { type: null, value: 300, - observer: 'observeDuration', }, name: { type: String, diff --git a/lib/stepper/index.js b/lib/stepper/index.js index 1aa2c27b..7e650a88 100644 --- a/lib/stepper/index.js +++ b/lib/stepper/index.js @@ -141,12 +141,7 @@ function equal(value1, value2) { if (value === '') { return; } - var formatted = this.filter(value); - // limit max decimal length - if ((0, validator_1.isDef)(this.data.decimalLength) && formatted.indexOf('.') !== -1) { - var pair = formatted.split('.'); - formatted = "".concat(pair[0], ".").concat(pair[1].slice(0, this.data.decimalLength)); - } + var formatted = this.format(value); this.emitChange(formatted); }, emitChange: function (value) {