cosey 0.5.12 → 0.5.13
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type InputNumberInstance, type InputNumberProps } from 'element-plus';
|
|
2
2
|
import { type FieldComponentCommonProps } from '../common';
|
|
3
3
|
export interface FieldNumberProps extends FieldComponentCommonProps {
|
|
4
|
-
componentProps?: Partial<InputNumberProps
|
|
4
|
+
componentProps?: Partial<Omit<InputNumberProps, 'modelValue'>> & {
|
|
5
|
+
modelValue?: number | null | string;
|
|
5
6
|
'onUpdate:modelValue'?: (value: number | undefined) => void;
|
|
6
7
|
onChange?: (currentValue: number | undefined, oldValue: number | undefined) => void;
|
|
7
8
|
onBlur?: (event: FocusEvent) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElInputNumber } from 'element-plus';
|
|
2
2
|
import { defineComponent, h, mergeProps } from 'vue';
|
|
3
|
+
import { isNullish } from '../../../../utils/is.js';
|
|
3
4
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
4
5
|
|
|
5
6
|
var stdin_default = defineComponent((props, {
|
|
@@ -11,9 +12,13 @@ var stdin_default = defineComponent((props, {
|
|
|
11
12
|
}
|
|
12
13
|
return h(ElInputNumber, mergeProps({
|
|
13
14
|
style: {
|
|
14
|
-
verticalAlign: "top"
|
|
15
|
+
verticalAlign: "top",
|
|
16
|
+
width: "100%"
|
|
15
17
|
}
|
|
16
|
-
},
|
|
18
|
+
}, {
|
|
19
|
+
...props.componentProps,
|
|
20
|
+
modelValue: isNullish(props.componentProps?.modelValue) ? null : Number(props.componentProps?.modelValue) || null
|
|
21
|
+
}), slots);
|
|
17
22
|
};
|
|
18
23
|
}, {
|
|
19
24
|
name: "CoFieldNumber",
|
|
@@ -3,8 +3,8 @@ import { defaultInputNumberRangeProps } from './input-number-range.js';
|
|
|
3
3
|
import stdin_default$1 from './style/index.js';
|
|
4
4
|
import { useFormItem, CHANGE_EVENT, ElInputNumber } from 'element-plus';
|
|
5
5
|
import { debugWarn } from 'element-plus/es/utils/error.mjs';
|
|
6
|
-
import { isNullish } from '../../utils/is.js';
|
|
7
6
|
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
7
|
+
import { isNullish } from '../../utils/is.js';
|
|
8
8
|
|
|
9
9
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
10
10
|
...{
|