bk-magic-vue 2.5.9-beta.35 → 2.5.9-beta.36
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.
- package/dist/bk-magic-vue.js +6 -2
- package/dist/bk-magic-vue.min.js +1 -1
- package/dist/bk-magic-vue.min.js.gz +0 -0
- package/dist/bk-magic-vue.min.js.map +1 -1
- package/lib/card.js +6 -2
- package/lib/input.js +6 -2
- package/lib/pagination.js +6 -2
- package/lib/slider.js +6 -2
- package/lib/table.js +6 -2
- package/lib/transfer.js +6 -2
- package/package.json +1 -1
package/dist/bk-magic-vue.js
CHANGED
|
@@ -29967,13 +29967,15 @@
|
|
|
29967
29967
|
}
|
|
29968
29968
|
},
|
|
29969
29969
|
handleNumberDelete: function handleNumberDelete(event) {
|
|
29970
|
+
var isRawValEmpty = false;
|
|
29970
29971
|
if (this.curValue === '') {
|
|
29972
|
+
isRawValEmpty = true;
|
|
29971
29973
|
this.curValue = this.initialControlValue === undefined ? this.max : Math.min(this.initialControlValue, this.max);
|
|
29972
29974
|
}
|
|
29973
29975
|
var curNumberValue = Number(this.curValue);
|
|
29974
29976
|
if (curNumberValue - 1 >= this.min) {
|
|
29975
29977
|
var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
|
|
29976
|
-
var newVal = curNumberValue - 1;
|
|
29978
|
+
var newVal = isRawValEmpty ? curNumberValue : curNumberValue - 1;
|
|
29977
29979
|
if (typeof this.precision !== 'undefined') {
|
|
29978
29980
|
newVal = this.handleToFixed(newVal, Math.min(16, Math.max(curLenAfterDot.length, this.precision)));
|
|
29979
29981
|
}
|
|
@@ -29984,13 +29986,15 @@
|
|
|
29984
29986
|
}
|
|
29985
29987
|
},
|
|
29986
29988
|
handleNumberAdd: function handleNumberAdd(event) {
|
|
29989
|
+
var isRawValEmpty = false;
|
|
29987
29990
|
if (this.curValue === '') {
|
|
29991
|
+
isRawValEmpty = true;
|
|
29988
29992
|
this.curValue = this.initialControlValue === undefined ? this.min : Math.max(this.initialControlValue, this.min);
|
|
29989
29993
|
}
|
|
29990
29994
|
var curNumberValue = Number(this.curValue);
|
|
29991
29995
|
if (curNumberValue <= this.max - 1) {
|
|
29992
29996
|
var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
|
|
29993
|
-
var newVal = curNumberValue + 1;
|
|
29997
|
+
var newVal = isRawValEmpty ? curNumberValue : curNumberValue + 1;
|
|
29994
29998
|
if (typeof this.precision !== 'undefined') {
|
|
29995
29999
|
newVal = this.handleToFixed(newVal, Math.min(16, Math.max(curLenAfterDot.length, this.precision)));
|
|
29996
30000
|
}
|