@tuya-miniapp/smart-ui 2.6.3 → 2.6.4-beta-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115,9 +115,11 @@ SmartComponent({
115
115
  },
116
116
  onBlur(event) {
117
117
  const value = this.format(event.detail.value, true);
118
- this.setData({ currentValue: value });
119
- this.emitChange(value);
120
- this.$emit('blur', Object.assign(Object.assign({}, event.detail), { value }));
118
+ const stepValue = Math.round(value / this.data.step) * this.data.step;
119
+ const strStepValue = stepValue.toString();
120
+ this.setData({ currentValue: strStepValue });
121
+ this.emitChange(strStepValue);
122
+ this.$emit('blur', Object.assign(Object.assign({}, event.detail), { value: strStepValue }));
121
123
  },
122
124
  // filter illegal characters
123
125
  filter(value) {
@@ -131,9 +131,11 @@ function equal(value1, value2) {
131
131
  },
132
132
  onBlur: function (event) {
133
133
  var value = this.format(event.detail.value, true);
134
- this.setData({ currentValue: value });
135
- this.emitChange(value);
136
- this.$emit('blur', __assign(__assign({}, event.detail), { value: value }));
134
+ var stepValue = Math.round(value / this.data.step) * this.data.step;
135
+ var strStepValue = stepValue.toString();
136
+ this.setData({ currentValue: strStepValue });
137
+ this.emitChange(strStepValue);
138
+ this.$emit('blur', __assign(__assign({}, event.detail), { value: strStepValue }));
137
139
  },
138
140
  // filter illegal characters
139
141
  filter: function (value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.6.3",
3
+ "version": "2.6.4-beta-0",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",