cosey 0.5.11 → 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.
- package/components/field/components/number/number.d.ts +2 -1
- package/components/field/components/number/number.vue.js +7 -2
- package/components/input-number-range/input-number-range.vue.js +1 -1
- package/config/http.d.ts +4 -0
- package/config/http.js +5 -1
- package/package.json +1 -1
- package/request/useRequest.js +3 -0
|
@@ -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
|
...{
|
package/config/http.d.ts
CHANGED
|
@@ -62,6 +62,10 @@ export declare const defaultHttpConfig: {
|
|
|
62
62
|
* 是否直接返回 AxiosResponse 对象
|
|
63
63
|
*/
|
|
64
64
|
originalResponse: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 是否直接返回 AxiosResponse.data 属性值
|
|
67
|
+
*/
|
|
68
|
+
originalData: boolean;
|
|
65
69
|
};
|
|
66
70
|
export type HttpConfig = DeepPartial<typeof defaultHttpConfig>;
|
|
67
71
|
export type RequiredHttpConfig = typeof defaultHttpConfig;
|
package/config/http.js
CHANGED
package/package.json
CHANGED
package/request/useRequest.js
CHANGED