@qin-ui/antd-vue-pro 1.1.10 → 1.1.12
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/README.md +2 -2
- package/es/form/{index-bb61c8f9.js → index-b2d126ee.js} +90 -77
- package/es/form/index.js +2 -1
- package/es/index.d.ts +29 -17
- package/es/index.js +3 -2
- package/es/style.css +1 -1
- package/es/table/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -226,8 +226,8 @@ ant-design-vue ui组件库form组件的二次封装
|
|
|
226
226
|
appendField: AppendField;
|
|
227
227
|
/** 在指定字段数据路径的字段配置前插入新的字段配置 */
|
|
228
228
|
prependField: PrependField;
|
|
229
|
-
/**
|
|
230
|
-
|
|
229
|
+
/** 获取指定字段数据路径的字段所在字段分组 */
|
|
230
|
+
getParentFields: GetParentFields;
|
|
231
231
|
};
|
|
232
232
|
|
|
233
233
|
/**
|
|
@@ -15738,6 +15738,7 @@ const UPDATE_FORM_DATA = Symbol(
|
|
|
15738
15738
|
"updateFormData"
|
|
15739
15739
|
);
|
|
15740
15740
|
const UPDATE_REFS = Symbol("updateRefs");
|
|
15741
|
+
const GET_REF = Symbol("getRef");
|
|
15741
15742
|
const COMMAND = Symbol("command");
|
|
15742
15743
|
const UPDATE_ACTIVE_PATH = Symbol(
|
|
15743
15744
|
"setActivePath"
|
|
@@ -15778,7 +15779,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15778
15779
|
"hideFeedback"
|
|
15779
15780
|
];
|
|
15780
15781
|
const props = __props;
|
|
15781
|
-
useProviderDisabled(
|
|
15782
|
+
useProviderDisabled(computed(() => props.disabled));
|
|
15782
15783
|
const updateRefs = inject(UPDATE_REFS);
|
|
15783
15784
|
const getPath = (fieldKey) => {
|
|
15784
15785
|
return [props.path, fieldKey].filter(Boolean).join(".");
|
|
@@ -15787,7 +15788,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15787
15788
|
if (!el)
|
|
15788
15789
|
return;
|
|
15789
15790
|
const path = getPath(field.key);
|
|
15790
|
-
updateRefs == null ? void 0 : updateRefs(path, el
|
|
15791
|
+
updateRefs == null ? void 0 : updateRefs("formItemRefs", path, el);
|
|
15791
15792
|
};
|
|
15792
15793
|
const proFormPropKeys = computed(() => {
|
|
15793
15794
|
return [
|
|
@@ -15895,86 +15896,70 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15895
15896
|
}
|
|
15896
15897
|
});
|
|
15897
15898
|
const index_vue_vue_type_style_index_0_lang = "";
|
|
15898
|
-
const generateFieldMap = (fields, prePath = "", preFieldPath = "", fieldMap = {}) => {
|
|
15899
|
-
fields.forEach((field, index2) => {
|
|
15900
|
-
let path;
|
|
15901
|
-
if (prePath) {
|
|
15902
|
-
path = field.key ? `${prePath}.${field.key}` : prePath;
|
|
15903
|
-
} else {
|
|
15904
|
-
path = field.key || "";
|
|
15905
|
-
}
|
|
15906
|
-
const fieldPath = `${preFieldPath || ""}[${index2}]`;
|
|
15907
|
-
if (path && !fieldMap[path]) {
|
|
15908
|
-
fieldMap[path] = { field, fieldPath };
|
|
15909
|
-
}
|
|
15910
|
-
if (field.fields) {
|
|
15911
|
-
generateFieldMap(
|
|
15912
|
-
field.fields,
|
|
15913
|
-
path,
|
|
15914
|
-
`${fieldPath}.fields`,
|
|
15915
|
-
fieldMap
|
|
15916
|
-
);
|
|
15917
|
-
}
|
|
15918
|
-
});
|
|
15919
|
-
return fieldMap;
|
|
15920
|
-
};
|
|
15921
15899
|
const useFields = (initFields) => {
|
|
15922
15900
|
const fields = ref(initFields);
|
|
15923
|
-
const
|
|
15924
|
-
return generateFieldMap(fields.value);
|
|
15925
|
-
});
|
|
15926
|
-
const getField = (path) => {
|
|
15927
|
-
var _a;
|
|
15901
|
+
const updateField = (path, updater, fieldList = fields.value, parentPath = "", parentFieldPath = "", parsedPath = toPath(path).join(".")) => {
|
|
15928
15902
|
if (!path)
|
|
15929
|
-
return
|
|
15930
|
-
|
|
15903
|
+
return false;
|
|
15904
|
+
for (let i2 = 0; i2 < fieldList.length; i2 += 1) {
|
|
15905
|
+
const field = fieldList[i2];
|
|
15906
|
+
const { key = "" } = field;
|
|
15907
|
+
const concatPath = `${parentPath}${parentPath && key ? "." : ""}${key}`;
|
|
15908
|
+
const selfPath = toPath(concatPath).join(".");
|
|
15909
|
+
if (!parsedPath.startsWith(selfPath))
|
|
15910
|
+
continue;
|
|
15911
|
+
const fieldPath = `${parentFieldPath}[${i2}]`;
|
|
15912
|
+
if (selfPath && selfPath === parsedPath) {
|
|
15913
|
+
updater({ field, fieldIndex: i2, parentFields: fieldList, fieldPath });
|
|
15914
|
+
return true;
|
|
15915
|
+
}
|
|
15916
|
+
if (field.fields && updateField(
|
|
15917
|
+
path,
|
|
15918
|
+
updater,
|
|
15919
|
+
field.fields,
|
|
15920
|
+
selfPath,
|
|
15921
|
+
`${fieldPath}.fields`,
|
|
15922
|
+
parsedPath
|
|
15923
|
+
)) {
|
|
15924
|
+
return true;
|
|
15925
|
+
}
|
|
15926
|
+
}
|
|
15927
|
+
return false;
|
|
15931
15928
|
};
|
|
15932
|
-
const
|
|
15933
|
-
var _a;
|
|
15929
|
+
const getField = (path) => {
|
|
15934
15930
|
if (!path)
|
|
15935
15931
|
return void 0;
|
|
15936
|
-
|
|
15932
|
+
let res;
|
|
15933
|
+
updateField(path, ({ field }) => {
|
|
15934
|
+
res = field;
|
|
15935
|
+
});
|
|
15936
|
+
return res;
|
|
15937
15937
|
};
|
|
15938
15938
|
const setField = (path, field, updateType = "merge") => {
|
|
15939
|
-
const fieldPath = getFieldPath(path);
|
|
15940
|
-
if (!fieldPath)
|
|
15941
|
-
return;
|
|
15942
|
-
let value = field;
|
|
15943
|
-
const preField = getField(path);
|
|
15944
|
-
if (typeof field === "function") {
|
|
15945
|
-
value = field(preField);
|
|
15946
|
-
}
|
|
15947
|
-
const newField = updateType === "rewrite" ? value : { ...preField, ...value };
|
|
15948
|
-
set$1(fields.value, fieldPath, newField);
|
|
15949
|
-
};
|
|
15950
|
-
function findFieldIndex(path) {
|
|
15951
|
-
var _a;
|
|
15952
|
-
const fieldPath = getFieldPath(path);
|
|
15953
|
-
if (!fieldPath)
|
|
15954
|
-
return -1;
|
|
15955
|
-
return +(((_a = fieldPath.split(".").at(-1)) == null ? void 0 : _a.replaceAll(/.*\[(\d+)\]/g, "$1")) || -1);
|
|
15956
|
-
}
|
|
15957
|
-
const getParentField = (path) => {
|
|
15958
15939
|
if (!path)
|
|
15959
|
-
return
|
|
15960
|
-
|
|
15961
|
-
|
|
15940
|
+
return;
|
|
15941
|
+
updateField(path, ({ field: preField, fieldIndex, parentFields }) => {
|
|
15942
|
+
let value = field;
|
|
15943
|
+
if (typeof field === "function") {
|
|
15944
|
+
value = field(preField);
|
|
15945
|
+
}
|
|
15946
|
+
const newField = updateType === "rewrite" ? value : { ...preField, ...value };
|
|
15947
|
+
parentFields[fieldIndex] = newField;
|
|
15948
|
+
});
|
|
15962
15949
|
};
|
|
15963
15950
|
const deleteField = (path) => {
|
|
15964
15951
|
if (!path)
|
|
15965
15952
|
return;
|
|
15966
|
-
|
|
15967
|
-
|
|
15968
|
-
|
|
15969
|
-
groupFields == null ? void 0 : groupFields.splice(fieldIndex, 1);
|
|
15953
|
+
updateField(path, ({ fieldIndex, parentFields }) => {
|
|
15954
|
+
parentFields.splice(fieldIndex, 1);
|
|
15955
|
+
});
|
|
15970
15956
|
};
|
|
15971
15957
|
const addField = (path, field, placement) => {
|
|
15972
15958
|
if (path) {
|
|
15973
|
-
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
groupFields.splice(index2, 0, field);
|
|
15959
|
+
updateField(path, ({ fieldIndex, parentFields }) => {
|
|
15960
|
+
const index2 = placement === "after" ? fieldIndex + 1 : fieldIndex;
|
|
15961
|
+
parentFields.splice(index2, 0, field);
|
|
15962
|
+
});
|
|
15978
15963
|
} else if (placement === "after") {
|
|
15979
15964
|
fields.value.push(field);
|
|
15980
15965
|
} else {
|
|
@@ -15987,15 +15972,33 @@ const useFields = (initFields) => {
|
|
|
15987
15972
|
const prependField = (path, field) => {
|
|
15988
15973
|
addField(path, field, "before");
|
|
15989
15974
|
};
|
|
15975
|
+
const getFieldPath = (path) => {
|
|
15976
|
+
if (!path)
|
|
15977
|
+
return void 0;
|
|
15978
|
+
let res;
|
|
15979
|
+
updateField(path, ({ fieldPath }) => {
|
|
15980
|
+
res = fieldPath;
|
|
15981
|
+
});
|
|
15982
|
+
return res;
|
|
15983
|
+
};
|
|
15984
|
+
const getParentFields = (path) => {
|
|
15985
|
+
if (!path)
|
|
15986
|
+
return void 0;
|
|
15987
|
+
let res;
|
|
15988
|
+
updateField(path, ({ parentFields }) => {
|
|
15989
|
+
res = parentFields;
|
|
15990
|
+
});
|
|
15991
|
+
return res;
|
|
15992
|
+
};
|
|
15990
15993
|
return {
|
|
15991
15994
|
fields,
|
|
15992
15995
|
getField,
|
|
15993
|
-
getParentField,
|
|
15994
15996
|
setField,
|
|
15995
15997
|
deleteField,
|
|
15996
|
-
getFieldPath,
|
|
15997
15998
|
appendField,
|
|
15998
|
-
prependField
|
|
15999
|
+
prependField,
|
|
16000
|
+
getFieldPath,
|
|
16001
|
+
getParentFields
|
|
15999
16002
|
};
|
|
16000
16003
|
};
|
|
16001
16004
|
const useFormData = (initFormData) => {
|
|
@@ -16160,7 +16163,6 @@ async function validateConditions(conditions, baseParam) {
|
|
|
16160
16163
|
return result;
|
|
16161
16164
|
}
|
|
16162
16165
|
async function runRules(rules2, baseParam) {
|
|
16163
|
-
var _a, _b;
|
|
16164
16166
|
const { form, run, refs, message: message2, logQueue } = baseParam;
|
|
16165
16167
|
logQueue.push([[`逻辑执行规则: `, ["purple", "indent2"]]]);
|
|
16166
16168
|
for (let ruleIndex = 0; ruleIndex < rules2.length; ruleIndex += 1) {
|
|
@@ -16235,10 +16237,8 @@ async function runRules(rules2, baseParam) {
|
|
|
16235
16237
|
form.setField(path, (preField) => ({ ...preField, ...value }));
|
|
16236
16238
|
break;
|
|
16237
16239
|
case "validate":
|
|
16238
|
-
(_a = refs.formItemRefs[path]) == null ? void 0 : _a.validate();
|
|
16239
16240
|
break;
|
|
16240
16241
|
case "clearValidate":
|
|
16241
|
-
(_b = refs.formItemRefs[path]) == null ? void 0 : _b.restoreValidation();
|
|
16242
16242
|
break;
|
|
16243
16243
|
case "message":
|
|
16244
16244
|
message2.info(value);
|
|
@@ -16366,9 +16366,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16366
16366
|
const formData = inject(FORM_DATA);
|
|
16367
16367
|
const updateFormData = inject(UPDATE_FORM_DATA);
|
|
16368
16368
|
const updateRefs = inject(UPDATE_REFS);
|
|
16369
|
+
const getRef = inject(GET_REF);
|
|
16369
16370
|
const command = inject(COMMAND);
|
|
16370
16371
|
const updateActivePath = inject(UPDATE_ACTIVE_PATH);
|
|
16371
16372
|
const { getInitProps } = useInitProps();
|
|
16373
|
+
const triggerRefChange = () => {
|
|
16374
|
+
if (typeof props.component === "string" && COMPONENT_MAP.has(props.component))
|
|
16375
|
+
return;
|
|
16376
|
+
const formItemRef = getRef == null ? void 0 : getRef("formItemRefs", props.path);
|
|
16377
|
+
formItemRef == null ? void 0 : formItemRef.onFieldChange();
|
|
16378
|
+
};
|
|
16372
16379
|
const value = computed({
|
|
16373
16380
|
get() {
|
|
16374
16381
|
return get$1(formData == null ? void 0 : formData.value, props.path);
|
|
@@ -16380,6 +16387,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16380
16387
|
return;
|
|
16381
16388
|
}
|
|
16382
16389
|
updateFormData == null ? void 0 : updateFormData(props.path, val);
|
|
16390
|
+
triggerRefChange();
|
|
16383
16391
|
}
|
|
16384
16392
|
});
|
|
16385
16393
|
const forceUpdateKey = ref(0);
|
|
@@ -16445,7 +16453,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16445
16453
|
const setComponentRef = (el) => {
|
|
16446
16454
|
if (!el)
|
|
16447
16455
|
return;
|
|
16448
|
-
updateRefs == null ? void 0 : updateRefs(props.path, el
|
|
16456
|
+
updateRefs == null ? void 0 : updateRefs("fieldRefs", props.path, el);
|
|
16449
16457
|
};
|
|
16450
16458
|
onMounted(() => {
|
|
16451
16459
|
var _a, _b, _c;
|
|
@@ -16491,7 +16499,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16491
16499
|
};
|
|
16492
16500
|
}
|
|
16493
16501
|
});
|
|
16494
|
-
const
|
|
16502
|
+
const index_vue_vue_type_style_index_0_scoped_9a3bf1a0_lang = "";
|
|
16495
16503
|
const _export_sfc = (sfc, props) => {
|
|
16496
16504
|
const target = sfc.__vccOpts || sfc;
|
|
16497
16505
|
for (const [key, val] of props) {
|
|
@@ -16499,7 +16507,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
16499
16507
|
}
|
|
16500
16508
|
return target;
|
|
16501
16509
|
};
|
|
16502
|
-
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
16510
|
+
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-9a3bf1a0"]]);
|
|
16503
16511
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
16504
16512
|
...{
|
|
16505
16513
|
name: "ContainerFragment",
|
|
@@ -16560,12 +16568,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16560
16568
|
formItemRefs: {},
|
|
16561
16569
|
fieldRefs: {}
|
|
16562
16570
|
};
|
|
16563
|
-
const updateRefs = (path, childRef
|
|
16571
|
+
const updateRefs = (type4, path, childRef) => {
|
|
16564
16572
|
if (!path)
|
|
16565
16573
|
return;
|
|
16566
16574
|
refs[type4][path] = childRef;
|
|
16567
16575
|
};
|
|
16568
|
-
const
|
|
16576
|
+
const getRef = (type4, path) => {
|
|
16577
|
+
return refs[type4][path];
|
|
16578
|
+
};
|
|
16579
|
+
const exposed = shallowReactive({ refs, getRef });
|
|
16569
16580
|
const updateActivePath = (path) => {
|
|
16570
16581
|
var _a, _b;
|
|
16571
16582
|
if (props.form) {
|
|
@@ -16610,6 +16621,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16610
16621
|
provide(FORM_DATA, _formData);
|
|
16611
16622
|
provide(UPDATE_FORM_DATA, updateFormData);
|
|
16612
16623
|
provide(UPDATE_REFS, updateRefs);
|
|
16624
|
+
provide(GET_REF, getRef);
|
|
16613
16625
|
provide(COMMAND, command);
|
|
16614
16626
|
provide(UPDATE_ACTIVE_PATH, updateActivePath);
|
|
16615
16627
|
__expose(exposed);
|
|
@@ -16637,6 +16649,7 @@ export {
|
|
|
16637
16649
|
BaseField as B,
|
|
16638
16650
|
COMPONENT_MAP as C,
|
|
16639
16651
|
FORM_ITEM_SLOT_KEYS as F,
|
|
16652
|
+
GET_REF as G,
|
|
16640
16653
|
RULE_TYPE_MAP as R,
|
|
16641
16654
|
UPDATE_FORM_DATA as U,
|
|
16642
16655
|
_sfc_main as _,
|
package/es/form/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l, B, d, i, C, b, f, F, k, R, e, j, U, h, _, m, p, n, s, q, u, r, t } from "./index-
|
|
1
|
+
import { l, B, d, i, C, b, f, F, k, G, R, e, j, U, h, _, m, p, n, s, q, u, r, t } from "./index-b2d126ee.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "ant-design-vue";
|
|
4
4
|
import "../component-provider/index.js";
|
|
@@ -12,6 +12,7 @@ export {
|
|
|
12
12
|
f as FORM_DATA,
|
|
13
13
|
F as FORM_ITEM_SLOT_KEYS,
|
|
14
14
|
k as FunctionRegexp,
|
|
15
|
+
G as GET_REF,
|
|
15
16
|
R as RULE_TYPE_MAP,
|
|
16
17
|
e as SlotComponent,
|
|
17
18
|
j as UPDATE_ACTIVE_PATH,
|
package/es/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { ExpandedRowRender } from 'ant-design-vue/es/vc-table/interface';
|
|
|
25
25
|
import { ExtractPropTypes } from 'vue';
|
|
26
26
|
import { FieldData } from 'ant-design-vue/es/form/interface';
|
|
27
27
|
import { FilterValue } from 'ant-design-vue/es/table/interface';
|
|
28
|
+
import type { FormItemInstance } from 'ant-design-vue';
|
|
28
29
|
import type { FormItemProps } from 'ant-design-vue';
|
|
29
30
|
import { FormLabelAlign } from 'ant-design-vue/es/form/interface';
|
|
30
31
|
import { FormProps as FormProps_2 } from 'ant-design-vue';
|
|
@@ -377,6 +378,7 @@ declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefa
|
|
|
377
378
|
activePath: undefined;
|
|
378
379
|
}>, {
|
|
379
380
|
refs: Refs;
|
|
381
|
+
getRef: GetRef;
|
|
380
382
|
resetFields: (name?: NamePath | undefined) => void;
|
|
381
383
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
382
384
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -716,14 +718,14 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
716
718
|
}>>) => void;
|
|
717
719
|
resetQueryParams: () => void;
|
|
718
720
|
}) | undefined;
|
|
719
|
-
tableLayout?: TableLayout | undefined;
|
|
720
|
-
columns?: ColumnsType<any> | undefined;
|
|
721
721
|
scroll?: ({
|
|
722
722
|
x?: string | number | true | undefined;
|
|
723
723
|
y?: string | number | undefined;
|
|
724
724
|
} & {
|
|
725
725
|
scrollToFirstRowOnChange?: boolean | undefined;
|
|
726
726
|
}) | undefined;
|
|
727
|
+
columns?: ColumnsType<any> | undefined;
|
|
728
|
+
tableLayout?: TableLayout | undefined;
|
|
727
729
|
rowClassName?: string | RowClassName<any> | undefined;
|
|
728
730
|
showHeader?: boolean | undefined;
|
|
729
731
|
customRow?: GetComponentProps<any> | undefined;
|
|
@@ -1159,14 +1161,14 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
1159
1161
|
}>>) => void;
|
|
1160
1162
|
resetQueryParams: () => void;
|
|
1161
1163
|
}) | undefined;
|
|
1162
|
-
tableLayout?: TableLayout | undefined;
|
|
1163
|
-
columns?: ColumnsType<any> | undefined;
|
|
1164
1164
|
scroll?: ({
|
|
1165
1165
|
x?: string | number | true | undefined;
|
|
1166
1166
|
y?: string | number | undefined;
|
|
1167
1167
|
} & {
|
|
1168
1168
|
scrollToFirstRowOnChange?: boolean | undefined;
|
|
1169
1169
|
}) | undefined;
|
|
1170
|
+
columns?: ColumnsType<any> | undefined;
|
|
1171
|
+
tableLayout?: TableLayout | undefined;
|
|
1170
1172
|
rowClassName?: string | RowClassName<any> | undefined;
|
|
1171
1173
|
showHeader?: boolean | undefined;
|
|
1172
1174
|
customRow?: GetComponentProps<any> | undefined;
|
|
@@ -1606,14 +1608,14 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
1606
1608
|
}>>) => void;
|
|
1607
1609
|
resetQueryParams: () => void;
|
|
1608
1610
|
}) | undefined;
|
|
1609
|
-
tableLayout?: TableLayout | undefined;
|
|
1610
|
-
columns?: ColumnsType<any> | undefined;
|
|
1611
1611
|
scroll?: ({
|
|
1612
1612
|
x?: string | number | true | undefined;
|
|
1613
1613
|
y?: string | number | undefined;
|
|
1614
1614
|
} & {
|
|
1615
1615
|
scrollToFirstRowOnChange?: boolean | undefined;
|
|
1616
1616
|
}) | undefined;
|
|
1617
|
+
columns?: ColumnsType<any> | undefined;
|
|
1618
|
+
tableLayout?: TableLayout | undefined;
|
|
1617
1619
|
rowClassName?: string | RowClassName<any> | undefined;
|
|
1618
1620
|
showHeader?: boolean | undefined;
|
|
1619
1621
|
customRow?: GetComponentProps<any> | undefined;
|
|
@@ -1880,13 +1882,20 @@ declare interface FormProps extends FormProps_2 {
|
|
|
1880
1882
|
*/
|
|
1881
1883
|
export declare const FunctionRegexp: RegExp;
|
|
1882
1884
|
|
|
1885
|
+
export declare const GET_REF: InjectionKey<GetRef>;
|
|
1886
|
+
|
|
1883
1887
|
export declare type GetField = (path?: string) => Field | undefined;
|
|
1884
1888
|
|
|
1885
1889
|
export declare type GetFieldPath = (path?: string) => string | undefined;
|
|
1886
1890
|
|
|
1887
1891
|
export declare type GetFormData = (path?: string) => DeepReadonly<any>;
|
|
1888
1892
|
|
|
1889
|
-
export declare type
|
|
1893
|
+
export declare type GetParentFields = (path?: string) => Field | undefined;
|
|
1894
|
+
|
|
1895
|
+
export declare type GetRef = {
|
|
1896
|
+
(type: 'formItemRefs', path: string): FormItemInstance;
|
|
1897
|
+
(type: 'fieldRefs', path: string): any;
|
|
1898
|
+
};
|
|
1890
1899
|
|
|
1891
1900
|
export declare type Grid = boolean | RowProps;
|
|
1892
1901
|
|
|
@@ -4170,6 +4179,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4170
4179
|
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
4171
4180
|
}, {
|
|
4172
4181
|
refs: Refs;
|
|
4182
|
+
getRef: GetRef;
|
|
4173
4183
|
resetFields: (name?: NamePath | undefined) => void;
|
|
4174
4184
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
4175
4185
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -4382,6 +4392,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4382
4392
|
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
4383
4393
|
} & ShallowUnwrapRef<{
|
|
4384
4394
|
refs: Refs;
|
|
4395
|
+
getRef: GetRef;
|
|
4385
4396
|
resetFields: (name?: NamePath | undefined) => void;
|
|
4386
4397
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
4387
4398
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -4568,6 +4579,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
4568
4579
|
"onUpdate:activePath"?: ((val: string | undefined) => any) | undefined;
|
|
4569
4580
|
}, {
|
|
4570
4581
|
refs: Refs;
|
|
4582
|
+
getRef: GetRef;
|
|
4571
4583
|
resetFields: (name?: NamePath | undefined) => void;
|
|
4572
4584
|
clearValidate: (name?: NamePath | undefined) => void;
|
|
4573
4585
|
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
|
|
@@ -4935,14 +4947,14 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
4935
4947
|
}>>) => void;
|
|
4936
4948
|
resetQueryParams: () => void;
|
|
4937
4949
|
}) | undefined;
|
|
4938
|
-
tableLayout?: TableLayout | undefined;
|
|
4939
|
-
columns?: TableColumnsType<any> | undefined;
|
|
4940
4950
|
scroll?: ({
|
|
4941
4951
|
x?: string | number | true | undefined;
|
|
4942
4952
|
y?: string | number | undefined;
|
|
4943
4953
|
} & {
|
|
4944
4954
|
scrollToFirstRowOnChange?: boolean | undefined;
|
|
4945
4955
|
}) | undefined;
|
|
4956
|
+
columns?: TableColumnsType<any> | undefined;
|
|
4957
|
+
tableLayout?: TableLayout | undefined;
|
|
4946
4958
|
rowClassName?: string | RowClassName<any> | undefined;
|
|
4947
4959
|
showHeader?: boolean | undefined;
|
|
4948
4960
|
customRow?: GetComponentProps<any> | undefined;
|
|
@@ -5378,14 +5390,14 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
5378
5390
|
}>>) => void;
|
|
5379
5391
|
resetQueryParams: () => void;
|
|
5380
5392
|
}) | undefined;
|
|
5381
|
-
tableLayout?: TableLayout | undefined;
|
|
5382
|
-
columns?: TableColumnsType<any> | undefined;
|
|
5383
5393
|
scroll?: ({
|
|
5384
5394
|
x?: string | number | true | undefined;
|
|
5385
5395
|
y?: string | number | undefined;
|
|
5386
5396
|
} & {
|
|
5387
5397
|
scrollToFirstRowOnChange?: boolean | undefined;
|
|
5388
5398
|
}) | undefined;
|
|
5399
|
+
columns?: TableColumnsType<any> | undefined;
|
|
5400
|
+
tableLayout?: TableLayout | undefined;
|
|
5389
5401
|
rowClassName?: string | RowClassName<any> | undefined;
|
|
5390
5402
|
showHeader?: boolean | undefined;
|
|
5391
5403
|
customRow?: GetComponentProps<any> | undefined;
|
|
@@ -5825,14 +5837,14 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
5825
5837
|
}>>) => void;
|
|
5826
5838
|
resetQueryParams: () => void;
|
|
5827
5839
|
}) | undefined;
|
|
5828
|
-
tableLayout?: TableLayout | undefined;
|
|
5829
|
-
columns?: TableColumnsType<any> | undefined;
|
|
5830
5840
|
scroll?: ({
|
|
5831
5841
|
x?: string | number | true | undefined;
|
|
5832
5842
|
y?: string | number | undefined;
|
|
5833
5843
|
} & {
|
|
5834
5844
|
scrollToFirstRowOnChange?: boolean | undefined;
|
|
5835
5845
|
}) | undefined;
|
|
5846
|
+
columns?: TableColumnsType<any> | undefined;
|
|
5847
|
+
tableLayout?: TableLayout | undefined;
|
|
5836
5848
|
rowClassName?: string | RowClassName<any> | undefined;
|
|
5837
5849
|
showHeader?: boolean | undefined;
|
|
5838
5850
|
customRow?: GetComponentProps<any> | undefined;
|
|
@@ -5973,7 +5985,7 @@ export declare type ProTableInstance = ComponentExposed<typeof _default_3>;
|
|
|
5973
5985
|
declare type RangePickerSlots = FieldSlot<'dateRender' | 'renderExtraFooter' | 'separator'>;
|
|
5974
5986
|
|
|
5975
5987
|
export declare type Refs = {
|
|
5976
|
-
formItemRefs: Record<string,
|
|
5988
|
+
formItemRefs: Record<string, FormItemInstance>;
|
|
5977
5989
|
fieldRefs: Record<string, any>;
|
|
5978
5990
|
};
|
|
5979
5991
|
|
|
@@ -6061,7 +6073,7 @@ export declare const UPDATE_REFS: InjectionKey<UpdateRefs>;
|
|
|
6061
6073
|
|
|
6062
6074
|
export declare type UpdateFormData = (path: string, value: any) => void;
|
|
6063
6075
|
|
|
6064
|
-
export declare type UpdateRefs = (path: string, childRef: Record<string, any
|
|
6076
|
+
export declare type UpdateRefs = (type: keyof Refs, path: string, childRef: Record<string, any>) => void;
|
|
6065
6077
|
|
|
6066
6078
|
export declare type UseCommand = (param: {
|
|
6067
6079
|
refs: Refs;
|
|
@@ -6092,8 +6104,8 @@ export declare type UseFields = (initFields: Fields) => {
|
|
|
6092
6104
|
appendField: AppendField;
|
|
6093
6105
|
/** 在指定字段数据路径的字段配置前插入新的字段配置 */
|
|
6094
6106
|
prependField: PrependField;
|
|
6095
|
-
/**
|
|
6096
|
-
|
|
6107
|
+
/** 获取指定字段数据路径的字段所在字段分组 */
|
|
6108
|
+
getParentFields: GetParentFields;
|
|
6097
6109
|
};
|
|
6098
6110
|
|
|
6099
6111
|
export declare const useFields: UseFields;
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { _ as _sfc_main } from "./form/index-
|
|
3
|
-
import { l, B, d, i, C, b, f, F, k, R, e, j, U, h, m, p, n, s, q, u, r, t } from "./form/index-
|
|
2
|
+
import { _ as _sfc_main } from "./form/index-b2d126ee.js";
|
|
3
|
+
import { l, B, d, i, C, b, f, F, k, G, R, e, j, U, h, m, p, n, s, q, u, r, t } from "./form/index-b2d126ee.js";
|
|
4
4
|
import BaseTable from "./table/index.js";
|
|
5
5
|
import { useTable } from "./table/index.js";
|
|
6
6
|
import _sfc_main$1 from "./component-provider/index.js";
|
|
@@ -34,6 +34,7 @@ export {
|
|
|
34
34
|
f as FORM_DATA,
|
|
35
35
|
F as FORM_ITEM_SLOT_KEYS,
|
|
36
36
|
k as FunctionRegexp,
|
|
37
|
+
G as GET_REF,
|
|
37
38
|
INIT_PROPS_MAP,
|
|
38
39
|
INJECT_KEYS,
|
|
39
40
|
ProComponentProvider,
|
package/es/style.css
CHANGED
package/es/table/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createVNode, defineComponent, ref, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, withCtx, createTextVNode, createBlock, toDisplayString, createCommentVNode, mergeModels, useModel, computed, watch, Fragment, renderList, withModifiers, renderSlot, useAttrs, useSlots, mergeProps, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
2
2
|
import { Button, Space, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
|
|
3
3
|
import { useInjectProps, INJECT_KEYS } from "../component-provider/index.js";
|
|
4
|
-
import { A as AntdIcon, _ as _sfc_main$6, g as get, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-
|
|
4
|
+
import { A as AntdIcon, _ as _sfc_main$6, g as get, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-b2d126ee.js";
|
|
5
5
|
var ColumnHeightOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840 836H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm0-724H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM610.8 378c6 0 9.4-7 5.7-11.7L515.7 238.7a7.14 7.14 0 00-11.3 0L403.6 366.3a7.23 7.23 0 005.7 11.7H476v268h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V378h62.8z" } }] }, "name": "column-height", "theme": "outlined" };
|
|
6
6
|
const ColumnHeightOutlinedSvg = ColumnHeightOutlined$2;
|
|
7
7
|
function _objectSpread$2(target) {
|