@antdv-next1/pro-field 1.0.5 → 1.0.7
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/components/Cascader/index.d.ts +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Code/index.js +1 -1
- package/dist/components/DigitRange/index.d.ts +2 -2
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Segmented/index.d.ts +1 -1
- package/dist/components/Select/index.js +11 -7
- package/dist/components/TreeSelect/index.d.ts +1 -1
- package/dist/pro-field.esm.js +1265 -986
- package/dist/pro-field.js +36 -36
- package/package.json +9 -4
|
@@ -35,6 +35,6 @@ declare const FieldCascader: _$vue.DefineSetupFnComponent<FieldCascaderProps, {}
|
|
|
35
35
|
variant?: "outlined" | "borderless" | "filled";
|
|
36
36
|
} & {
|
|
37
37
|
id?: string;
|
|
38
|
-
} & Omit<FieldSelectProps, "
|
|
38
|
+
} & Omit<FieldSelectProps, "id" | "variant" | "text" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
|
|
39
39
|
//#endregion
|
|
40
40
|
export { FieldCascaderProps, FieldCascaderRef, FieldCascader as default };
|
|
@@ -32,6 +32,6 @@ declare const FieldCheckbox: _$vue.DefineSetupFnComponent<FieldCheckBoxProps, {}
|
|
|
32
32
|
options?: CheckboxGroupProps["options"];
|
|
33
33
|
} & {
|
|
34
34
|
id?: string;
|
|
35
|
-
} & Omit<FieldSelectProps, "
|
|
35
|
+
} & Omit<FieldSelectProps, "id" | "variant" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { FieldCheckBoxProps, FieldCheckboxRef, FieldCheckbox as default };
|
|
@@ -37,7 +37,7 @@ const FieldCode = /* @__PURE__ */ defineComponent((props) => {
|
|
|
37
37
|
}
|
|
38
38
|
if (mode === "edit" || mode === "update") {
|
|
39
39
|
fieldProps.value = code;
|
|
40
|
-
|
|
40
|
+
const dom = createVNode(TextArea, mergeProps({ "rows": 5 }, fieldProps), null);
|
|
41
41
|
if (formItemRender) return createVNode(Fragment, null, [formItemRender(code, {
|
|
42
42
|
mode,
|
|
43
43
|
fieldProps,
|
|
@@ -22,14 +22,14 @@ type FieldDigitRangeProps = ProFieldFC<{
|
|
|
22
22
|
}>;
|
|
23
23
|
declare const FieldDigitRange: _$vue.DefineSetupFnComponent<FieldDigitRangeProps, {}, CustomSlotsType<{
|
|
24
24
|
default?: () => VueNode;
|
|
25
|
-
}>, _$_antdv_next1_pro_provider0.BaseProFieldFC<Omit<InputNumberProps, "
|
|
25
|
+
}>, _$_antdv_next1_pro_provider0.BaseProFieldFC<Omit<InputNumberProps, "defaultValue" | "value" | "onChange" | "placeholder"> & {
|
|
26
26
|
id?: string;
|
|
27
27
|
placeholder?: string[];
|
|
28
28
|
value?: ValuePair;
|
|
29
29
|
onChange?: (value?: ValuePair) => void;
|
|
30
30
|
defaultValue?: ValuePair;
|
|
31
31
|
intlProps?: Intl.NumberFormatOptions;
|
|
32
|
-
}> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<Omit<InputNumberProps, "
|
|
32
|
+
}> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<Omit<InputNumberProps, "defaultValue" | "value" | "onChange" | "placeholder"> & {
|
|
33
33
|
id?: string;
|
|
34
34
|
placeholder?: string[];
|
|
35
35
|
value?: ValuePair;
|
|
@@ -31,6 +31,6 @@ declare const FieldRadio: _$vue.DefineSetupFnComponent<FieldRadioProps, {}, Cust
|
|
|
31
31
|
radioType?: RadioGroupProps["optionType"];
|
|
32
32
|
} & {
|
|
33
33
|
id?: string;
|
|
34
|
-
} & Omit<FieldSelectProps, "
|
|
34
|
+
} & Omit<FieldSelectProps, "id" | "variant" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { FieldRadioProps, FieldRadio as default };
|
|
@@ -31,6 +31,6 @@ declare const FieldSegmented: _$vue.DefineSetupFnComponent<FieldSegmentedProps,
|
|
|
31
31
|
emptyText?: VueNode$1;
|
|
32
32
|
} & {
|
|
33
33
|
id?: string;
|
|
34
|
-
} & Omit<FieldSelectProps, "
|
|
34
|
+
} & Omit<FieldSelectProps, "id" | "variant" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { FieldSegmentedProps, FieldSegmented as default };
|
|
@@ -3,7 +3,7 @@ import LightSelect from "./LightSelect/index.js";
|
|
|
3
3
|
import SearchSelect from "./SearchSelect/index.js";
|
|
4
4
|
import { Fragment, computed, createVNode, defineComponent, mergeProps, ref, shallowRef } from "vue";
|
|
5
5
|
import { useIntl } from "@antdv-next1/pro-provider";
|
|
6
|
-
import { nanoid, objectToMap, proFieldParsingText, useDebounceValue, useEffect, useMemo, useMountMergeState, useRefFunction, useState } from "@antdv-next1/pro-utils";
|
|
6
|
+
import { nanoid, objectToMap, proFieldParsingText, stringify, useDebounceValue, useEffect, useMemo, useMountMergeState, useRefFunction, useState } from "@antdv-next1/pro-utils";
|
|
7
7
|
import { Spin, useConfig } from "antdv-next";
|
|
8
8
|
import { unit } from "@antdv-next/cssinjs";
|
|
9
9
|
import useSWRV from "swrv";
|
|
@@ -95,15 +95,19 @@ function useFieldFetchData(props) {
|
|
|
95
95
|
}, [() => valueEnum]);
|
|
96
96
|
const swrKey = useDebounceValue([
|
|
97
97
|
proFieldKeyRef.value,
|
|
98
|
-
props.params,
|
|
98
|
+
stringify(props.params),
|
|
99
99
|
keyWords.value
|
|
100
|
-
], debounceTime ?? fieldProps?.debounceTime ?? 0, [
|
|
100
|
+
], debounceTime ?? fieldProps?.debounceTime ?? 0, [
|
|
101
|
+
() => props.params,
|
|
102
|
+
keyWords,
|
|
103
|
+
proFieldKeyRef
|
|
104
|
+
]);
|
|
101
105
|
const { data, mutate: setLocaleData, isValidating } = useSWRV(() => {
|
|
102
106
|
if (!request) return null;
|
|
103
|
-
return swrKey.value;
|
|
104
|
-
}, (
|
|
105
|
-
...params,
|
|
106
|
-
keyWords:
|
|
107
|
+
return swrKey.value.join("-");
|
|
108
|
+
}, () => request?.({
|
|
109
|
+
...props.params,
|
|
110
|
+
keyWords: keyWords.value
|
|
107
111
|
}, props), {
|
|
108
112
|
shouldRetryOnError: false,
|
|
109
113
|
revalidateOnFocus: false
|
|
@@ -40,6 +40,6 @@ declare const FieldTreeSelect: _$vue.DefineSetupFnComponent<FieldTreeSelectProps
|
|
|
40
40
|
fetchDataOnSearch?: boolean;
|
|
41
41
|
} & {
|
|
42
42
|
id?: string;
|
|
43
|
-
} & TreeSelectProps<any, _$_v_c_tree_select0.DataNode> & Omit<FieldSelectProps, "
|
|
43
|
+
} & TreeSelectProps<any, _$_v_c_tree_select0.DataNode> & Omit<FieldSelectProps, "id" | "variant" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { FieldTreeSelectProps, FieldTreeSelect as default };
|