@tmagic/form 1.1.0-beta.7 → 1.1.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.
package/dist/tmagic-form.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { WarningFilled, CaretBottom, CaretRight, CaretTop, Delete, ArrowDown, Ar
|
|
|
3
3
|
import { cloneDeep, isEqual } from 'lodash-es';
|
|
4
4
|
import { ElMessage } from 'element-plus';
|
|
5
5
|
import Sortable from 'sortablejs';
|
|
6
|
-
import { asyncLoadJs, sleep, datetimeFormatter } from '@tmagic/utils';
|
|
6
|
+
import { asyncLoadJs, sleep, datetimeFormatter, isNumber } from '@tmagic/utils';
|
|
7
7
|
|
|
8
8
|
const isTableSelect = (type) => typeof type === "string" && ["table-select", "tableSelect"].includes(type);
|
|
9
9
|
const asyncLoadConfig = (value, initValue2, { asyncLoad, name, type }) => {
|
|
@@ -3302,7 +3302,7 @@ const _sfc_main$4 = defineComponent({
|
|
|
3302
3302
|
const value = props.model[modelName.value];
|
|
3303
3303
|
let num;
|
|
3304
3304
|
let unit;
|
|
3305
|
-
if (
|
|
3305
|
+
if (isNumber(value)) {
|
|
3306
3306
|
num = +value;
|
|
3307
3307
|
} else {
|
|
3308
3308
|
value.replace(/^([0-9.]+)([a-z%]+)$/, ($0, $1, $2) => {
|
|
@@ -3314,14 +3314,14 @@ const _sfc_main$4 = defineComponent({
|
|
|
3314
3314
|
return;
|
|
3315
3315
|
}
|
|
3316
3316
|
const ctrl = navigator.platform.match("Mac") ? $event.metaKey : $event.ctrlKey;
|
|
3317
|
-
const
|
|
3317
|
+
const shift = $event.shiftKey;
|
|
3318
3318
|
const alt = $event.altKey;
|
|
3319
3319
|
if (arrowUp) {
|
|
3320
3320
|
if (ctrl) {
|
|
3321
3321
|
num += 100;
|
|
3322
3322
|
} else if (alt) {
|
|
3323
3323
|
num = (num * 1e4 + 1e3) / 1e4;
|
|
3324
|
-
} else if (
|
|
3324
|
+
} else if (shift) {
|
|
3325
3325
|
num = num + 10;
|
|
3326
3326
|
} else {
|
|
3327
3327
|
num += 1;
|
|
@@ -3331,7 +3331,7 @@ const _sfc_main$4 = defineComponent({
|
|
|
3331
3331
|
num -= 100;
|
|
3332
3332
|
} else if (alt) {
|
|
3333
3333
|
num = (num * 1e4 - 1e3) / 1e4;
|
|
3334
|
-
} else if (
|
|
3334
|
+
} else if (shift) {
|
|
3335
3335
|
num -= 10;
|
|
3336
3336
|
} else {
|
|
3337
3337
|
num -= 1;
|