@v-c/input-number 1.1.0 → 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/InputNumber.js +15 -4
- package/dist/StepHandler.d.ts +1 -1
- package/package.json +4 -4
package/dist/InputNumber.js
CHANGED
|
@@ -166,7 +166,8 @@ var InputNumber = /* @__PURE__ */ defineComponent((props, { attrs, slots, expose
|
|
|
166
166
|
inputValueRef.value = inputStr;
|
|
167
167
|
inputValue.value = inputStr;
|
|
168
168
|
if (!compositionRef.value) {
|
|
169
|
-
const
|
|
169
|
+
const finalValue = mergedParser(inputStr);
|
|
170
|
+
const finalDecimal = getMiniDecimal(finalValue);
|
|
170
171
|
if (!finalDecimal.isNaN()) triggerValueUpdate(finalDecimal, true);
|
|
171
172
|
}
|
|
172
173
|
props.onInput?.(inputStr);
|
|
@@ -265,14 +266,15 @@ var InputNumber = /* @__PURE__ */ defineComponent((props, { attrs, slots, expose
|
|
|
265
266
|
}
|
|
266
267
|
};
|
|
267
268
|
watchEffect((onCleanup) => {
|
|
268
|
-
|
|
269
|
+
const input = inputRef.value;
|
|
270
|
+
if (props.changeOnWheel && focus.value && input) {
|
|
269
271
|
const onWheel = (event) => {
|
|
270
272
|
onInternalWheel(event);
|
|
271
273
|
event.preventDefault();
|
|
272
274
|
};
|
|
273
|
-
|
|
275
|
+
input.addEventListener("wheel", onWheel, { passive: false });
|
|
274
276
|
onCleanup(() => {
|
|
275
|
-
|
|
277
|
+
input.removeEventListener("wheel", onWheel);
|
|
276
278
|
resetWheel();
|
|
277
279
|
});
|
|
278
280
|
}
|
|
@@ -526,22 +528,31 @@ var InputNumber = /* @__PURE__ */ defineComponent((props, { attrs, slots, expose
|
|
|
526
528
|
default: void 0
|
|
527
529
|
},
|
|
528
530
|
min: {
|
|
531
|
+
type: [String, Number],
|
|
529
532
|
required: false,
|
|
530
533
|
default: void 0
|
|
531
534
|
},
|
|
532
535
|
max: {
|
|
536
|
+
type: [String, Number],
|
|
533
537
|
required: false,
|
|
534
538
|
default: void 0
|
|
535
539
|
},
|
|
536
540
|
step: {
|
|
541
|
+
type: [String, Number],
|
|
537
542
|
required: false,
|
|
538
543
|
default: void 0
|
|
539
544
|
},
|
|
540
545
|
defaultValue: {
|
|
546
|
+
type: [String, Number],
|
|
541
547
|
required: false,
|
|
542
548
|
default: void 0
|
|
543
549
|
},
|
|
544
550
|
value: {
|
|
551
|
+
type: [
|
|
552
|
+
String,
|
|
553
|
+
Number,
|
|
554
|
+
null
|
|
555
|
+
],
|
|
545
556
|
required: false,
|
|
546
557
|
default: void 0
|
|
547
558
|
},
|
package/dist/StepHandler.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
26
26
|
type: FunctionConstructor;
|
|
27
27
|
required: true;
|
|
28
28
|
};
|
|
29
|
-
}>, () => import(
|
|
29
|
+
}>, () => import('vue/jsx-runtime').JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "step"[], "step", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
30
30
|
prefixCls: {
|
|
31
31
|
type: StringConstructor;
|
|
32
32
|
required: true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/input-number",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.2",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/antdv-next/vue-components/tree/next/packages/input-number",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"vue": "^3.0.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@v-c/input": "^1.
|
|
34
|
-
"@v-c/
|
|
35
|
-
"@v-c/
|
|
33
|
+
"@v-c/input": "^1.2.0",
|
|
34
|
+
"@v-c/util": "^1.3.2",
|
|
35
|
+
"@v-c/mini-decimal": "^1.0.2"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "vite build",
|