@qin-ui/antd-vue-pro 2.4.5 → 2.5.0
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/AI-CONTEXT.md +26 -2
- package/README.md +44 -37
- package/api.json +24 -9
- package/es/antd-vue-pro.css +15 -15
- package/es/components/component-provider/components/index.vue.d.ts +3 -3
- package/es/components/component-provider/components/index.vue.d.ts.map +1 -1
- package/es/components/component-provider/constants/index.d.ts +20 -4
- package/es/components/component-provider/constants/index.d.ts.map +1 -1
- package/es/components/component-provider/types/index.d.ts +7 -3
- package/es/components/component-provider/types/index.d.ts.map +1 -1
- package/es/components/form/components/BaseField/index.vue.d.ts +7 -1
- package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -1
- package/es/components/form/components/BaseField/utils/index.d.ts +18 -0
- package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -1
- package/es/components/form/components/BaseFormItem/index.vue.d.ts +3 -0
- package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -1
- package/es/components/form/components/ContainerFragment/index.vue.d.ts +1 -0
- package/es/components/form/components/ContainerFragment/index.vue.d.ts.map +1 -1
- package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -1
- package/es/components/form/components/SlotComponent/index.vue.d.ts +1 -0
- package/es/components/form/components/SlotComponent/index.vue.d.ts.map +1 -1
- package/es/components/form/components/index.d.ts +4 -0
- package/es/components/form/components/index.d.ts.map +1 -1
- package/es/components/form/constants/index.d.ts.map +1 -1
- package/es/components/form/hooks/useFields.d.ts +2 -0
- package/es/components/form/hooks/useFields.d.ts.map +1 -1
- package/es/components/form/hooks/useGroupFieldAttrs.d.ts +10 -0
- package/es/components/form/hooks/useGroupFieldAttrs.d.ts.map +1 -1
- package/es/components/form/index.d.ts +2 -2
- package/es/components/form/index.d.ts.map +1 -1
- package/es/components/form/types/index.d.ts +75 -44
- package/es/components/form/types/index.d.ts.map +1 -1
- package/es/components/form/utils/fieldKey.d.ts +13 -0
- package/es/components/form/utils/fieldKey.d.ts.map +1 -0
- package/es/components/table/components/ColumnControl.vue.d.ts +3 -0
- package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -1
- package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts.map +1 -1
- package/es/components/table/components/DefaultTableContainer.vue.d.ts.map +1 -1
- package/es/components/table/components/ProTable.vue.d.ts +8 -1
- package/es/components/table/components/ProTable.vue.d.ts.map +1 -1
- package/es/components/table/components/SearchForm.vue.d.ts +9 -1
- package/es/components/table/components/SearchForm.vue.d.ts.map +1 -1
- package/es/components/table/components/SizeControl.vue.d.ts +7 -2
- package/es/components/table/components/SizeControl.vue.d.ts.map +1 -1
- package/es/components/table/hooks/useTable.d.ts.map +1 -1
- package/es/components/table/index.d.ts +4 -1
- package/es/components/table/index.d.ts.map +1 -1
- package/es/components/table/types/index.d.ts +14 -6
- package/es/components/table/types/index.d.ts.map +1 -1
- package/es/index.d.ts +8 -4
- package/es/index.d.ts.map +1 -1
- package/es/index.js +259 -123
- package/es/index.js.map +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.d.ts.map +1 -1
- package/es/shared/core/index.d.ts +1 -1
- package/es/shared/core/index.d.ts.map +1 -1
- package/es/shared/ui/index.d.ts +15 -3
- package/es/shared/ui/index.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/components/component-provider/components/index.vue +26 -12
- package/src/components/component-provider/constants/index.ts +33 -6
- package/src/components/component-provider/types/index.ts +17 -9
- package/src/components/form/components/BaseField/index.vue +41 -13
- package/src/components/form/components/BaseField/utils/index.ts +19 -1
- package/src/components/form/components/BaseFormItem/index.vue +28 -30
- package/src/components/form/components/ContainerFragment/index.vue +3 -1
- package/src/components/form/components/ProForm/index.vue +19 -14
- package/src/components/form/components/SlotComponent/index.vue +14 -4
- package/src/components/form/components/index.ts +8 -1
- package/src/components/form/constants/index.ts +3 -4
- package/src/components/form/hooks/useFields.ts +3 -1
- package/src/components/form/hooks/useGroupFieldAttrs.ts +29 -13
- package/src/components/form/index.ts +1 -3
- package/src/components/form/types/index.ts +79 -46
- package/src/components/form/utils/fieldKey.ts +27 -0
- package/src/components/table/components/ColumnControl.vue +17 -3
- package/src/components/table/components/DefaultSearchFormContainer.vue +5 -0
- package/src/components/table/components/DefaultTableContainer.vue +5 -0
- package/src/components/table/components/ProTable.vue +228 -69
- package/src/components/table/components/SearchForm.vue +56 -19
- package/src/components/table/components/SizeControl.vue +21 -1
- package/src/components/table/hooks/useTable.ts +1 -1
- package/src/components/table/index.ts +8 -3
- package/src/components/table/types/index.ts +15 -7
- package/src/index.ts +12 -5
- package/src/locale/index.ts +2 -0
- package/src/shared/core/index.ts +11 -0
- package/src/shared/ui/index.ts +22 -4
- package/tsconfig.json +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SlotComponentType } from '../../types';
|
|
2
2
|
type Props = {
|
|
3
|
+
/** 插槽内容:VNode、渲染函数、组件定义对象或文本 */
|
|
3
4
|
component?: SlotComponentType;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/SlotComponent/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/SlotComponent/index.vue"],"names":[],"mappings":"AAwCA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIrD,KAAK,KAAK,GAAG;IACX,gCAAgC;IAChC,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B,CAAC;;;;;;AAiEF,wBAOG"}
|
|
@@ -5,8 +5,12 @@ 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
7
|
export { ProForm, BaseFormItem };
|
|
8
|
+
/** ProForm 的组件实例类型,用于 `ref` 标注与 `defineExpose` 访问 */
|
|
8
9
|
export type ProFormInstance = ComponentExposed<typeof ProForm>;
|
|
10
|
+
/** ProForm 的组件属性类型 */
|
|
9
11
|
export type ProFormProps = ComponentProps<typeof ProForm>;
|
|
12
|
+
/** BaseFormItem 的组件实例类型 */
|
|
10
13
|
export type ProFormItemInstance = ComponentExposed<typeof BaseFormItem>;
|
|
14
|
+
/** BaseFormItem 的组件属性类型 */
|
|
11
15
|
export type ProFormItemProps = ComponentProps<typeof BaseFormItem>;
|
|
12
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,
|
|
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,YAAY,MAAM,0BAA0B,CAAC;AAEpD,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,YAAY,EAAE,CAAC;AAGjC,qDAAqD;AACrD,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,OAAO,CAAC,CAAC;AAC/D,sBAAsB;AACtB,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;AAE1D,2BAA2B;AAC3B,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,OAAO,YAAY,CAAC,CAAC;AACxE,2BAA2B;AAC3B,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,KAAK,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,mBAAmB,gDAKtB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,KAAK,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,mBAAmB,gDAKtB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;CAAG;AAGhC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,KAAK,CAAC;IACtB,UAAU,EAAE,OAAO,QAAQ,CAAC;IAC5B,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,gBAAgB,EAAE,OAAO,aAAa,CAAC;IACvC,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,QAAQ,CAAC;IAC5B,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,cAAc,EAAE,OAAO,WAAW,CAAC;IACnC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,gBAAgB,EAAE,OAAO,aAAa,CAAC;IACvC,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,QAAQ,EAAE,OAAO,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,UAAU,CAAC;IACjC,UAAU,EAAE,OAAO,QAAQ,CAAC;CAC7B,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,aAAa,GACrB,MAAM,gBAAgB,GACtB,MAAM,YAAY,GAClB,QAAQ,CAAC;AAEb;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,aAAa,IAClD,CAAC,SAAS,MAAM,YAAY,GACxB,YAAY,CAAC,CAAC,CAAC,GACf,CAAC,SAAS,MAAM,gBAAgB,GAC9B,gBAAgB,CAAC,CAAC,CAAC,GACnB,KAAK,CAAC;AAGd;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,gBAiB1B,CAAA;AAGD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFields.d.ts","sourceRoot":"","sources":["../../../../src/components/form/hooks/useFields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"useFields.d.ts","sourceRoot":"","sources":["../../../../src/components/form/hooks/useFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,EAC7C,UAAU,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GACrB,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAKjE;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -2,14 +2,24 @@ import { ComputedRef } 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';
|
|
5
|
+
/** 单个字段拆解后的渲染分组 */
|
|
5
6
|
export interface GroupedField {
|
|
7
|
+
/** 解析后的字段标识(`name` 优先于 `path`) */
|
|
6
8
|
path: string;
|
|
9
|
+
/** 透传给栅格容器(GridItem)的属性 */
|
|
7
10
|
gridItemProps: GridItemProps;
|
|
11
|
+
/** 透传给 FormItem 的属性 */
|
|
8
12
|
formItemProps: FormItemProps;
|
|
13
|
+
/** 归属 FormItem 的插槽 */
|
|
9
14
|
formItemSlots: Record<(typeof FORM_ITEM_SLOT_KEYS)[number], any>;
|
|
15
|
+
/** 透传给输入组件的属性(含组件插槽) */
|
|
10
16
|
componentProps: Record<string, any>;
|
|
17
|
+
/** 该字段的外层包裹容器 */
|
|
11
18
|
formItemContainer?: Base['formItemContainer'];
|
|
19
|
+
/** 字段原始对象,供实例登记与访问器挂载使用 */
|
|
12
20
|
rawField: Field;
|
|
21
|
+
/** 渲染 key,取自字段对象身份 */
|
|
22
|
+
renderKey: string | number;
|
|
13
23
|
}
|
|
14
24
|
/**
|
|
15
25
|
* 将 fields 配置数组逐个拆分为 grid / formItem / component / slots 分组。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGroupFieldAttrs.d.ts","sourceRoot":"","sources":["../../../../src/components/form/hooks/useGroupFieldAttrs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"useGroupFieldAttrs.d.ts","sourceRoot":"","sources":["../../../../src/components/form/hooks/useGroupFieldAttrs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAE9E,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAU5C,mBAAmB;AACnB,MAAM,WAAW,YAAY;IAC3B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,uBAAuB;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,sBAAsB;IACtB,aAAa,EAAE,MAAM,CAAC,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;IACjE,wBAAwB;IACxB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,iBAAiB;IACjB,iBAAiB,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC9C,2BAA2B;IAC3B,QAAQ,EAAE,KAAK,CAAC;IAChB,sBAAsB;IACtB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,+BA2FnE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as ProForm } from './components/ProForm/index.vue';
|
|
2
|
-
export { ContainerFragment, SlotComponent, type ProFormProps, type ProFormInstance,
|
|
2
|
+
export { ContainerFragment, SlotComponent, type ProFormProps, type ProFormInstance, } from './components';
|
|
3
3
|
export { type ComponentMap, type ComponentName } from './constants';
|
|
4
|
-
export { type Field, type Fields } from './types';
|
|
4
|
+
export { type Field, type Fields, type ValueFormatter } from './types';
|
|
5
5
|
export { useForm, useFields, useFormRef, useFormData, type Form, type UseFields, } from './hooks';
|
|
6
6
|
export default ProForm;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAGrD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAGrD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAGpE,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAGvE,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,WAAW,EACX,KAAK,IAAI,EACT,KAAK,SAAS,GACf,MAAM,SAAS,CAAC;AAEjB,eAAe,OAAO,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { GridProps, GridItemProps, FormInstance, FormItemProps, FormItem } from '../../../shared/ui';
|
|
1
|
+
import { GridProps, GridItemProps, FormInstance, FormItemProps, FormItem, FormItemInstance } from '../../../shared/ui';
|
|
2
2
|
import { ComponentProps, ComponentSlots } from 'vue-component-type-helpers';
|
|
3
|
-
import {
|
|
3
|
+
import { VNode, VNodeProps, ClassValue, Component, Raw, MaybeRef, ComputedRef, StyleValue } from 'vue';
|
|
4
4
|
import { ComponentName, GetComponentType } from '../constants';
|
|
5
|
-
import { Data, Path } from '../../../shared/core';
|
|
5
|
+
import { Data, Path, AdditionalMethods } from '../../../shared/core';
|
|
6
6
|
export type { FormInstance };
|
|
7
|
+
/** 带 `path` 的组件属性:容器与插槽组件按该路径关联字段 */
|
|
7
8
|
export type PathProps = {
|
|
8
9
|
path?: string;
|
|
9
10
|
} & Data;
|
|
11
|
+
/** `value` / `onUpdate:value` 形态的 v-model 属性 */
|
|
10
12
|
export type VModelProps<T = any> = {
|
|
11
13
|
value?: T;
|
|
12
14
|
'onUpdate:value'?: (val: T) => void;
|
|
@@ -42,53 +44,64 @@ export type ValueFormatter = {
|
|
|
42
44
|
set?: (val: any, oldVal?: any) => any;
|
|
43
45
|
};
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
47
|
+
* 自定义组件
|
|
48
|
+
*
|
|
46
49
|
* @example (p, ctx) => h('div', ctx.attrs)
|
|
47
50
|
*/
|
|
48
51
|
export type RenderComponentType = Component<VModelProps & PathProps>;
|
|
49
52
|
/**
|
|
50
|
-
*
|
|
53
|
+
* 插槽组件类型
|
|
51
54
|
*/
|
|
52
55
|
export type SlotComponentType = Component<PathProps> | VNode | string | number | boolean | null | undefined | ((...args: any[]) => SlotComponentType);
|
|
53
56
|
/**
|
|
54
|
-
*
|
|
57
|
+
* 容器组件类型
|
|
55
58
|
*/
|
|
56
59
|
export type ContainerComponent = Component<PathProps>;
|
|
57
60
|
/**
|
|
58
|
-
*
|
|
61
|
+
* 插槽对象类型
|
|
59
62
|
*/
|
|
60
63
|
export type Slots = {
|
|
61
64
|
[name: string]: SlotComponentType;
|
|
62
65
|
};
|
|
66
|
+
/** 选项项:`label` 展示文案与 `value` 取值,其余键透传控件 */
|
|
63
67
|
export type Option = {
|
|
64
68
|
label: string;
|
|
65
69
|
value: any;
|
|
66
70
|
[x: string]: any;
|
|
67
71
|
};
|
|
72
|
+
/** 选项数组 */
|
|
68
73
|
export type Options = Array<Option>;
|
|
74
|
+
/** 表单栅格开关:`true` 启用默认栅格,或传 `GridProps` 自定义 */
|
|
69
75
|
export type Grid = boolean | (GridProps & {});
|
|
76
|
+
/** FormItem 自身的插槽集合(label / extra / help / tooltip 等) */
|
|
70
77
|
export type FormItemSlots = ComponentSlots<typeof FormItem>;
|
|
71
78
|
type BaseCommon<D extends Data = Data> = {
|
|
72
79
|
/**
|
|
73
|
-
*
|
|
80
|
+
* 字段标识namePath, 同name
|
|
81
|
+
*
|
|
82
|
+
* 字段标识按 `name`、`path` 的顺序取首个非 `null` / `undefined` 的值(`name` 优先),
|
|
83
|
+
* 结果经 `normalizePathKey` 归一化,供渲染标识与 core 字段查找 API(`getField` / `setField` 等)共用;
|
|
84
|
+
* `name` 仅参与标识解析,不落入控件属性透传。与 `element-plus-pro` 口径不同(该包宿主标识键为 `prop`,`name` 仅透传控件)。
|
|
85
|
+
* 嵌套字段的 `path` 使用各自独立的完整路径(不与父级路径拼接),重复路径需自行保证唯一。
|
|
86
|
+
*
|
|
74
87
|
* @example 'name' | 'age' | 'sex' | ...
|
|
75
88
|
*/
|
|
76
89
|
path?: Path<D>;
|
|
77
|
-
/**
|
|
78
|
-
* @description 字段是否隐藏
|
|
79
|
-
*/
|
|
90
|
+
/** 字段是否隐藏;支持布尔、Ref 与 ComputedRef 形式,渲染期统一按 `toValue` 取值 */
|
|
80
91
|
hidden?: boolean;
|
|
81
92
|
/**
|
|
82
|
-
*
|
|
93
|
+
* 字段是否禁用;字段级取值优先,未显式指定时继承上层(表单或宿主 Provider)的禁用上下文。
|
|
83
94
|
*/
|
|
84
95
|
disabled?: boolean;
|
|
85
96
|
/**
|
|
86
|
-
*
|
|
97
|
+
* 字段中文名称,支持字符串或组件
|
|
98
|
+
*
|
|
87
99
|
* @example '姓名' | '年龄' | '性别' | () => h('span', '自定义标签')
|
|
88
100
|
*/
|
|
89
101
|
label?: SlotComponentType;
|
|
90
102
|
/**
|
|
91
|
-
*
|
|
103
|
+
* 字段插槽配置,可包含formItem插槽和component插槽
|
|
104
|
+
*
|
|
92
105
|
* @example
|
|
93
106
|
* ```js
|
|
94
107
|
* slots: {
|
|
@@ -100,39 +113,46 @@ type BaseCommon<D extends Data = Data> = {
|
|
|
100
113
|
*/
|
|
101
114
|
slots?: Partial<FormItemSlots>;
|
|
102
115
|
/**
|
|
103
|
-
*
|
|
116
|
+
* 字段formItem样式属性
|
|
117
|
+
*
|
|
104
118
|
* @example { marginBottom: '8px', padding: '12px' }
|
|
105
119
|
*/
|
|
106
|
-
formItemStyle?:
|
|
120
|
+
formItemStyle?: StyleValue;
|
|
107
121
|
/**
|
|
108
|
-
*
|
|
122
|
+
* 字段formItem样式类名
|
|
123
|
+
*
|
|
109
124
|
* @example 'custom-form-item' | 'required-field'
|
|
110
125
|
*/
|
|
111
|
-
formItemClass?:
|
|
126
|
+
formItemClass?: ClassValue;
|
|
112
127
|
/**
|
|
113
|
-
*
|
|
128
|
+
* 字段formItem容器包裹组件
|
|
129
|
+
*
|
|
114
130
|
* @example (props, ctx) => h('div', { class: 'custom-container' }, ctx.slots.default?.())
|
|
115
131
|
*/
|
|
116
132
|
formItemContainer?: ContainerComponent;
|
|
117
133
|
/**
|
|
118
|
-
*
|
|
134
|
+
* 将属性附加到 FormItem 的 DOM 节点
|
|
135
|
+
*
|
|
119
136
|
* @example { 'data-form-item-test': 'test-value', 'aria-label': 'name' }
|
|
120
137
|
*/
|
|
121
138
|
formItemDataAttrs?: Record<string, string>;
|
|
122
139
|
/**
|
|
123
|
-
*
|
|
140
|
+
* 额外的自定义属性,不会被当作组件参数,仅用做给字段添加标识属性等功能
|
|
141
|
+
*
|
|
124
142
|
* @example { group: 'group-1' }
|
|
125
143
|
*/
|
|
126
144
|
extraProps?: Record<string, any>;
|
|
127
145
|
};
|
|
128
146
|
type BaseWithFields<D extends Data = Data> = BaseCommon<D> & {
|
|
129
147
|
/**
|
|
130
|
-
*
|
|
148
|
+
* 嵌套子字段配置
|
|
149
|
+
*
|
|
131
150
|
* @example [{ key: 'firstName', label: '名' }, { key: 'lastName', label: '姓' }]
|
|
132
151
|
*/
|
|
133
152
|
fields: Fields<D>;
|
|
134
153
|
/**
|
|
135
|
-
*
|
|
154
|
+
* 网格布局属性,true表示使用默认网格布局,针对具有嵌套字段的字段
|
|
155
|
+
*
|
|
136
156
|
* @example boolean | { gutter: 24 }
|
|
137
157
|
*/
|
|
138
158
|
grid?: Grid;
|
|
@@ -148,42 +168,43 @@ type BaseWithoutFields<D extends Data = Data> = BaseCommon<D> & {
|
|
|
148
168
|
fields?: undefined;
|
|
149
169
|
grid?: never;
|
|
150
170
|
/**
|
|
151
|
-
*
|
|
171
|
+
* 字段component样式属性
|
|
172
|
+
*
|
|
152
173
|
* @example { width: '100%', borderColor: '#d9d9d9' }
|
|
153
174
|
*/
|
|
154
|
-
componentStyle?:
|
|
175
|
+
componentStyle?: StyleValue;
|
|
155
176
|
/**
|
|
156
|
-
*
|
|
177
|
+
* 字段component样式类名
|
|
178
|
+
*
|
|
157
179
|
* @example 'custom-input' | 'error-input'
|
|
158
180
|
*/
|
|
159
|
-
componentClass?:
|
|
181
|
+
componentClass?: ClassValue;
|
|
160
182
|
/**
|
|
161
|
-
*
|
|
183
|
+
* 字段component容器包裹组件
|
|
184
|
+
*
|
|
162
185
|
* @example (props, ctx) => h('div', { class: 'input-wrapper' }, ctx.slots.default?.())
|
|
163
186
|
*/
|
|
164
187
|
componentContainer?: ContainerComponent;
|
|
165
188
|
/**
|
|
166
|
-
*
|
|
189
|
+
* 字段值处理函数,在onUpdateValue前执行,函数返回值将作为更新值,也可设置get和set函数,用于处理字段值
|
|
190
|
+
*
|
|
167
191
|
* @example (val) => val?.trim()
|
|
168
192
|
*/
|
|
169
193
|
valueFormatter?: ValueFormatter;
|
|
170
194
|
/**
|
|
171
|
-
*
|
|
195
|
+
* 组件v-model双向绑定更新属性名,默认'value'
|
|
172
196
|
*/
|
|
173
197
|
modelProp?: string;
|
|
174
198
|
/**
|
|
175
|
-
*
|
|
199
|
+
* 将属性附加到表单组件的 DOM 节点
|
|
200
|
+
*
|
|
176
201
|
* @example { 'data-test': 'input-value', 'aria-label': 'name' }
|
|
177
202
|
*/
|
|
178
203
|
componentDataAttrs?: Record<string, string>;
|
|
179
204
|
};
|
|
180
|
-
/**
|
|
181
|
-
* @type {Object} Base - 基础公共字段类型
|
|
182
|
-
*/
|
|
205
|
+
/** 基础公共字段类型 */
|
|
183
206
|
export type Base<D extends Data = Data> = BaseWithFields<D> | BaseWithoutFields<D>;
|
|
184
|
-
/**
|
|
185
|
-
* @type {FieldTypeMap} 字段类型集合
|
|
186
|
-
*/
|
|
207
|
+
/** 字段类型集合 */
|
|
187
208
|
export type FieldTypeMap<D extends Data = Data> = {
|
|
188
209
|
[K in ComponentName]: K extends 'custom' ? WithCommon<{
|
|
189
210
|
slots?: Slots;
|
|
@@ -195,28 +216,36 @@ export type FieldTypeMap<D extends Data = Data> = {
|
|
|
195
216
|
};
|
|
196
217
|
};
|
|
197
218
|
/**
|
|
198
|
-
*
|
|
219
|
+
* 不支持响应式的属性名
|
|
199
220
|
*/
|
|
200
221
|
type NotSupportedRefOrGetterProps = 'component' | 'formItemContainer' | 'componentContainer' | 'valueFormatter' | 'fields' | 'slots' | 'modelProp';
|
|
201
222
|
type MaybeRefOrComputedRef<T = any> = MaybeRef<T> | ComputedRef<T>;
|
|
202
223
|
/**
|
|
203
|
-
*
|
|
224
|
+
* 为对象属性添加响应式支持的类型
|
|
225
|
+
*
|
|
204
226
|
* @template T - 原始类型
|
|
205
227
|
*/
|
|
206
228
|
export type WithRef<T> = {
|
|
207
229
|
[P in keyof T]: P extends NotSupportedRefOrGetterProps ? T[P] : T[P] extends (...args: any[]) => any ? T[P] : MaybeRefOrComputedRef<T[P]>;
|
|
208
230
|
};
|
|
231
|
+
/**
|
|
232
|
+
* 公共字段属性集合:FormItem 透传属性与 GridItem 栅格属性
|
|
233
|
+
*
|
|
234
|
+
* 栅格行为边界:字段显式指定 `span` 时整体接管栅格,不再叠加 Provider 注入的响应式断点;
|
|
235
|
+
* 未指定 `span` 时使用注入的断点配置。
|
|
236
|
+
*/
|
|
209
237
|
type WithCommonBase<T = unknown> = T & Omit<FormItemProps, 'label'> & GridItemProps;
|
|
210
238
|
type WithCommon<T, D extends Data = Data> = WithRef<WithCommonBase<T> & BaseWithoutFields<D>>;
|
|
211
239
|
type WithFields<D extends Data = Data> = WithRef<WithCommonBase & BaseWithFields<D>>;
|
|
212
240
|
/**
|
|
213
|
-
*
|
|
241
|
+
* 合并 FormItem 插槽与组件插槽
|
|
214
242
|
*/
|
|
215
243
|
export type MergeSlots<T, CS = ComponentSlots<T>> = Partial<{
|
|
216
244
|
[K in keyof FormItemSlots | keyof CS]: K extends keyof FormItemSlots ? FormItemSlots[K] : K extends keyof CS ? CS[K] : SlotComponentType;
|
|
217
245
|
}>;
|
|
218
246
|
/**
|
|
219
|
-
*
|
|
247
|
+
* 自动从 Vue 组件提取 Props 和 Slots,并加上公共表单字段属性
|
|
248
|
+
*
|
|
220
249
|
* @template T - Vue 组件类型
|
|
221
250
|
* @template D - 数据对象类型
|
|
222
251
|
*/
|
|
@@ -224,13 +253,15 @@ type WithComponent<T, D extends Data = Data> = Omit<WithCommon<Partial<Component
|
|
|
224
253
|
slots?: MergeSlots<T>;
|
|
225
254
|
};
|
|
226
255
|
/**
|
|
227
|
-
*
|
|
256
|
+
* 字段配置类型,包含所有字段属性和响应式支持
|
|
257
|
+
*
|
|
228
258
|
* @template D - 数据对象类型
|
|
229
259
|
* @public
|
|
230
260
|
*/
|
|
231
|
-
export type Field<C extends ComponentName = ComponentName, D extends Data = Data> = FieldTypeMap<D>[C] | WithFields<D>;
|
|
261
|
+
export type Field<C extends ComponentName = ComponentName, D extends Data = Data> = (FieldTypeMap<D>[C] | WithFields<D>) & AdditionalMethods<FormItemInstance>;
|
|
232
262
|
/**
|
|
233
|
-
*
|
|
263
|
+
* 字段数组类型
|
|
264
|
+
*
|
|
234
265
|
* @template D - 数据对象类型
|
|
235
266
|
* @public
|
|
236
267
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACZ,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACZ,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC7C,OAAO,EACL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EAAE,aAAa,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存自增编号,同一字段对象恒得同一 key:
|
|
5
|
+
* key 与字段在数组中的位置解耦,字段插入 / 删除 / 重排 / 过滤后仍与对象绑定;同 `path` 的兄弟字段各得其唯一 key。
|
|
6
|
+
* 非对象项无对象身份,按字面量生成稳定 key;渲染路径传入的字段项已由调用方过滤为非 null 对象,
|
|
7
|
+
* 该分支供本模块的直接调用者使用
|
|
8
|
+
*
|
|
9
|
+
* @param field - 字段配置项
|
|
10
|
+
* @returns 字段渲染 key
|
|
11
|
+
*/
|
|
12
|
+
export declare const getFieldKey: (field: unknown) => string | number;
|
|
13
|
+
//# sourceMappingURL=fieldKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldKey.d.ts","sourceRoot":"","sources":["../../../../src/components/form/utils/fieldKey.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,MAUrD,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Columns, ColumnControlConfig } from '../types';
|
|
2
2
|
import { Table } from '../hooks/useTable';
|
|
3
3
|
type Props = {
|
|
4
|
+
/** 参与控制的列配置(由 ProTable 下发) */
|
|
4
5
|
columns: Columns;
|
|
6
|
+
/** 表格实例,勾选结果经其 `setColumn` 写回列 `hidden` */
|
|
5
7
|
table?: Table;
|
|
8
|
+
/** 控制项配置:labels / excludedKeys / disabledKeys / disableCheckAll */
|
|
6
9
|
columnControl?: ColumnControlConfig;
|
|
7
10
|
};
|
|
8
11
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ColumnControl.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColumnControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ColumnControl.vue"],"names":[],"mappings":"AAsOA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C,KAAK,KAAK,GAAG;IACX,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,mEAAmE;IACnE,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC,CAAC;;WAHQ,KAAK;mBAEG,mBAAmB;;AA4TrC,wBAQG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultSearchFormContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/DefaultSearchFormContainer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultSearchFormContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/DefaultSearchFormContainer.vue"],"names":[],"mappings":"AAqCA,iBAAS,cAAc;WA4BT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,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":"DefaultTableContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/DefaultTableContainer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultTableContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/DefaultTableContainer.vue"],"names":[],"mappings":"AAqCA,iBAAS,cAAc;WA4BT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -13,20 +13,27 @@ declare const _default: <T extends Table<any> = Table>(__VLS_props: NonNullable<
|
|
|
13
13
|
size?: TableProps["size"];
|
|
14
14
|
loading?: boolean;
|
|
15
15
|
} & {
|
|
16
|
+
/** 列表表格对象,来自 `useTable` */
|
|
16
17
|
table?: T;
|
|
18
|
+
/** 列表数据查询方法 */
|
|
17
19
|
search?: () => Promise<unknown>;
|
|
20
|
+
/** 是否在首列插入序号列 */
|
|
18
21
|
addIndexColumn?: boolean;
|
|
22
|
+
/** 挂载后是否立即触发一次查询 */
|
|
19
23
|
immediateSearch?: boolean;
|
|
24
|
+
/** 是否展示尺寸与列控制按钮;显式传入 columns 时列控入口不渲染 */
|
|
20
25
|
control?: boolean | Partial<{
|
|
21
26
|
sizeControl: boolean;
|
|
22
27
|
columnControl: boolean | ColumnControlConfig<Path<T extends Table<any, infer R extends import('@qin-ui/pro-components-core').Data> ? R : never>>;
|
|
23
28
|
}>;
|
|
29
|
+
/** 搜索栏查询字段表单配置 */
|
|
24
30
|
searchFormConfig?: Omit<SearchFormProps, "form"> & {
|
|
25
31
|
hidden?: boolean;
|
|
26
32
|
container?: ContainerComponent | false;
|
|
27
33
|
};
|
|
34
|
+
/** 表格区域包裹容器 */
|
|
28
35
|
tableContainer?: ContainerComponent | false;
|
|
29
|
-
} & TableProps
|
|
36
|
+
} & TableProps) & Partial<{}>> & import('vue').PublicProps;
|
|
30
37
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
31
38
|
/** 手动触发一次查询(与内部搜索共用 loading 竞态守卫),便于外部刷新列表 */
|
|
32
39
|
search: () => Promise<void>;
|
|
@@ -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":"AA2nBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,KAAK,EAEV,UAAU,EACV,UAAU,EACX,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAOL,KAAK,IAAI,EACV,MAAM,KAAK,CAAC;AAGb,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAgBjD,OAAO,KAAK,EAAE,MAAM,EAAW,mBAAmB,EAAE,MAAM,UAAU,CAAC;yBAEpD,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,eA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C,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -12,14 +12,23 @@ type ButtonProps = {
|
|
|
12
12
|
type ExpandButtonProps = ButtonProps & {
|
|
13
13
|
expandStatus: boolean;
|
|
14
14
|
};
|
|
15
|
+
/** ProTable 搜索表单的属性面:表单实例、布局、展开与按钮自定义 */
|
|
15
16
|
export type SearchFormProps = {
|
|
17
|
+
/** 搜索表单实例,由 table.searchForm 提供 */
|
|
16
18
|
form: Form;
|
|
19
|
+
/** 布局形态,默认 'grid' */
|
|
17
20
|
layout?: 'grid' | 'inline';
|
|
21
|
+
/** 展开配置,默认 true */
|
|
18
22
|
expand?: boolean | Expand;
|
|
23
|
+
/** 自定义搜索按钮,false 时不渲染 */
|
|
19
24
|
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
25
|
+
/** 自定义重置按钮,false 时不渲染 */
|
|
20
26
|
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
27
|
+
/** 自定义展开/折叠按钮,false 时不渲染 */
|
|
21
28
|
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps> | false;
|
|
29
|
+
/** 行间距,默认 16 */
|
|
22
30
|
rowGap?: number;
|
|
31
|
+
/** 列间距,默认 24 */
|
|
23
32
|
columnGap?: number;
|
|
24
33
|
} & /* @vue-ignore */ _FormProps & AllowedComponentProps;
|
|
25
34
|
declare const _default: __VLS_WithTemplateSlots<DefineComponent<SearchFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
@@ -30,7 +39,6 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<SearchFormProps,
|
|
|
30
39
|
onSearch?: (() => any) | undefined;
|
|
31
40
|
}>, {
|
|
32
41
|
layout: "grid" | "inline";
|
|
33
|
-
form: Form;
|
|
34
42
|
expand: boolean | Expand;
|
|
35
43
|
searchButton: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
36
44
|
resetButton: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SearchForm.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"SearchForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SearchForm.vue"],"names":[],"mappings":"AAAA,OAyRO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,KAAK,CAAC;AACjD,OAAO,EAAsB,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,KAAK,CAAC;AAE/E,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAMrD,KAAK,MAAM,GAAG;IAEZ,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,UAAU,GAAG,IAAI,CACpB,OAAO,CAAC,SAAS,CAAC,EAChB,OAAO,GACP,UAAU,GACV,kBAAkB,GAClB,YAAY,GACZ,UAAU,GACV,WAAW,GACX,MAAM,GACN,YAAY,CACf,CAAC;AAEF,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAC3C,KAAK,iBAAiB,GAAG,WAAW,GAAG;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjE,yCAAyC;AACzC,MAAM,MAAM,eAAe,GAAG;IAC5B,mCAAmC;IACnC,IAAI,EAAE,IAAI,CAAC;IACX,qBAAqB;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,mBAAmB;IACnB,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC7E,yBAAyB;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC5E,4BAA4B;IAC5B,YAAY,CAAC,EACT,SAAS,CAAC,iBAAiB,CAAC,GAC5B,eAAe,CAAC,iBAAiB,CAAC,GAClC,KAAK,CAAC;IACV,gBAAgB;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,iBAAiB,CAAC,UAAU,GAC9B,qBAAqB,CAAC;;;;;;;;YAjBb,MAAM,GAAG,QAAQ;YAEjB,OAAO,GAAG,MAAM;kBAEV,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK;iBAE9D,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK;kBAGvE,SAAS,CAAC,iBAAiB,CAAC,GAC5B,eAAe,CAAC,iBAAiB,CAAC,GAClC,KAAK;YAEA,MAAM;eAEH,MAAM;;;;QAyRiB,GAAG;;;QACF,GAAG;;;;QACH,GAAG;;AAvRzC,wBAwUK;AAaL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { TableProps } from '../../../shared/ui';
|
|
2
2
|
type Size = TableProps['size'];
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
effectiveSize?: Size;
|
|
5
|
+
};
|
|
3
6
|
type __VLS_PublicProps = {
|
|
4
7
|
'size'?: Size;
|
|
5
|
-
};
|
|
8
|
+
} & __VLS_Props;
|
|
6
9
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
10
|
"update:size": (value: import('ant-design-vue/es/button').ButtonSize) => any;
|
|
8
11
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
9
12
|
"onUpdate:size"?: ((value: import('ant-design-vue/es/button').ButtonSize) => any) | undefined;
|
|
10
|
-
}>, {
|
|
13
|
+
}>, {
|
|
14
|
+
effectiveSize: "small" | "middle" | "large";
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
16
|
export default _default;
|
|
12
17
|
//# sourceMappingURL=SizeControl.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SizeControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SizeControl.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SizeControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SizeControl.vue"],"names":[],"mappings":"AAuFA;;;;;;;GAOG;AACH,OAAO,EAIL,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAC;AAK5B,KAAK,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAM/B,KAAK,WAAW,GAAG;IACf,aAAa,CAAC,EAAE,IAAI,CAAC;CACtB,CAAC;AA+BJ,KAAK,iBAAiB,GAAG;IACzB,MAAM,CAAC,EAAE,IAAI,CAAC;CACb,GAAG,WAAW,CAAC;;;;;;;;AA4GhB,wBASG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTable.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/useTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,IAAI,MAAM,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,IAAI,EACJ,aAAa,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AAM,CAAC,CAAC,CAAC,CAAC;CAC1B,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAEd"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ComponentExposed, ComponentProps } from 'vue-component-type-helpers';
|
|
2
2
|
import { default as ProTable } from './components/ProTable.vue';
|
|
3
|
+
/** ProTable 的组件属性类型 */
|
|
3
4
|
export type ProTableProps = ComponentProps<typeof ProTable>;
|
|
5
|
+
/** ProTable 的组件实例类型,用于 `ref` 标注与 `defineExpose` 访问 */
|
|
4
6
|
export type ProTableInstance = ComponentExposed<typeof ProTable>;
|
|
5
|
-
export { type Column, type Columns } from './types';
|
|
7
|
+
export { type Column, type ColumnControlConfig, type Columns } from './types';
|
|
6
8
|
export { useTable, type Table } from './hooks';
|
|
9
|
+
export { type PageParam } from '../../shared/core';
|
|
7
10
|
export default ProTable;
|
|
8
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AAEjD,uBAAuB;AACvB,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5D,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGjE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,mBAAmB,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAG9E,OAAO,EAAE,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAe,QAAQ,CAAC"}
|