@qin-ui/antd-vue-pro 2.1.15 → 2.2.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 +52 -38
- package/LICENSE +9 -0
- package/api.json +40 -29
- package/es/antd-vue-pro.css +9 -9
- package/es/component-provider/{index-Dmz32tSB.js → index-PHCLwRXW.js} +5 -4
- package/es/component-provider/index-PHCLwRXW.js.map +1 -0
- package/es/component-provider/index.js +2 -1
- package/es/component-provider/index.js.map +1 -0
- package/es/components/component-provider/components/index.vue.d.ts +35 -0
- package/es/components/component-provider/components/index.vue.d.ts.map +1 -0
- package/es/components/component-provider/constants/index.d.ts +16 -0
- package/es/components/component-provider/constants/index.d.ts.map +1 -0
- package/es/components/component-provider/index.d.ts +4 -0
- package/es/components/component-provider/index.d.ts.map +1 -0
- package/es/components/component-provider/types/index.d.ts +63 -0
- package/es/components/component-provider/types/index.d.ts.map +1 -0
- package/es/components/form/components/BaseField/index.vue.d.ts +13 -0
- package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -0
- package/es/components/form/components/BaseField/utils/index.d.ts +3 -0
- package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -0
- package/es/components/form/components/BaseFormItem/index.vue.d.ts +9 -0
- package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -0
- package/es/components/form/components/ContainerFragment/index.vue.d.ts +23 -0
- package/es/components/form/components/ContainerFragment/index.vue.d.ts.map +1 -0
- package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts +29 -0
- package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts.map +1 -0
- package/es/components/form/components/PathProvider/index.vue.d.ts +24 -0
- package/es/components/form/components/PathProvider/index.vue.d.ts.map +1 -0
- package/es/components/form/components/ProForm/index.vue.d.ts +36 -0
- package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -0
- package/es/components/form/components/SlotComponent/index.vue.d.ts +7 -0
- package/es/components/form/components/SlotComponent/index.vue.d.ts.map +1 -0
- package/es/components/form/components/index.d.ts +12 -0
- package/es/components/form/components/index.d.ts.map +1 -0
- package/es/components/form/constants/index.d.ts +78 -0
- package/es/components/form/constants/index.d.ts.map +1 -0
- package/es/components/form/hooks/index.d.ts +5 -0
- package/es/components/form/hooks/index.d.ts.map +1 -0
- package/es/components/form/hooks/useFields.d.ts +57 -0
- package/es/components/form/hooks/useFields.d.ts.map +1 -0
- package/es/components/form/hooks/useForm.d.ts +93 -0
- package/es/components/form/hooks/useForm.d.ts.map +1 -0
- package/es/components/form/hooks/useFormRef.d.ts +30 -0
- package/es/components/form/hooks/useFormRef.d.ts.map +1 -0
- package/es/components/form/index.d.ts +7 -0
- package/es/components/form/index.d.ts.map +1 -0
- package/es/components/form/types/index.d.ts +207 -0
- package/es/components/form/types/index.d.ts.map +1 -0
- package/es/components/table/components/ColumnControl.vue.d.ts +9 -0
- package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -0
- package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts +18 -0
- package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts.map +1 -0
- package/es/components/table/components/DefaultTableContainer.vue.d.ts +18 -0
- package/es/components/table/components/DefaultTableContainer.vue.d.ts.map +1 -0
- package/es/components/table/components/ProTable.vue.d.ts +100 -0
- package/es/components/table/components/ProTable.vue.d.ts.map +1 -0
- package/es/components/table/components/SearchForm.vue.d.ts +48 -0
- package/es/components/table/components/SearchForm.vue.d.ts.map +1 -0
- package/es/components/table/components/SizeControl.vue.d.ts +12 -0
- package/es/components/table/components/SizeControl.vue.d.ts.map +1 -0
- package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts +3 -0
- package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts.map +1 -0
- package/es/components/table/components/icons/DownOutlined.vue.d.ts +3 -0
- package/es/components/table/components/icons/DownOutlined.vue.d.ts.map +1 -0
- package/es/components/table/components/icons/FilterOutlined.vue.d.ts +3 -0
- package/es/components/table/components/icons/FilterOutlined.vue.d.ts.map +1 -0
- package/es/components/table/components/index.d.ts +5 -0
- package/es/components/table/components/index.d.ts.map +1 -0
- package/es/components/table/hooks/index.d.ts +2 -0
- package/es/components/table/hooks/index.d.ts.map +1 -0
- package/es/components/table/hooks/useTable.d.ts +112 -0
- package/es/components/table/hooks/useTable.d.ts.map +1 -0
- package/es/components/table/index.d.ts +8 -0
- package/es/components/table/index.d.ts.map +1 -0
- package/es/components/table/types/index.d.ts +70 -0
- package/es/components/table/types/index.d.ts.map +1 -0
- package/es/form/index.js +14 -8
- package/es/form/index.js.map +1 -0
- package/es/index.d.ts +76 -1622
- package/es/index.d.ts.map +1 -0
- package/es/index.js +12 -22
- package/es/index.js.map +1 -0
- package/es/shared/core/index.d.ts +6 -0
- package/es/shared/core/index.d.ts.map +1 -0
- package/es/shared/ui/index.d.ts +15 -0
- package/es/shared/ui/index.d.ts.map +1 -0
- package/es/table/index.js +10 -8
- package/es/table/index.js.map +1 -0
- package/package.json +12 -13
- package/src/components/component-provider/components/index.vue +81 -0
- package/src/components/component-provider/constants/index.ts +165 -0
- package/src/components/component-provider/index.ts +6 -0
- package/src/components/component-provider/types/index.ts +90 -0
- package/src/components/form/components/BaseField/index.vue +188 -0
- package/src/components/form/components/BaseField/utils/index.ts +16 -0
- package/src/components/form/components/BaseFormItem/index.vue +163 -0
- package/src/components/form/components/ContainerFragment/index.vue +24 -0
- package/src/components/form/components/GroupedFieldAttrs/index.vue +118 -0
- package/src/components/form/components/PathProvider/index.vue +19 -0
- package/src/components/form/components/ProForm/index.vue +109 -0
- package/src/components/form/components/SlotComponent/index.vue +26 -0
- package/src/components/form/components/index.ts +15 -0
- package/src/components/form/constants/index.ts +135 -0
- package/src/components/form/hooks/index.ts +5 -0
- package/src/components/form/hooks/useFields.ts +67 -0
- package/src/components/form/hooks/useForm.ts +110 -0
- package/src/components/form/hooks/useFormRef.ts +35 -0
- package/src/components/form/index.ts +29 -0
- package/src/components/form/types/index.ts +271 -0
- package/src/components/table/components/ColumnControl.vue +132 -0
- package/src/components/table/components/DefaultSearchFormContainer.vue +20 -0
- package/src/components/table/components/DefaultTableContainer.vue +20 -0
- package/src/components/table/components/ProTable.vue +366 -0
- package/src/components/table/components/SearchForm.vue +295 -0
- package/src/components/table/components/SizeControl.vue +59 -0
- package/src/components/table/components/icons/ColumnHeightOutlined.vue +4 -0
- package/src/components/table/components/icons/DownOutlined.vue +4 -0
- package/src/components/table/components/icons/FilterOutlined.vue +4 -0
- package/src/components/table/components/index.ts +4 -0
- package/src/components/table/hooks/index.ts +1 -0
- package/src/components/table/hooks/useTable.ts +130 -0
- package/src/components/table/index.ts +14 -0
- package/src/components/table/types/index.ts +74 -0
- package/src/index.ts +80 -0
- package/src/shared/core/index.ts +37 -0
- package/src/shared/ui/index.ts +60 -0
- package/es/core/index-ghYuQ3Sy.js +0 -360
- package/es/vendor/utils/lodash-es-p6jau26B.js +0 -1120
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { GridProps, GridItemProps, FormInstance, FormItemProps, FormItem } from '../../../shared/ui';
|
|
2
|
+
import { ComponentProps, ComponentSlots } from 'vue-component-type-helpers';
|
|
3
|
+
import { CSSProperties, Component, Raw, MaybeRef, ComputedRef, VNode, VNodeProps } from 'vue';
|
|
4
|
+
import { ComponentName, GetComponentType } from '../constants';
|
|
5
|
+
import { Data, Path } from '../../../shared/core';
|
|
6
|
+
export type { FormInstance };
|
|
7
|
+
export type PathProps = {
|
|
8
|
+
path?: string;
|
|
9
|
+
} & Data;
|
|
10
|
+
export type VModelProps<T = any> = {
|
|
11
|
+
value?: T;
|
|
12
|
+
'onUpdate:value'?: (val: T) => void;
|
|
13
|
+
};
|
|
14
|
+
export type ValueFormatter = {
|
|
15
|
+
(val: any, oldVal: any): any;
|
|
16
|
+
} | {
|
|
17
|
+
get?: (val: any) => any;
|
|
18
|
+
set?: (val: any, oldVal: any) => any;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @description 自定义组件
|
|
22
|
+
* @example (p, ctx) => h('div', ctx.attrs)
|
|
23
|
+
*/
|
|
24
|
+
export type RenderComponentType = Component<VModelProps & PathProps>;
|
|
25
|
+
/**
|
|
26
|
+
* @description 插槽组件类型
|
|
27
|
+
*/
|
|
28
|
+
export type SlotComponentType = Component<PathProps> | VNode | string | number | boolean | null | undefined | ((...args: any[]) => SlotComponentType);
|
|
29
|
+
/**
|
|
30
|
+
* @description 容器组件类型
|
|
31
|
+
*/
|
|
32
|
+
export type ContainerComponent = Component<PathProps>;
|
|
33
|
+
/**
|
|
34
|
+
* @description 插槽对象类型
|
|
35
|
+
*/
|
|
36
|
+
export type Slots = {
|
|
37
|
+
[name: string]: SlotComponentType;
|
|
38
|
+
};
|
|
39
|
+
export type Option = {
|
|
40
|
+
label: string;
|
|
41
|
+
value: any;
|
|
42
|
+
[x: string]: any;
|
|
43
|
+
};
|
|
44
|
+
export type Options = Array<Option>;
|
|
45
|
+
export type Grid = boolean | (GridProps & {});
|
|
46
|
+
type BaseCommon<D extends Data = Data> = {
|
|
47
|
+
/**
|
|
48
|
+
* @description 字段标识namePath, 同name
|
|
49
|
+
* @example 'name' | 'age' | 'sex' | ...
|
|
50
|
+
*/
|
|
51
|
+
path?: Path<D>;
|
|
52
|
+
/**
|
|
53
|
+
* @description 字段是否隐藏
|
|
54
|
+
*/
|
|
55
|
+
hidden?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* @description 字段是否禁用
|
|
58
|
+
*/
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* @description 字段中文名称,支持字符串或组件
|
|
62
|
+
* @example '姓名' | '年龄' | '性别' | () => h('span', '自定义标签')
|
|
63
|
+
*/
|
|
64
|
+
label?: SlotComponentType;
|
|
65
|
+
/**
|
|
66
|
+
* @description 字段插槽配置,可包含formItem插槽和component插槽
|
|
67
|
+
* @example
|
|
68
|
+
* ```js
|
|
69
|
+
* slots: {
|
|
70
|
+
* label: () => h('div', { style: { fontSize: '12px' } }, '年龄'),
|
|
71
|
+
* addonAfter: '岁',
|
|
72
|
+
* suffix: () => h('span', '元')
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
slots?: Partial<ComponentSlots<typeof FormItem>>;
|
|
77
|
+
/**
|
|
78
|
+
* @description 字段formItem样式属性
|
|
79
|
+
* @example { marginBottom: '8px', padding: '12px' }
|
|
80
|
+
*/
|
|
81
|
+
formItemStyle?: CSSProperties;
|
|
82
|
+
/**
|
|
83
|
+
* @description 字段formItem样式类名
|
|
84
|
+
* @example 'custom-form-item' | 'required-field'
|
|
85
|
+
*/
|
|
86
|
+
formItemClass?: string;
|
|
87
|
+
/**
|
|
88
|
+
* @description 字段formItem容器包裹组件
|
|
89
|
+
* @example (props, ctx) => h('div', { class: 'custom-container' }, ctx.slots.default?.())
|
|
90
|
+
*/
|
|
91
|
+
formItemContainer?: ContainerComponent;
|
|
92
|
+
/**
|
|
93
|
+
* @description 将属性附加到 FormItem 的 DOM 节点
|
|
94
|
+
* @example { 'data-form-item-test': 'test-value', 'aria-label': 'name' }
|
|
95
|
+
*/
|
|
96
|
+
formItemDataAttrs?: Record<string, string>;
|
|
97
|
+
/**
|
|
98
|
+
* @description 额外的自定义属性,不会被当作组件参数,仅用做给字段添加标识属性等功能
|
|
99
|
+
* @example { group: 'group-1' }
|
|
100
|
+
*/
|
|
101
|
+
extraProps?: Record<string, any>;
|
|
102
|
+
};
|
|
103
|
+
type BaseWithFields<D extends Data = Data> = BaseCommon<D> & {
|
|
104
|
+
/**
|
|
105
|
+
* @description 嵌套子字段配置
|
|
106
|
+
* @example [{ key: 'firstName', label: '名' }, { key: 'lastName', label: '姓' }]
|
|
107
|
+
*/
|
|
108
|
+
fields: Fields<D>;
|
|
109
|
+
/**
|
|
110
|
+
* @description 网格布局属性,true表示使用默认网格布局,针对具有嵌套字段的字段
|
|
111
|
+
* @example boolean | { gutter: 24 }
|
|
112
|
+
*/
|
|
113
|
+
grid?: Grid;
|
|
114
|
+
component?: never;
|
|
115
|
+
componentStyle?: never;
|
|
116
|
+
componentClass?: never;
|
|
117
|
+
componentContainer?: never;
|
|
118
|
+
valueFormatter?: never;
|
|
119
|
+
modelProp?: never;
|
|
120
|
+
componentDataAttrs?: never;
|
|
121
|
+
};
|
|
122
|
+
type BaseWithoutFields<D extends Data = Data> = BaseCommon<D> & {
|
|
123
|
+
fields?: undefined;
|
|
124
|
+
grid?: never;
|
|
125
|
+
/**
|
|
126
|
+
* @description 字段component样式属性
|
|
127
|
+
* @example { width: '100%', borderColor: '#d9d9d9' }
|
|
128
|
+
*/
|
|
129
|
+
componentStyle?: CSSProperties;
|
|
130
|
+
/**
|
|
131
|
+
* @description 字段component样式类名
|
|
132
|
+
* @example 'custom-input' | 'error-input'
|
|
133
|
+
*/
|
|
134
|
+
componentClass?: string;
|
|
135
|
+
/**
|
|
136
|
+
* @description 字段component容器包裹组件
|
|
137
|
+
* @example (props, ctx) => h('div', { class: 'input-wrapper' }, ctx.slots.default?.())
|
|
138
|
+
*/
|
|
139
|
+
componentContainer?: ContainerComponent;
|
|
140
|
+
/**
|
|
141
|
+
* @description 字段值处理函数,在onUpdateValue前执行,函数返回值将作为更新值,也可设置get和set函数,用于处理字段值
|
|
142
|
+
* @example (val) => val?.trim()
|
|
143
|
+
*/
|
|
144
|
+
valueFormatter?: ValueFormatter;
|
|
145
|
+
/**
|
|
146
|
+
* @description 组件v-model双向绑定更新属性名,默认'value'
|
|
147
|
+
*/
|
|
148
|
+
modelProp?: string;
|
|
149
|
+
/**
|
|
150
|
+
* @description 将属性附加到表单组件的 DOM 节点
|
|
151
|
+
* @example { 'data-test': 'input-value', 'aria-label': 'name' }
|
|
152
|
+
*/
|
|
153
|
+
componentDataAttrs?: Record<string, string>;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* @type {Object} Base - 基础公共字段类型
|
|
157
|
+
*/
|
|
158
|
+
export type Base<D extends Data = Data> = BaseWithFields<D> | BaseWithoutFields<D>;
|
|
159
|
+
/**
|
|
160
|
+
* @type {FieldTypeMap} 字段类型集合
|
|
161
|
+
*/
|
|
162
|
+
export type FieldTypeMap<D extends Data = Data> = {
|
|
163
|
+
[K in ComponentName]: K extends 'custom' ? WithCommon<{
|
|
164
|
+
slots?: Slots;
|
|
165
|
+
[x: string]: any;
|
|
166
|
+
}, D> & {
|
|
167
|
+
component?: RenderComponentType | Raw<RenderComponentType>;
|
|
168
|
+
} : WithComponent<GetComponentType<K>, D> & {
|
|
169
|
+
component?: K;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* @description 不支持响应式的属性名
|
|
174
|
+
*/
|
|
175
|
+
type NotSupportedRefOrGetterProps = 'component' | 'formItemContainer' | 'componentContainer' | 'valueFormatter' | 'fields' | 'slots' | 'modelProp';
|
|
176
|
+
type MaybeRefOrComputedRef<T = any> = MaybeRef<T> | ComputedRef<T>;
|
|
177
|
+
/**
|
|
178
|
+
* @description 为对象属性添加响应式支持的类型
|
|
179
|
+
* @template T - 原始类型
|
|
180
|
+
*/
|
|
181
|
+
export type WithRef<T> = {
|
|
182
|
+
[P in keyof T]: P extends NotSupportedRefOrGetterProps ? T[P] : T[P] extends (...args: any[]) => any ? T[P] : MaybeRefOrComputedRef<T[P]>;
|
|
183
|
+
};
|
|
184
|
+
type WithCommonBase<T = unknown> = T & Omit<FormItemProps, 'label'> & GridItemProps;
|
|
185
|
+
type WithCommon<T, D extends Data = Data> = WithRef<WithCommonBase<T> & BaseWithoutFields<D>>;
|
|
186
|
+
type WithFields<D extends Data = Data> = WithRef<WithCommonBase & BaseWithFields<D>>;
|
|
187
|
+
/**
|
|
188
|
+
* @description 自动从 Vue 组件提取 Props 和 Slots,并加上公共表单字段属性
|
|
189
|
+
* @template T - Vue 组件类型
|
|
190
|
+
* @template D - 数据对象类型
|
|
191
|
+
*/
|
|
192
|
+
type WithComponent<T extends abstract new (...args: any) => any, D extends Data = Data> = WithCommon<{
|
|
193
|
+
slots?: Partial<ComponentSlots<T>>;
|
|
194
|
+
} & Partial<Omit<ComponentProps<T>, keyof VNodeProps>>, D>;
|
|
195
|
+
/**
|
|
196
|
+
* @description 字段配置类型,包含所有字段属性和响应式支持
|
|
197
|
+
* @template D - 数据对象类型
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
export type Field<C extends ComponentName = ComponentName, D extends Data = Data> = FieldTypeMap<D>[C] | WithFields<D>;
|
|
201
|
+
/**
|
|
202
|
+
* @description 字段数组类型
|
|
203
|
+
* @template D - 数据对象类型
|
|
204
|
+
* @public
|
|
205
|
+
*/
|
|
206
|
+
export type Fields<D extends Data = Data> = Array<Field<ComponentName, D>>;
|
|
207
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;AAC9C,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,EACL,UAAU,EACX,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEvD,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC;AAEjD,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,GAAG,I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UAAU,CAAC,CAAC,CAAC,CAAC;AAEvC;;;;GAIG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Columns } from '../types';
|
|
2
|
+
import { Table } from '../hooks/useTable';
|
|
3
|
+
type Props = {
|
|
4
|
+
columns: Columns;
|
|
5
|
+
table?: Table;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=ColumnControl.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ColumnControl.vue"],"names":[],"mappings":"AA+IA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;;AAyPF,wBAOG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLDivElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=DefaultSearchFormContainer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultSearchFormContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/DefaultSearchFormContainer.vue"],"names":[],"mappings":"AA2BA,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLDivElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=DefaultTableContainer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultTableContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/DefaultTableContainer.vue"],"names":[],"mappings":"AA2BA,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"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { TableProps, ColumnType } from '../../../shared/ui';
|
|
2
|
+
import { Slot } from 'vue';
|
|
3
|
+
import { ContainerComponent } from '../../form/types';
|
|
4
|
+
import { SearchFormProps } from './SearchForm.vue';
|
|
5
|
+
import { Table } from '../hooks/useTable';
|
|
6
|
+
import { Column } from '../types';
|
|
7
|
+
declare const _default: <T extends Table<any> = Table>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
9
|
+
readonly "onUpdate:size"?: ((value: import('ant-design-vue/es/button').ButtonSize) => any) | undefined;
|
|
10
|
+
readonly "onUpdate:loading"?: ((value: boolean) => any) | undefined;
|
|
11
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:size" | "onUpdate:loading"> & ({
|
|
12
|
+
size?: TableProps["size"];
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
} & {
|
|
15
|
+
table?: T;
|
|
16
|
+
search?: () => Promise<unknown>;
|
|
17
|
+
addIndexColumn?: boolean;
|
|
18
|
+
immediateSearch?: boolean;
|
|
19
|
+
control?: boolean | Partial<{
|
|
20
|
+
sizeControl: boolean;
|
|
21
|
+
columnControl: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
searchFormConfig?: Omit<SearchFormProps, "form"> & {
|
|
24
|
+
hidden?: boolean;
|
|
25
|
+
container?: ContainerComponent | false;
|
|
26
|
+
};
|
|
27
|
+
tableContainer?: ContainerComponent | false;
|
|
28
|
+
} & TableProps<any>) & Partial<{}>> & import('vue').PublicProps;
|
|
29
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
30
|
+
attrs: any;
|
|
31
|
+
slots: Readonly<Omit<Omit<Readonly<{
|
|
32
|
+
emptyText?: any;
|
|
33
|
+
expandIcon?: Slot<import('ant-design-vue/es/vc-table/interface').RenderExpandIconProps<any> | undefined> | undefined;
|
|
34
|
+
title?: any;
|
|
35
|
+
footer?: any;
|
|
36
|
+
summary?: any;
|
|
37
|
+
expandedRowRender?: any;
|
|
38
|
+
expandColumnTitle?: any;
|
|
39
|
+
bodyCell?: ((props: {
|
|
40
|
+
text: any;
|
|
41
|
+
value: any;
|
|
42
|
+
record: Record<string, any>;
|
|
43
|
+
index: number;
|
|
44
|
+
column: import('ant-design-vue/es/table/interface').ColumnType<any>;
|
|
45
|
+
}) => void) | undefined;
|
|
46
|
+
headerCell?: ((props: {
|
|
47
|
+
title: any;
|
|
48
|
+
column: import('ant-design-vue/es/table/interface').ColumnType<any>;
|
|
49
|
+
}) => void) | undefined;
|
|
50
|
+
customFilterIcon?: any;
|
|
51
|
+
customFilterDropdown?: any;
|
|
52
|
+
default: any;
|
|
53
|
+
}>, "bodyCell"> & Readonly<{
|
|
54
|
+
bodyCell?: (props: {
|
|
55
|
+
text: any;
|
|
56
|
+
value: any;
|
|
57
|
+
record: T extends Table<any, infer R extends import('@qin-ui/pro-components-core/es/shared/types').Data> ? R : never;
|
|
58
|
+
index: number;
|
|
59
|
+
column: Column<T extends Table<any, infer R extends import('@qin-ui/pro-components-core/es/shared/types').Data> ? R : never>;
|
|
60
|
+
}) => void;
|
|
61
|
+
}> & Readonly<Partial<Record<"table" | "search-form" | "button-bar" | "toolbar", Slot>>>, "default">> & Omit<Omit<Readonly<{
|
|
62
|
+
emptyText?: any;
|
|
63
|
+
expandIcon?: Slot<import('ant-design-vue/es/vc-table/interface').RenderExpandIconProps<any> | undefined> | undefined;
|
|
64
|
+
title?: any;
|
|
65
|
+
footer?: any;
|
|
66
|
+
summary?: any;
|
|
67
|
+
expandedRowRender?: any;
|
|
68
|
+
expandColumnTitle?: any;
|
|
69
|
+
bodyCell?: ((props: {
|
|
70
|
+
text: any;
|
|
71
|
+
value: any;
|
|
72
|
+
record: Record<string, any>;
|
|
73
|
+
index: number;
|
|
74
|
+
column: import('ant-design-vue/es/table/interface').ColumnType<any>;
|
|
75
|
+
}) => void) | undefined;
|
|
76
|
+
headerCell?: ((props: {
|
|
77
|
+
title: any;
|
|
78
|
+
column: import('ant-design-vue/es/table/interface').ColumnType<any>;
|
|
79
|
+
}) => void) | undefined;
|
|
80
|
+
customFilterIcon?: any;
|
|
81
|
+
customFilterDropdown?: any;
|
|
82
|
+
default: any;
|
|
83
|
+
}>, "bodyCell"> & Readonly<{
|
|
84
|
+
bodyCell?: (props: {
|
|
85
|
+
text: any;
|
|
86
|
+
value: any;
|
|
87
|
+
record: T extends Table<any, infer R extends import('@qin-ui/pro-components-core/es/shared/types').Data> ? R : never;
|
|
88
|
+
index: number;
|
|
89
|
+
column: Column<T extends Table<any, infer R extends import('@qin-ui/pro-components-core/es/shared/types').Data> ? R : never>;
|
|
90
|
+
}) => void;
|
|
91
|
+
}> & Readonly<Partial<Record<"table" | "search-form" | "button-bar" | "toolbar", Slot>>>, "default">;
|
|
92
|
+
emit: ((evt: "update:size", value: import('ant-design-vue/es/button').ButtonSize) => void) & ((evt: "update:loading", value: boolean) => void);
|
|
93
|
+
}>) => import('vue').VNode & {
|
|
94
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
95
|
+
};
|
|
96
|
+
export default _default;
|
|
97
|
+
type __VLS_PrettifyLocal<T> = {
|
|
98
|
+
[K in keyof T]: T[K];
|
|
99
|
+
} & {};
|
|
100
|
+
//# sourceMappingURL=ProTable.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"AAAA,OAiZO,EAGL,UAAU,EACV,UAAU,EAEX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAML,KAAK,IAAI,EACV,MAAM,KAAK,CAAC;AAGb,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAS/C,OAAO,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;yBAE1B,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,EAC5C,aAAa,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AAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA3bzE,wBA2b4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { FormProps } from '../../../shared/ui';
|
|
2
|
+
import { AllowedComponentProps, Component, DefineComponent } from 'vue';
|
|
3
|
+
import { Form } from '../../form';
|
|
4
|
+
type Expand = {
|
|
5
|
+
minExpandRows?: number;
|
|
6
|
+
expandStatus?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type _FormProps = Pick<Partial<FormProps>, 'colon' | 'disabled' | 'hideRequiredMark' | 'labelAlign' | 'labelCol' | 'labelWrap' | 'name' | 'wrapperCol'>;
|
|
9
|
+
type ButtonProps = {
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
};
|
|
12
|
+
type ExpandButtonProps = ButtonProps & {
|
|
13
|
+
expandStatus: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type SearchFormProps = {
|
|
16
|
+
form: Form;
|
|
17
|
+
layout?: 'grid' | 'inline';
|
|
18
|
+
expand?: boolean | Expand;
|
|
19
|
+
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
20
|
+
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
21
|
+
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps> | false;
|
|
22
|
+
rowGap?: number;
|
|
23
|
+
columnGap?: number;
|
|
24
|
+
} & /* @vue-ignore */ _FormProps & AllowedComponentProps;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<SearchFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
26
|
+
reset: () => any;
|
|
27
|
+
search: () => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<SearchFormProps> & Readonly<{
|
|
29
|
+
onReset?: (() => any) | undefined;
|
|
30
|
+
onSearch?: (() => any) | undefined;
|
|
31
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
32
|
+
'reset-button'?(_: {
|
|
33
|
+
onClick: () => void;
|
|
34
|
+
}): any;
|
|
35
|
+
'search-button'?(_: {
|
|
36
|
+
onClick: () => void;
|
|
37
|
+
}): any;
|
|
38
|
+
'expand-button'?(_: {
|
|
39
|
+
onClick: () => void;
|
|
40
|
+
}): any;
|
|
41
|
+
}>;
|
|
42
|
+
export default _default;
|
|
43
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
44
|
+
new (): {
|
|
45
|
+
$slots: S;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=SearchForm.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SearchForm.vue"],"names":[],"mappings":"AAAA,OA2TO,EAAiB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,qBAAqB,EAKrB,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAIvC,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,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC7E,WAAW,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC5E,YAAY,CAAC,EACT,SAAS,CAAC,iBAAiB,CAAC,GAC5B,eAAe,CAAC,iBAAiB,CAAC,GAClC,KAAK,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,iBAAiB,CAAC,UAAU,GAC9B,qBAAqB,CAAC;;;;;;;;;;QAuVa,GAAG;;;QACF,GAAG;;;QACH,GAAG;;AAvVzC,wBAoYK;AAQL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TableProps } from '../../../shared/ui';
|
|
2
|
+
type Size = TableProps['size'];
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'size'?: Size;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:size": (value: import('ant-design-vue/es/button').ButtonSize) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
9
|
+
"onUpdate:size"?: ((value: import('ant-design-vue/es/button').ButtonSize) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=SizeControl.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SizeControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SizeControl.vue"],"names":[],"mappings":"AA6DA,OAAO,EAIL,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAC;AAG5B,KAAK,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAqB/B,KAAK,iBAAiB,GAAG;IACzB,MAAM,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;;;;;;AA2GF,wBAQG"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=ColumnHeightOutlined.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnHeightOutlined.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/components/icons/ColumnHeightOutlined.vue"],"names":[],"mappings":";AAkDA,wBAKG"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=DownOutlined.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownOutlined.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/components/icons/DownOutlined.vue"],"names":[],"mappings":";AAkDA,wBAKG"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=FilterOutlined.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterOutlined.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/components/icons/FilterOutlined.vue"],"names":[],"mappings":";AAkDA,wBAKG"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as DefaultSearchFormContainer } from './DefaultSearchFormContainer.vue';
|
|
2
|
+
export { default as DefaultTableContainer } from './DefaultTableContainer.vue';
|
|
3
|
+
export { default as SizeControl } from './SizeControl.vue';
|
|
4
|
+
export { default as ColumnControl } from './ColumnControl.vue';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Table as _Table, Data, ExtendWithAny, DeepPartial, PageParam } from '../../../shared/core';
|
|
2
|
+
import { Column, Columns } from '../types';
|
|
3
|
+
import { Fields } from '../../form/types';
|
|
4
|
+
/**
|
|
5
|
+
* 表格实例类型
|
|
6
|
+
*
|
|
7
|
+
* @description 在 core Table 类型的基础上,将列类型 C 绑定为本地 Column<T>,
|
|
8
|
+
* 使 columns 操作获得 Ant Design Vue 表格列的完整属性类型提示。
|
|
9
|
+
*
|
|
10
|
+
* @template D - 搜索表单数据类型
|
|
11
|
+
* @template T - 表格行数据类型(一行数据的类型)
|
|
12
|
+
*
|
|
13
|
+
* @property columns - 列配置数组(响应式 Ref),用于渲染表格列
|
|
14
|
+
* @property dataSource - 表格数据源(响应式 Ref),绑定到 Table 的 data-source
|
|
15
|
+
* @property pageParam - 分页参数(响应式 reactive),包含 current、pageSize、total
|
|
16
|
+
* @property searchForm - 搜索表单实例(Form 类型),用于管理搜索区域的字段和数据
|
|
17
|
+
* @property setColumn - 更新列配置,支持合并/覆盖两种模式,用法同 setField
|
|
18
|
+
* @property deleteColumn - 删除列,支持路径或查找函数
|
|
19
|
+
* @property appendColumn - 在指定列后追加新列,传 undefined 在末尾追加
|
|
20
|
+
* @property prependColumn - 在指定列前插入新列,传 undefined 在开头插入
|
|
21
|
+
* @property setPageParam - 设置分页参数,支持部分更新和函数式更新
|
|
22
|
+
* @property resetQueryParams - 重置分页到第一页并恢复搜索条件到初始值
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* interface SearchParams { keyword: string }
|
|
27
|
+
* interface User { name: string; age: number }
|
|
28
|
+
*
|
|
29
|
+
* const table: Table<SearchParams, User> = useTable({
|
|
30
|
+
* columns: [{ dataIndex: 'name', title: '姓名' }],
|
|
31
|
+
* })
|
|
32
|
+
*
|
|
33
|
+
* table.columns.value // 访问列配置
|
|
34
|
+
* table.setColumn('name', { width: 150 }) // 更新列
|
|
35
|
+
* table.setPageParam({ current: 2 }) // 切换页码
|
|
36
|
+
* table.searchForm.setFormData('keyword', '搜索词') // 操作搜索表单
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export type Table<D extends Data = Data, T extends Data = ExtendWithAny<D>> = _Table<D, T, Column<T>>;
|
|
42
|
+
/**
|
|
43
|
+
* 创建表格实例的 Hook
|
|
44
|
+
*
|
|
45
|
+
* @description 基于 `@qin-ui/pro-components-core` 的 `useTable`,将列类型绑定为本地 `Column<T>`。
|
|
46
|
+
* 是 ProTable 组件的核心 Hook,提供了:
|
|
47
|
+
* - 列配置管理(增删改查)
|
|
48
|
+
* - 数据源管理
|
|
49
|
+
* - 分页管理
|
|
50
|
+
* - 搜索表单集成(内部使用 useForm)
|
|
51
|
+
* - 查询参数重置
|
|
52
|
+
*
|
|
53
|
+
* @template D - 搜索表单数据类型
|
|
54
|
+
* @template T - 表格行数据类型
|
|
55
|
+
*
|
|
56
|
+
* @param {object} params - 表格配置参数
|
|
57
|
+
* @param {Columns<T>} [params.columns] - 初始列配置数组
|
|
58
|
+
* @param {T[]} [params.dataSource] - 初始数据源
|
|
59
|
+
* @param {PageParam} [params.pageParam] - 初始分页参数,默认 `{ current: 1, pageSize: 10, total: 0 }`
|
|
60
|
+
* @param {ExtendWithAny<DeepPartial<D>>} [params.searchParam] - 初始搜索参数
|
|
61
|
+
* @param {Fields<D>} [params.searchFields] - 搜索表单字段配置
|
|
62
|
+
*
|
|
63
|
+
* @returns {Table<D, T>} 表格实例
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* interface SearchParams { keyword: string; status: string }
|
|
68
|
+
* interface User { name: string; age: number; email: string }
|
|
69
|
+
*
|
|
70
|
+
* const table = useTable<SearchParams, User>({
|
|
71
|
+
* columns: [
|
|
72
|
+
* { dataIndex: 'name', title: '姓名', width: 120 },
|
|
73
|
+
* { dataIndex: 'age', title: '年龄', width: 80 },
|
|
74
|
+
* ],
|
|
75
|
+
* dataSource: [],
|
|
76
|
+
* pageParam: { current: 1, pageSize: 20, total: 0 },
|
|
77
|
+
* searchParam: { keyword: '', status: '' },
|
|
78
|
+
* searchFields: [
|
|
79
|
+
* { path: 'keyword', label: '关键词', component: 'input' },
|
|
80
|
+
* { path: 'status', label: '状态', component: 'select' },
|
|
81
|
+
* ],
|
|
82
|
+
* })
|
|
83
|
+
*
|
|
84
|
+
* // 查询
|
|
85
|
+
* const handleSearch = async () => {
|
|
86
|
+
* const res = await fetchUserList({
|
|
87
|
+
* ...table.searchForm.formData,
|
|
88
|
+
* ...table.pageParam,
|
|
89
|
+
* })
|
|
90
|
+
* table.dataSource.value = res.data
|
|
91
|
+
* table.setPageParam({ total: res.total })
|
|
92
|
+
* }
|
|
93
|
+
*
|
|
94
|
+
* // 重置
|
|
95
|
+
* const handleReset = () => {
|
|
96
|
+
* table.resetQueryParams()
|
|
97
|
+
* handleSearch()
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* @see {@link coreUseTable} 底层核心实现(来自 @qin-ui/pro-components-core)
|
|
102
|
+
*
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
export declare function useTable<D extends Data = Data, T extends Data = ExtendWithAny<D>>(params: {
|
|
106
|
+
columns?: Columns<T>;
|
|
107
|
+
dataSource?: T[];
|
|
108
|
+
pageParam?: PageParam;
|
|
109
|
+
searchParam?: ExtendWithAny<DeepPartial<D>>;
|
|
110
|
+
searchFields?: Fields<D>;
|
|
111
|
+
}): Table<D, T>;
|
|
112
|
+
//# sourceMappingURL=useTable.d.ts.map
|
|
@@ -0,0 +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,EACb,WAAW,EACX,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,MAAM,KAAK,CACf,CAAC,SAAS,IAAI,GAAG,IAAI,EACrB,CAAC,SAAS,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,IAC/B,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,QAAQ,CACtB,CAAC,SAAS,IAAI,GAAG,IAAI,EACrB,CAAC,SAAS,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,EACjC,MAAM,EAAE;IACR,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC1B,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAEd"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentExposed, ComponentProps } from 'vue-component-type-helpers';
|
|
2
|
+
import { default as ProTable } from './components/ProTable.vue';
|
|
3
|
+
export type ProTableProps = ComponentProps<typeof ProTable>;
|
|
4
|
+
export type ProTableInstance = ComponentExposed<typeof ProTable>;
|
|
5
|
+
export { type Column, type Columns } from './types';
|
|
6
|
+
export { useTable, type Table } from './hooks';
|
|
7
|
+
export default ProTable;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AAGjD,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGjE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAe,QAAQ,CAAC"}
|