@tmagic/form 1.1.0-beta.9 → 1.1.2
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/tmagic-form.umd.js
CHANGED
|
@@ -3305,7 +3305,7 @@
|
|
|
3305
3305
|
const value = props.model[modelName.value];
|
|
3306
3306
|
let num;
|
|
3307
3307
|
let unit;
|
|
3308
|
-
if (
|
|
3308
|
+
if (utils.isNumber(value)) {
|
|
3309
3309
|
num = +value;
|
|
3310
3310
|
} else {
|
|
3311
3311
|
value.replace(/^([0-9.]+)([a-z%]+)$/, ($0, $1, $2) => {
|
|
@@ -3317,14 +3317,14 @@
|
|
|
3317
3317
|
return;
|
|
3318
3318
|
}
|
|
3319
3319
|
const ctrl = navigator.platform.match("Mac") ? $event.metaKey : $event.ctrlKey;
|
|
3320
|
-
const
|
|
3320
|
+
const shift = $event.shiftKey;
|
|
3321
3321
|
const alt = $event.altKey;
|
|
3322
3322
|
if (arrowUp) {
|
|
3323
3323
|
if (ctrl) {
|
|
3324
3324
|
num += 100;
|
|
3325
3325
|
} else if (alt) {
|
|
3326
3326
|
num = (num * 1e4 + 1e3) / 1e4;
|
|
3327
|
-
} else if (
|
|
3327
|
+
} else if (shift) {
|
|
3328
3328
|
num = num + 10;
|
|
3329
3329
|
} else {
|
|
3330
3330
|
num += 1;
|
|
@@ -3334,7 +3334,7 @@
|
|
|
3334
3334
|
num -= 100;
|
|
3335
3335
|
} else if (alt) {
|
|
3336
3336
|
num = (num * 1e4 - 1e3) / 1e4;
|
|
3337
|
-
} else if (
|
|
3337
|
+
} else if (shift) {
|
|
3338
3338
|
num -= 10;
|
|
3339
3339
|
} else {
|
|
3340
3340
|
num -= 1;
|