@qin-ui/element-plus-pro 1.4.3 → 1.4.4
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/api.json +1 -1
- package/es/components/component-provider/components/index.vue.d.ts.map +1 -1
- package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -1
- package/es/components/form/components/BaseField/utils/index.d.ts +2 -1
- package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -1
- package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -1
- package/es/components/table/components/ProTable.vue.d.ts.map +1 -1
- package/es/components/table/types/index.d.ts +1 -0
- package/es/components/table/types/index.d.ts.map +1 -1
- package/es/element-plus-pro.css +6 -6
- package/es/index.js +54 -26
- package/es/index.js.map +1 -1
- package/es/shared/core/index.d.ts +1 -1
- package/es/shared/core/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/component-provider/components/index.vue +25 -8
- package/src/components/form/components/BaseField/index.vue +20 -12
- package/src/components/form/components/BaseField/utils/index.ts +8 -3
- package/src/components/form/components/ProForm/index.vue +9 -2
- package/src/components/table/components/ProTable.vue +11 -5
- package/src/components/table/types/index.ts +1 -0
- package/src/shared/core/index.ts +2 -0
package/api.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/components/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/components/index.vue"],"names":[],"mappings":"AAgMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEpE,KAAK,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,CAAC;AAOxD,KAAK,KAAK,GAAG;IACX;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC7B,CAAC;AA2FF,iBAAS,cAAc;WAoBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;mBA1IH,aAAa;kBAKd,YAAY;YAMlB,OAAO,CAAC,SAAS,CAAC;6EAsI3B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"AA6PA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,KAAK,CAAC;AA4Bb,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;;;qCA4J6D,GAAG;;UA7JzD,MAAM;eADD,MAAM,GAAG,SAAS;;;;AAyQhC,wBASG"}
|
|
@@ -3,7 +3,8 @@ type LocaleT = (key: string, params?: Record<string, string | number>) => string
|
|
|
3
3
|
/**
|
|
4
4
|
* 组件初始属性:以内置默认值为底,按下发组件名补默认占位符文案
|
|
5
5
|
*
|
|
6
|
-
* @description
|
|
6
|
+
* @description 占位符按 `component` 与 `type` 拼接的键查表(如 `input.password`),
|
|
7
|
+
* 该键无占位符映射时回落到基础组件名;`component` 非字符串时返回空记录。
|
|
7
8
|
* @param {Field} field - 字段配置
|
|
8
9
|
* @param {Record<string, any>} injectProps - Provider 下发的组件默认属性
|
|
9
10
|
* @param {LocaleT} t - 取文案的翻译函数
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/components/BaseField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,KAAK,OAAO,GAAG,CACb,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAAM,CAAC;AA2DZ
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/components/BaseField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,KAAK,OAAO,GAAG,CACb,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAAM,CAAC;AA2DZ;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,KAAK,EACZ,aAAa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAK,EACrC,GAAG,OAAO,KACT,MAAM,CAAC,MAAM,EAAE,GAAG,CAWpB,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,QAMhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ProForm/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ProForm/index.vue"],"names":[],"mappings":"AAqMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EASL,KAAK,IAAI,EACV,MAAM,KAAK,CAAC;AAIb,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAOpD,OAAO,EAAW,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAC;yBAGxC,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAC1C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAqMO,mBAAmB,CAAC;eA/LnB,IAAI;eACJ,CAAC;0DA8LoF,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;wDA9GgC,CAAC;;;;mBAEjB,OAAO;;iBAGwB,IAAI;8CALnB,CAAC;;;;mBAEjB,OAAO;;iBAGwB,IAAI;;UA2GvD,EAAE;EAEL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAhNzE,wBAgN4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"AAyoBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,UAAU,EACf,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAC;AAkB5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAgBjD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;yBAG5C,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,EAC5C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAstBO,mBAAmB,CAAC;qEA3rB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,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAjuBzE,wBAiuB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -54,6 +54,7 @@ export type Column<D extends Data = Data> = Partial<Omit<ColumnType<any>, 'prop'
|
|
|
54
54
|
* 列是否隐藏;支持布尔、Ref 与 ComputedRef 形式,渲染期按 `toValue` 取值
|
|
55
55
|
*
|
|
56
56
|
* 分组列的子列同样参与过滤(递归生效)。
|
|
57
|
+
* 只读 ref(如 `computed`)经 `setColumn` 写入时会被普通值替换,可写 ref 保持绑定。
|
|
57
58
|
*/
|
|
58
59
|
hidden?: MaybeRefOrComputedRef<boolean>;
|
|
59
60
|
/** 自定义渲染函数 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACjD,KAAK,qBAAqB,CAAC,CAAC,GAAG,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAEnE,KAAK,eAAe,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI;IAC5C,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;CAC5C,CAAC,gBAAgB,CAAC,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,MAAM,WAAW,CAAC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AsC;IACtC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC;IACnB,gBAAgB;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
|
package/es/element-plus-pro.css
CHANGED
|
@@ -44,24 +44,24 @@
|
|
|
44
44
|
.pro-table_column-control_button[data-v-4d2b4f1c] svg {
|
|
45
45
|
transform: scale(1.2, 1.4);
|
|
46
46
|
}
|
|
47
|
-
.pro-table_header[data-v-
|
|
47
|
+
.pro-table_header[data-v-6a338bf0] {
|
|
48
48
|
display: flex;
|
|
49
49
|
align-items: center;
|
|
50
50
|
justify-content: flex-end;
|
|
51
51
|
}
|
|
52
|
-
.pro-table_header[data-v-
|
|
52
|
+
.pro-table_header[data-v-6a338bf0]:empty {
|
|
53
53
|
display: none;
|
|
54
54
|
}
|
|
55
|
-
.pro-table_header + .pro-table_header_content[data-v-
|
|
55
|
+
.pro-table_header + .pro-table_header_content[data-v-6a338bf0] {
|
|
56
56
|
margin-top: 16px;
|
|
57
57
|
}
|
|
58
|
-
.pro-table_header_button-bar[data-v-
|
|
58
|
+
.pro-table_header_button-bar[data-v-6a338bf0] {
|
|
59
59
|
flex: 1;
|
|
60
60
|
}
|
|
61
|
-
.pro-table_header_toolbar[data-v-
|
|
61
|
+
.pro-table_header_toolbar[data-v-6a338bf0] {
|
|
62
62
|
margin-left: 12px;
|
|
63
63
|
}
|
|
64
|
-
.pro-table_pagination[data-v-
|
|
64
|
+
.pro-table_pagination[data-v-6a338bf0] {
|
|
65
65
|
justify-content: flex-end;
|
|
66
66
|
padding: 16px 0;
|
|
67
67
|
}
|
package/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./element-plus-pro.css";
|
|
2
2
|
import { inject, computed, toValue, provide, defineComponent, createBlock, renderSlot, openBlock, resolveDynamicComponent, normalizeProps, mergeProps, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, ref, createCommentVNode, createSlots, renderList, createVNode, watch, h, toRaw, unref, useSlots, shallowRef, onUpdated, triggerRef, withModifiers, createElementVNode, normalizeStyle, nextTick, mergeModels, useModel, onMounted, resolveDirective, normalizeClass, withDirectives, guardReactiveProps, effect, stop, Comment, Text } from "vue";
|
|
3
3
|
import { ElTable, ElPagination, ElCol, ElFormItem, useFormDisabled, ElTransfer, ElTreeSelect, ElSlider, ElSwitch, ElRadioGroup, ElCheckboxGroup, ElTimeSelect, ElTimePicker, ElDatePicker, ElCascader, ElSelect, ElAutocomplete, ElInputNumber, ElInput, localeContextKey, useLocale as useLocale$1, ElRow, ElForm, ElSpace, ElButton, useSize, ElDropdown, ElDropdownMenu, ElDropdownItem, ElCheckbox, ElTableColumn, ElLoading } from "element-plus";
|
|
4
|
-
import { useForm as useForm$1, zhCN as zhCN$1, zhTW as zhTW$1, enUS as enUS$1, resolveLocaleName, format, useReactiveAttrs, cloneDeep, getObject, InjectionFormSlotsKey, isPlainObject, resolveFieldIdentity, normalizePathKey, toPath, isObjectItem, InjectionFormKey, createFormProxy,
|
|
4
|
+
import { useForm as useForm$1, zhCN as zhCN$1, zhTW as zhTW$1, enUS as enUS$1, resolveLocaleName, format, useReactiveAttrs, cloneDeep, getObject, omitBy, InjectionFormSlotsKey, isPlainObject, resolveFieldIdentity, normalizePathKey, toPath, isObjectItem, InjectionFormKey, createFormProxy, camelizeProperties, useFields as useFields$1, useFormRef as useFormRef$1, useSearchFormExpand, get, pick, callListeners, isPromise, useTable as useTable$1, omit, mergeComponentVars } from "@qin-ui/pro-components-core";
|
|
5
5
|
import { useFormData } from "@qin-ui/pro-components-core";
|
|
6
6
|
const _tableProps = ElTable.props || {};
|
|
7
7
|
const _paginationProps = ElPagination.props || {};
|
|
@@ -321,8 +321,9 @@ const getPlaceholderProps = (key, injectProps, t) => {
|
|
|
321
321
|
const getInitProps = (field, injectProps = {}, t) => {
|
|
322
322
|
const { component, type } = field;
|
|
323
323
|
if (typeof component === "string") {
|
|
324
|
-
const
|
|
325
|
-
|
|
324
|
+
const subtypeKey = [component, type].filter(Boolean).join(".");
|
|
325
|
+
const key = PLACEHOLDER_KEYS[subtypeKey] || RANGE_PLACEHOLDER_KEYS[subtypeKey] ? subtypeKey : component;
|
|
326
|
+
return { ...injectProps, ...getPlaceholderProps(key, injectProps, t) };
|
|
326
327
|
}
|
|
327
328
|
return {};
|
|
328
329
|
};
|
|
@@ -413,9 +414,11 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
413
414
|
const componentRef = ref();
|
|
414
415
|
const attrs = useReactiveAttrs();
|
|
415
416
|
const typeVal = attrs.type;
|
|
416
|
-
const
|
|
417
|
-
const
|
|
418
|
-
const
|
|
417
|
+
const baseConfigKey = typeof props.component === "string" ? props.component : "";
|
|
418
|
+
const typeConfigKey = typeVal || (baseConfigKey === "date-picker" ? "date" : "");
|
|
419
|
+
const subtypeConfigKey = baseConfigKey && typeConfigKey ? `${baseConfigKey}.${typeConfigKey}` : "";
|
|
420
|
+
const baseInjectConfig = baseConfigKey ? getInjectConfig(baseConfigKey) : void 0;
|
|
421
|
+
const subtypeInjectConfig = subtypeConfigKey ? getInjectConfig(subtypeConfigKey) : void 0;
|
|
419
422
|
const componentVars = inject(INJECT_COMPONENT_VARS, void 0);
|
|
420
423
|
const value = computed({
|
|
421
424
|
get() {
|
|
@@ -447,10 +450,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
447
450
|
});
|
|
448
451
|
const parentDisabled = useDisabledContext();
|
|
449
452
|
const groupedAttrs = computed(() => {
|
|
450
|
-
var _a;
|
|
453
|
+
var _a, _b;
|
|
451
454
|
const currentInjectProps = {
|
|
452
|
-
...
|
|
453
|
-
...getObject(
|
|
455
|
+
...getObject(baseInjectConfig == null ? void 0 : baseInjectConfig.default),
|
|
456
|
+
...getObject(subtypeInjectConfig == null ? void 0 : subtypeInjectConfig.default),
|
|
457
|
+
...getObject((_a = toValue(componentVars)) == null ? void 0 : _a[baseConfigKey]),
|
|
458
|
+
...getObject((_b = toValue(componentVars)) == null ? void 0 : _b[subtypeConfigKey])
|
|
454
459
|
};
|
|
455
460
|
const initProps = getInitProps(
|
|
456
461
|
{
|
|
@@ -468,7 +473,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
468
473
|
);
|
|
469
474
|
const mergedProps = mergeProps(
|
|
470
475
|
initProps,
|
|
471
|
-
|
|
476
|
+
// 未赋值(undefined)的键不作为显式值下发,保留注入默认值与占位符兜底
|
|
477
|
+
omitBy(attrs, (value2) => value2 === void 0),
|
|
472
478
|
{ class: attrs.componentClass, style: attrs.componentStyle },
|
|
473
479
|
{ disabled: effectiveDisabled },
|
|
474
480
|
{ modelProp: modelPropName }
|
|
@@ -919,10 +925,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
919
925
|
var _a;
|
|
920
926
|
return (_a = currentForm.value) == null ? void 0 : _a.formData;
|
|
921
927
|
});
|
|
922
|
-
const
|
|
923
|
-
|
|
924
|
-
return (
|
|
925
|
-
|
|
928
|
+
const formRefSetter = computed(() => {
|
|
929
|
+
const form = currentForm.value;
|
|
930
|
+
return (el) => {
|
|
931
|
+
var _a;
|
|
932
|
+
return (_a = form == null ? void 0 : form.setFormRef) == null ? void 0 : _a.call(form, el);
|
|
933
|
+
};
|
|
934
|
+
});
|
|
926
935
|
let formInstanceCounter = 0;
|
|
927
936
|
const formInstanceKeyMap = /* @__PURE__ */ new WeakMap();
|
|
928
937
|
const getFormKey = (f) => {
|
|
@@ -962,7 +971,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
962
971
|
return (_ctx, _cache) => {
|
|
963
972
|
return openBlock(), createBlock(unref(ElForm), mergeProps({
|
|
964
973
|
key: formKey.value,
|
|
965
|
-
ref:
|
|
974
|
+
ref: formRefSetter.value,
|
|
966
975
|
model: formData.value
|
|
967
976
|
}, formAttrs.value, {
|
|
968
977
|
class: "pro-form",
|
|
@@ -1605,16 +1614,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1605
1614
|
if (props.search && attrs.onSearch) {
|
|
1606
1615
|
warnSearchConfig("duplicate");
|
|
1607
1616
|
}
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1617
|
+
const results = callListeners(search);
|
|
1618
|
+
if (!results.length) return;
|
|
1619
|
+
const promises = results.filter(isPromise);
|
|
1620
|
+
if (!promises.length) {
|
|
1611
1621
|
warnSearchConfig("not-promise");
|
|
1612
1622
|
return;
|
|
1613
1623
|
}
|
|
1614
1624
|
const seq = ++searchSequence;
|
|
1615
1625
|
loading.value = true;
|
|
1616
1626
|
try {
|
|
1617
|
-
await
|
|
1627
|
+
const settled = await Promise.allSettled(promises);
|
|
1628
|
+
const rejected = settled.find((item) => item.status === "rejected");
|
|
1629
|
+
if (rejected) throw rejected.reason;
|
|
1618
1630
|
} finally {
|
|
1619
1631
|
if (seq === searchSequence) {
|
|
1620
1632
|
loading.value = false;
|
|
@@ -1782,8 +1794,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1782
1794
|
});
|
|
1783
1795
|
};
|
|
1784
1796
|
const onPaginationChange = (currentPage, pageSize) => {
|
|
1785
|
-
|
|
1786
|
-
(_a = attrs.onChange) == null ? void 0 : _a.call(attrs, currentPage, pageSize);
|
|
1797
|
+
callListeners(attrs.onChange, currentPage, pageSize);
|
|
1787
1798
|
};
|
|
1788
1799
|
const searchFormVisible = computed(() => {
|
|
1789
1800
|
var _a, _b, _c, _d;
|
|
@@ -1907,7 +1918,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1907
1918
|
};
|
|
1908
1919
|
}
|
|
1909
1920
|
});
|
|
1910
|
-
const ProTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
1921
|
+
const ProTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6a338bf0"]]);
|
|
1911
1922
|
function useTable(params = {}) {
|
|
1912
1923
|
const { data, columns, ...rest } = params;
|
|
1913
1924
|
const coreTable = useTable$1({
|
|
@@ -1940,6 +1951,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1940
1951
|
(key) => {
|
|
1941
1952
|
const config = INJECT_CONFIG[key];
|
|
1942
1953
|
const ignored = config.ignoreProps;
|
|
1954
|
+
const parentConfig = inject(config.injectionKey, void 0);
|
|
1943
1955
|
provide(
|
|
1944
1956
|
config.injectionKey,
|
|
1945
1957
|
computed(
|
|
@@ -1948,6 +1960,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1948
1960
|
return omit(
|
|
1949
1961
|
{
|
|
1950
1962
|
...config.default,
|
|
1963
|
+
...toValue(parentConfig) || {},
|
|
1951
1964
|
...getObject((_a = props.componentVars) == null ? void 0 : _a[key])
|
|
1952
1965
|
},
|
|
1953
1966
|
ignored ?? []
|
|
@@ -1961,12 +1974,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1961
1974
|
Object.keys(props.componentVars).forEach((key) => {
|
|
1962
1975
|
if (!(key in INJECT_CONFIG)) {
|
|
1963
1976
|
const config = ensureInjectConfig(key);
|
|
1977
|
+
const parentConfig = inject(config.injectionKey, void 0);
|
|
1964
1978
|
provide(
|
|
1965
1979
|
config.injectionKey,
|
|
1966
1980
|
computed(() => {
|
|
1967
1981
|
var _a;
|
|
1968
1982
|
return {
|
|
1969
|
-
...
|
|
1983
|
+
...toValue(parentConfig) || {},
|
|
1970
1984
|
...getObject((_a = props.componentVars) == null ? void 0 : _a[key])
|
|
1971
1985
|
};
|
|
1972
1986
|
})
|
|
@@ -1974,17 +1988,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1974
1988
|
}
|
|
1975
1989
|
});
|
|
1976
1990
|
}
|
|
1991
|
+
const parentComponentVars = inject(INJECT_COMPONENT_VARS, void 0);
|
|
1977
1992
|
provide(
|
|
1978
1993
|
INJECT_COMPONENT_VARS,
|
|
1979
|
-
computed(
|
|
1994
|
+
computed(
|
|
1995
|
+
() => mergeComponentVars(
|
|
1996
|
+
toValue(parentComponentVars),
|
|
1997
|
+
props.componentVars
|
|
1998
|
+
)
|
|
1999
|
+
)
|
|
1980
2000
|
);
|
|
2001
|
+
const parentComponents = inject(INJECT_COMPONENTS, void 0);
|
|
1981
2002
|
provide(
|
|
1982
2003
|
INJECT_COMPONENTS,
|
|
1983
|
-
computed(() =>
|
|
2004
|
+
computed(() => ({
|
|
2005
|
+
...toValue(parentComponents) || {},
|
|
2006
|
+
...props.componentMap ?? {}
|
|
2007
|
+
}))
|
|
1984
2008
|
);
|
|
2009
|
+
const parentLocale = inject(LOCALE_INJECT_KEY, void 0);
|
|
1985
2010
|
provide(
|
|
1986
2011
|
LOCALE_INJECT_KEY,
|
|
1987
|
-
computed(() =>
|
|
2012
|
+
computed(() => ({
|
|
2013
|
+
...toValue(parentLocale) || {},
|
|
2014
|
+
...props.locale ?? {}
|
|
2015
|
+
}))
|
|
1988
2016
|
);
|
|
1989
2017
|
return (_ctx, _cache) => {
|
|
1990
2018
|
return renderSlot(_ctx.$slots, "default");
|