@qin-ui/element-plus-pro 1.4.2 → 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 +2 -2
- 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/BaseFormItem/index.vue.d.ts +60 -9
- package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -1
- package/es/components/form/components/BaseFormItems/index.vue.d.ts +13 -0
- package/es/components/form/components/BaseFormItems/index.vue.d.ts.map +1 -0
- package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -1
- package/es/components/form/components/index.d.ts +6 -6
- package/es/components/form/components/index.d.ts.map +1 -1
- package/es/components/form/hooks/useGroupFieldAttrs.d.ts +10 -2
- package/es/components/form/hooks/useGroupFieldAttrs.d.ts.map +1 -1
- package/es/components/form/utils/fieldKey.d.ts +12 -0
- package/es/components/form/utils/fieldKey.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 +8 -7
- package/es/index.js +327 -174
- 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/BaseFormItem/index.vue +145 -176
- package/src/components/form/components/BaseFormItems/index.vue +183 -0
- package/src/components/form/components/ProForm/index.vue +13 -6
- package/src/components/form/components/index.ts +6 -6
- package/src/components/form/hooks/useGroupFieldAttrs.ts +104 -79
- package/src/components/form/utils/fieldKey.ts +64 -0
- 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,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-
|
|
2
|
+
"generatedAt": "2026-11-03T13:23:55.494Z",
|
|
3
3
|
"name": "@qin-ui/element-plus-pro",
|
|
4
4
|
"api": [
|
|
5
5
|
{
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"type": "component",
|
|
52
52
|
"package": "@qin-ui/element-plus-pro",
|
|
53
53
|
"signature": "<ProForm>",
|
|
54
|
-
"description": "配置驱动表单组件\n架构设计说明 (Architecture Overview)\n[ 数据层 (Core) ] => [ 绑定层 (ProForm) ] => [ 渲染层 (BaseFormItem / BaseField) ]\n1. 数据隔离:ProForm 本身不负责存储和管理表单状态,所有核心状态(formData, fields, 校验规则)\n均交由底层的 `useForm`(@qin-ui/pro-components-core)驱动。\n2. 上下文透传:通过 `provide` 将核心状态下发给子组件。\n3. 递归渲染:网格布局和具体字段的解析交由 `<
|
|
54
|
+
"description": "配置驱动表单组件\n架构设计说明 (Architecture Overview)\n[ 数据层 (Core) ] => [ 绑定层 (ProForm) ] => [ 渲染层 (BaseFormItems / BaseFormItem / BaseField) ]\n1. 数据隔离:ProForm 本身不负责存储和管理表单状态,所有核心状态(formData, fields, 校验规则)\n均交由底层的 `useForm`(@qin-ui/pro-components-core)驱动。\n2. 上下文透传:通过 `provide` 将核心状态下发给子组件。\n3. 递归渲染:网格布局和具体字段的解析交由 `<BaseFormItems>` 递归完成。\n通过配置驱动的方式快速构建表单,支持:\n- 字段联动(通过 setField、watch 等实现)\n- 嵌套字段(通过 fields 递归配置)\n- 自定义组件(通过 component 属性和 custom 类型)\n- 网格布局(通过 grid 属性)\n- 动态插槽(以字段 path 命名的插槽)\n- 全局配置注入(通过 ProComponentProvider)",
|
|
55
55
|
"params": [
|
|
56
56
|
{
|
|
57
57
|
"name": "form",
|
|
@@ -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,13 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { PropType, VNode } from 'vue';
|
|
2
|
+
import { Field, Grid } from '../../types';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
/** 字段配置 */
|
|
5
|
+
field: {
|
|
6
|
+
type: PropType<Field>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
/** 是否启用网格布局 */
|
|
10
|
+
grid: {
|
|
11
|
+
type: PropType<Grid>;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
/** 上层下发的禁用状态 */
|
|
15
|
+
disabled: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
/** FormItem 实例登记回调 */
|
|
20
|
+
setFormItemRef: {
|
|
21
|
+
type: PropType<(field: Field, el: any, getFormItemProps: () => any) => void>;
|
|
22
|
+
default: undefined;
|
|
23
|
+
};
|
|
24
|
+
/** 控件实例登记回调 */
|
|
25
|
+
setComponentRef: {
|
|
26
|
+
type: PropType<(field: Field, el: any) => void>;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
}>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
32
|
+
/** 字段配置 */
|
|
33
|
+
field: {
|
|
34
|
+
type: PropType<Field>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
/** 是否启用网格布局 */
|
|
38
|
+
grid: {
|
|
39
|
+
type: PropType<Grid>;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
/** 上层下发的禁用状态 */
|
|
43
|
+
disabled: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: undefined;
|
|
46
|
+
};
|
|
47
|
+
/** FormItem 实例登记回调 */
|
|
48
|
+
setFormItemRef: {
|
|
49
|
+
type: PropType<(field: Field, el: any, getFormItemProps: () => any) => void>;
|
|
50
|
+
default: undefined;
|
|
51
|
+
};
|
|
52
|
+
/** 控件实例登记回调 */
|
|
53
|
+
setComponentRef: {
|
|
54
|
+
type: PropType<(field: Field, el: any) => void>;
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
57
|
+
}>> & Readonly<{}>, {
|
|
8
58
|
disabled: boolean;
|
|
9
|
-
fields: Fields;
|
|
10
59
|
grid: Grid;
|
|
11
|
-
|
|
60
|
+
setFormItemRef: (field: Field, el: any, getFormItemProps: () => any) => void;
|
|
61
|
+
setComponentRef: (field: Field, el: any) => void;
|
|
62
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
12
63
|
export default _default;
|
|
13
64
|
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseFormItem/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseFormItem/index.vue"],"names":[],"mappings":"AAiLA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAML,KAAK,QAAQ,EACb,KAAK,KAAK,EACX,MAAM,KAAK,CAAC;AAGb,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;;IAa3C,WAAW;;cACc,QAAQ,CAAC,KAAK,CAAC;;;IACxC,eAAe;;cAEc,QAAQ,CAAC,IAAI,CAAC;;;IAG3C,gBAAgB;;;;;IAEhB,sBAAsB;;cAEF,QAAQ,CACxB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,GAAG,KAAK,IAAI,CAC7D;;;IAGH,eAAe;;cAEK,QAAQ,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,KAAK,IAAI,CAAC;;;;;;IAlB7D,WAAW;;cACc,QAAQ,CAAC,KAAK,CAAC;;;IACxC,eAAe;;cAEc,QAAQ,CAAC,IAAI,CAAC;;;IAG3C,gBAAgB;;;;;IAEhB,sBAAsB;;cAEF,QAAQ,CACxB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,GAAG,KAAK,IAAI,CAC7D;;;IAGH,eAAe;;cAEK,QAAQ,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,KAAK,IAAI,CAAC;;;;;;4BANjD,KAAK,MAAM,GAAG,oBAAoB,MAAM,GAAG,KAAK,IAAI;6BAM3B,KAAK,MAAM,GAAG,KAAK,IAAI;;AAtBhE,wBA+HG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Fields, Grid } from '../../types';
|
|
2
|
+
type Props = {
|
|
3
|
+
grid?: Grid;
|
|
4
|
+
fields?: Fields;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
fields: Fields;
|
|
10
|
+
grid: Grid;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseFormItems/index.vue"],"names":[],"mappings":"AA0NA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAOhD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;cADW,OAAO;YADT,MAAM;UADR,IAAI;;AA8Nb,wBAOG"}
|
|
@@ -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,16 +1,16 @@
|
|
|
1
1
|
import { ComponentProps, ComponentExposed } from 'vue-component-type-helpers';
|
|
2
2
|
import { default as ProForm } from './ProForm/index.vue';
|
|
3
|
-
import { default as
|
|
3
|
+
import { default as BaseFormItems } from './BaseFormItems/index.vue';
|
|
4
4
|
export { default as BaseField } from './BaseField/index.vue';
|
|
5
5
|
export { default as ContainerFragment } from './ContainerFragment/index.vue';
|
|
6
6
|
export { default as SlotComponent } from './SlotComponent/index.vue';
|
|
7
|
-
export { ProForm,
|
|
7
|
+
export { ProForm, BaseFormItems };
|
|
8
8
|
/** ProForm 组件实例 */
|
|
9
9
|
export type ProFormInstance = ComponentExposed<typeof ProForm>;
|
|
10
10
|
/** ProForm 组件属性 */
|
|
11
11
|
export type ProFormProps = ComponentProps<typeof ProForm>;
|
|
12
|
-
/**
|
|
13
|
-
export type
|
|
14
|
-
/**
|
|
15
|
-
export type
|
|
12
|
+
/** BaseFormItems 组件实例(字段级 FormItem) */
|
|
13
|
+
export type ProFormItemsInstance = ComponentExposed<typeof BaseFormItems>;
|
|
14
|
+
/** BaseFormItems 组件属性(字段级 FormItem) */
|
|
15
|
+
export type ProFormItemsProps = ComponentProps<typeof BaseFormItems>;
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;AAGlC,mBAAmB;AACnB,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,OAAO,CAAC,CAAC;AAC/D,mBAAmB;AACnB,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;AAE1D,uCAAuC;AACvC,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1E,uCAAuC;AACvC,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComputedRef } from 'vue';
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
2
2
|
import { FormItemProps, GridItemProps } from '../../../shared/ui';
|
|
3
3
|
import { FORM_ITEM_SLOT_KEYS } from '../constants';
|
|
4
4
|
import { Base, Field } from '../types';
|
|
@@ -11,7 +11,6 @@ export interface GroupedField {
|
|
|
11
11
|
componentProps: Record<string, any>;
|
|
12
12
|
container?: Base['formItemContainer'];
|
|
13
13
|
rawField: Field;
|
|
14
|
-
renderKey: string | number;
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
16
|
* 将 fields 配置数组逐个拆分为 grid / formItem / component / slots 分组。
|
|
@@ -24,4 +23,13 @@ export interface GroupedField {
|
|
|
24
23
|
* @returns {ComputedRef<GroupedField[]>} 分组后的字段属性数组
|
|
25
24
|
*/
|
|
26
25
|
export declare function useGroupFieldAttrs(validFields: ComputedRef<Field[]>): ComputedRef<GroupedField[]>;
|
|
26
|
+
/**
|
|
27
|
+
* 将单个字段配置拆分为 grid / formItem / component / slots 分组
|
|
28
|
+
*
|
|
29
|
+
* @description 拆分规则与 `useGroupFieldAttrs` 一致,结果依赖该字段自身配置与 Provider 的 `pro-form-item` 默认值。
|
|
30
|
+
*
|
|
31
|
+
* @param {MaybeRefOrGetter<Field>} field - 待拆分的字段配置
|
|
32
|
+
* @returns {ComputedRef<GroupedField>} 单字段渲染分组
|
|
33
|
+
*/
|
|
34
|
+
export declare function useGroupedField(field: MaybeRefOrGetter<Field>): ComputedRef<GroupedField>;
|
|
27
35
|
//# sourceMappingURL=useGroupFieldAttrs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGroupFieldAttrs.d.ts","sourceRoot":"","sources":["../../../../src/components/form/hooks/useGroupFieldAttrs.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useGroupFieldAttrs.d.ts","sourceRoot":"","sources":["../../../../src/components/form/hooks/useGroupFieldAttrs.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAA+B,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAQ5C,wCAAwC;AACxC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;IACjE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACtC,QAAQ,EAAE,KAAK,CAAC;CACjB;AAiFD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,+BAQnE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,6BAO7D"}
|
|
@@ -10,4 +10,16 @@
|
|
|
10
10
|
* @returns 字段渲染 key
|
|
11
11
|
*/
|
|
12
12
|
export declare const getFieldKey: (field: unknown) => string | number;
|
|
13
|
+
/**
|
|
14
|
+
* 字段的数据行渲染 key
|
|
15
|
+
*
|
|
16
|
+
* @description 沿字段路径逐段解析原始表单数据,取路径经过的对象数组行元素身份与行内剩余路径组成 key;
|
|
17
|
+
* 同一数据行对象在数组增删 / 重排后恒得同一 key。路径不经过对象数组行、行元素为原始值或数据缺失时,
|
|
18
|
+
* 回退到 {@link getFieldKey} 的字段对象身份。同 key 的去重由调用方按兄弟列表收敛。
|
|
19
|
+
*
|
|
20
|
+
* @param field - 字段配置项
|
|
21
|
+
* @param rawFormData - 原始表单数据(非响应式对象)
|
|
22
|
+
* @returns 数据行 key;无法定位数据行时返回字段对象身份 key
|
|
23
|
+
*/
|
|
24
|
+
export declare const getFieldDataKey: (field: unknown, rawFormData: unknown) => string | number;
|
|
13
25
|
//# sourceMappingURL=fieldKey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldKey.d.ts","sourceRoot":"","sources":["../../../../src/components/form/utils/fieldKey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fieldKey.d.ts","sourceRoot":"","sources":["../../../../src/components/form/utils/fieldKey.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,MAUrD,CAAC;AAmBF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,OAAO,EACd,aAAa,OAAO,KACnB,MAAM,GAAG,MA6BX,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;;;;;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;;;;;;;;eAqb/C,UAAU,CAAC,MAAM,CAAC;kBACf,OAAO;;QAlbjB,yBAAyB;gBACjB,CAAC;QACT,eAAe;iBACN,MAAM,OAAO,CAAC,OAAO,CAAC;QAC/B,iBAAiB;yBACA,OAAO;QACxB,oBAAoB;0BACF,OAAO;QACzB,gDAAgD;kBACtC,OAAO,GAAG,OAAO;YA3B3B,iBAAiB;yBACJ,OAAO;YACpB,2BAA2B;2BACZ,OAAO,GAAG,mBAAmB,CAAC,IAAI,4BAWI,CAAC,+DAXO,CAAC;UAwB1B;QACpC,kBAAkB;;YApBlB,eAAe;qBACN,OAAO;YAChB,eAAe;wBACH,kBAAkB,GAAG,KAAK;;QAmBtC,eAAe;yBACE,kBAAkB,GAAG,KAAK;QAC3C,uFAAuF;kBAC7E,OAAO,4BAnBoC,CAAC,+DAmBzB;QAC7B,kCAAkC;eAC3B,4BArB8C,CAAC,iEAqBnC;QACnB,sBAAsB;qBACT,KAAK,GAAG,OAAO,CAAC,eAAe,CAAC;+CAoqB+C,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;QArS7C,8CAA8C;;MAqSqB,GAAG,IAAI;WACpE,GAAG;8CA9D4E,GAAG;+BAEvD,GAAG;8BACH,GAAG;yBACR,GAAG;uBACL,GAAG;;UA2DxB,sCA/rBgD,CAAC,6MA+rBP;EAE7C,KACQ,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,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI;IAC/C,YAAY;IACZ,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACtB,YAAY;IACZ,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAClB,UAAU;IACV,MAAM,EAAE,MAAM,CAAC;IACf,WAAW;IACX,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,OAAO,CACjD,IAAI,CAAC,UAAU,CA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AC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC,CACnE,GAAG;IACF,kBAAkB;IAClB,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACxC,cAAc;IACd,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,mBAAmB;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI;IAC7E,kDAAkD;IAClD,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACpC,iCAAiC;IACjC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC;IACnB,sCAAsC;IACtC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC;IACnB,gBAAgB;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
|
package/es/element-plus-pro.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* 分组字段的嵌套 FormItem 间距 */
|
|
2
|
+
[class*='-form-item'] [class*='-form-item'][data-v-6e6641b4] {
|
|
2
3
|
margin-bottom: 18px;
|
|
3
4
|
}
|
|
4
5
|
.pro-table_search-form[data-v-419025fd] [class*='-form-item'] {
|
|
@@ -43,24 +44,24 @@
|
|
|
43
44
|
.pro-table_column-control_button[data-v-4d2b4f1c] svg {
|
|
44
45
|
transform: scale(1.2, 1.4);
|
|
45
46
|
}
|
|
46
|
-
.pro-table_header[data-v-
|
|
47
|
+
.pro-table_header[data-v-6a338bf0] {
|
|
47
48
|
display: flex;
|
|
48
49
|
align-items: center;
|
|
49
50
|
justify-content: flex-end;
|
|
50
51
|
}
|
|
51
|
-
.pro-table_header[data-v-
|
|
52
|
+
.pro-table_header[data-v-6a338bf0]:empty {
|
|
52
53
|
display: none;
|
|
53
54
|
}
|
|
54
|
-
.pro-table_header + .pro-table_header_content[data-v-
|
|
55
|
+
.pro-table_header + .pro-table_header_content[data-v-6a338bf0] {
|
|
55
56
|
margin-top: 16px;
|
|
56
57
|
}
|
|
57
|
-
.pro-table_header_button-bar[data-v-
|
|
58
|
+
.pro-table_header_button-bar[data-v-6a338bf0] {
|
|
58
59
|
flex: 1;
|
|
59
60
|
}
|
|
60
|
-
.pro-table_header_toolbar[data-v-
|
|
61
|
+
.pro-table_header_toolbar[data-v-6a338bf0] {
|
|
61
62
|
margin-left: 12px;
|
|
62
63
|
}
|
|
63
|
-
.pro-table_pagination[data-v-
|
|
64
|
+
.pro-table_pagination[data-v-6a338bf0] {
|
|
64
65
|
justify-content: flex-end;
|
|
65
66
|
padding: 16px 0;
|
|
66
67
|
}
|