@qin-ui/antdv-next-pro 1.0.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/es/antdv-next-pro.css +58 -0
- package/es/component-provider/index-B-Yy-eoc.js +519 -0
- package/es/component-provider/index.js +5 -0
- package/es/form/index-DnjfDQC_.js +439 -0
- package/es/form/index.js +20 -0
- package/es/index.d.ts +840 -0
- package/es/index.js +47 -0
- package/es/table/index.js +679 -0
- package/es/vendor/utils/lodash-es-p6jau26B.js +1120 -0
- package/package.json +44 -0
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,840 @@
|
|
|
1
|
+
import { AllowedComponentProps } from 'vue';
|
|
2
|
+
import { AnyObject } from 'antdv-next/dist/_util/type';
|
|
3
|
+
import { App } from 'vue';
|
|
4
|
+
import { ButtonSize } from 'antdv-next';
|
|
5
|
+
import { CascaderProps } from 'antdv-next';
|
|
6
|
+
import { CascaderSlots } from 'antdv-next';
|
|
7
|
+
import { CheckboxGroupProps } from 'antdv-next';
|
|
8
|
+
import { ColProps } from 'antdv-next';
|
|
9
|
+
import { Component } from 'vue';
|
|
10
|
+
import { ComponentCustomProps } from 'vue';
|
|
11
|
+
import { ComponentExposed } from 'vue-component-type-helpers';
|
|
12
|
+
import { ComponentOptionsBase } from 'vue';
|
|
13
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
14
|
+
import { ComponentProps } from 'vue-component-type-helpers';
|
|
15
|
+
import { ComponentProvideOptions } from 'vue';
|
|
16
|
+
import { ComputedRef } from 'vue';
|
|
17
|
+
import { CreateComponentPublicInstanceWithMixins } from 'vue';
|
|
18
|
+
import { CSSProperties } from 'vue';
|
|
19
|
+
import { Data } from '@qin-ui/core';
|
|
20
|
+
import { DatePickerProps } from 'antdv-next';
|
|
21
|
+
import { DatePickerSlots } from 'antdv-next';
|
|
22
|
+
import { DeepPartial } from '@qin-ui/core';
|
|
23
|
+
import { DefineComponent } from 'vue';
|
|
24
|
+
import { ExtendWithAny } from '@qin-ui/core';
|
|
25
|
+
import { FeedbackIcons } from 'antdv-next/dist/form/FormItem/index';
|
|
26
|
+
import { Fields as Fields_2 } from '@qin-ui/core';
|
|
27
|
+
import { FilterDropdownProps } from 'antdv-next/dist/table/interface';
|
|
28
|
+
import { Form as Form_2 } from '@qin-ui/core';
|
|
29
|
+
import { FormClassNamesType } from 'antdv-next/dist/form/Form';
|
|
30
|
+
import { FormEmits } from 'antdv-next';
|
|
31
|
+
import { FormInstance } from 'antdv-next';
|
|
32
|
+
import { FormItem } from 'antdv-next';
|
|
33
|
+
import { FormItemProps } from 'antdv-next';
|
|
34
|
+
import { FormLabelAlign } from 'antdv-next/dist/form/interface';
|
|
35
|
+
import { FormLayout } from 'antdv-next/dist/form/Form';
|
|
36
|
+
import { FormProps } from 'antdv-next';
|
|
37
|
+
import { FormStylesType } from 'antdv-next/dist/form/Form';
|
|
38
|
+
import { FormTooltipProps } from 'antdv-next/dist/form/FormItemLabel';
|
|
39
|
+
import { GlobalComponents } from 'vue';
|
|
40
|
+
import { GlobalDirectives } from 'vue';
|
|
41
|
+
import { HTMLAttributes } from 'vue';
|
|
42
|
+
import { InjectionFormKey } from '@qin-ui/core';
|
|
43
|
+
import { InjectionKey } from 'vue';
|
|
44
|
+
import { InjectionPathKey } from '@qin-ui/core';
|
|
45
|
+
import { InputNumberProps } from 'antdv-next';
|
|
46
|
+
import { InputNumberSlots } from 'antdv-next/dist/input-number/index';
|
|
47
|
+
import { InputOTPProps } from 'antdv-next';
|
|
48
|
+
import { InputPasswordProps } from 'antdv-next';
|
|
49
|
+
import { InputProps } from 'antdv-next';
|
|
50
|
+
import { InputSearchProps } from 'antdv-next';
|
|
51
|
+
import { InputSlots } from 'antdv-next';
|
|
52
|
+
import { KeyExpandString } from '@qin-ui/core';
|
|
53
|
+
import { MaybeRef } from 'vue';
|
|
54
|
+
import { MonthPickerProps } from 'antdv-next';
|
|
55
|
+
import { OPTSlots } from 'antdv-next/dist/input/OTP/index';
|
|
56
|
+
import { PageParam } from '@qin-ui/core';
|
|
57
|
+
import { PasswordSlots } from 'antdv-next/dist/input/Password';
|
|
58
|
+
import { Path } from '@qin-ui/core';
|
|
59
|
+
import { Paths } from '@qin-ui/core';
|
|
60
|
+
import { Plugin as Plugin_2 } from 'vue';
|
|
61
|
+
import { PublicProps } from 'vue';
|
|
62
|
+
import { RadioGroupProps } from 'antdv-next';
|
|
63
|
+
import { RangePickerProps } from 'antdv-next';
|
|
64
|
+
import { RangePickerSlots } from 'antdv-next/dist/date-picker/generatePicker/generateRangePicker';
|
|
65
|
+
import { Raw } from 'vue';
|
|
66
|
+
import { RequiredMark } from 'antdv-next/dist/form/Form';
|
|
67
|
+
import { RowProps } from 'antdv-next';
|
|
68
|
+
import { Rule } from 'antdv-next/dist/form/types';
|
|
69
|
+
import { ScrollFocusOptions } from 'antdv-next/dist/form/interface';
|
|
70
|
+
import { SearchSlots } from 'antdv-next/dist/input/Search';
|
|
71
|
+
import { SelectProps } from 'antdv-next';
|
|
72
|
+
import { SelectSlots } from 'antdv-next';
|
|
73
|
+
import { ShallowUnwrapRef } from 'vue';
|
|
74
|
+
import { SliderProps } from 'antdv-next';
|
|
75
|
+
import { SliderSlots } from 'antdv-next/dist/slider/index';
|
|
76
|
+
import { Slot } from 'vue';
|
|
77
|
+
import { SwitchProps } from 'antdv-next';
|
|
78
|
+
import { SwitchSlots } from 'antdv-next';
|
|
79
|
+
import { Table as Table_2 } from '@qin-ui/core';
|
|
80
|
+
import { TableColumnType } from 'antdv-next';
|
|
81
|
+
import { TableProps } from 'antdv-next';
|
|
82
|
+
import { TextAreaProps } from 'antdv-next';
|
|
83
|
+
import { TextAreaSlots } from 'antdv-next/dist/input/TextArea';
|
|
84
|
+
import { TimePickerProps } from 'antdv-next';
|
|
85
|
+
import { TimePickerSlots } from 'antdv-next/dist/time-picker/index';
|
|
86
|
+
import { TimeRangePickerProps } from 'antdv-next';
|
|
87
|
+
import { TransferProps } from 'antdv-next';
|
|
88
|
+
import { TransferSlots } from 'antdv-next';
|
|
89
|
+
import { TreeSelectProps } from 'antdv-next';
|
|
90
|
+
import { TreeSelectSlots } from 'antdv-next';
|
|
91
|
+
import { useFields as useFields_2 } from '@qin-ui/core';
|
|
92
|
+
import { useFormData } from '@qin-ui/core';
|
|
93
|
+
import { useFormRef as useFormRef_2 } from '@qin-ui/core';
|
|
94
|
+
import { ValidateMessages } from 'antdv-next/dist/form/types';
|
|
95
|
+
import { Variant } from 'antdv-next/dist/config-provider/context';
|
|
96
|
+
import { VNode } from 'vue';
|
|
97
|
+
import { VNodeProps } from 'vue';
|
|
98
|
+
import { WeekPickerProps } from 'antdv-next';
|
|
99
|
+
|
|
100
|
+
declare const __VLS_component: DefineComponent<Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
101
|
+
|
|
102
|
+
declare type __VLS_PrettifyLocal<T> = {
|
|
103
|
+
[K in keyof T]: T[K];
|
|
104
|
+
} & {};
|
|
105
|
+
|
|
106
|
+
declare type __VLS_PrettifyLocal_2<T> = {
|
|
107
|
+
[K in keyof T]: T[K];
|
|
108
|
+
} & {};
|
|
109
|
+
|
|
110
|
+
declare function __VLS_template(): {
|
|
111
|
+
attrs: Partial<{}>;
|
|
112
|
+
slots: {
|
|
113
|
+
default?(_: {}): any;
|
|
114
|
+
default?(_: {}): any;
|
|
115
|
+
};
|
|
116
|
+
refs: {};
|
|
117
|
+
rootEl: any;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
121
|
+
|
|
122
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
123
|
+
new (): {
|
|
124
|
+
$slots: S;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @type {Object} Base - 基础公共字段类型
|
|
130
|
+
*/
|
|
131
|
+
export declare interface Base<D extends Data = Data> {
|
|
132
|
+
/**
|
|
133
|
+
* @description 字段标识namePath, 同name
|
|
134
|
+
* @example 'name' | 'age' | 'sex' | ...
|
|
135
|
+
*/
|
|
136
|
+
path?: Path<D>;
|
|
137
|
+
/**
|
|
138
|
+
* @description 字段是否隐藏
|
|
139
|
+
*/
|
|
140
|
+
hidden?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* @description 字段中文名称,支持字符串或组件
|
|
143
|
+
* @example '姓名' | '年龄' | '性别' | () => h('span', '自定义标签')
|
|
144
|
+
*/
|
|
145
|
+
label?: SlotComponentType;
|
|
146
|
+
/**
|
|
147
|
+
* @description 字段插槽配置,可包含formItem插槽和component插槽
|
|
148
|
+
* @example
|
|
149
|
+
* ```js
|
|
150
|
+
* slots: {
|
|
151
|
+
* label: () => h('div', { style: { fontSize: '12px' } }, '年龄'),
|
|
152
|
+
* addonAfter: '岁',
|
|
153
|
+
* suffix: () => h('span', '元')
|
|
154
|
+
* }
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
slots?: Partial<Record<(typeof FORM_ITEM_SLOT_KEYS)[number], SlotComponentType>>;
|
|
158
|
+
/**
|
|
159
|
+
* @description 字段formItem样式属性
|
|
160
|
+
* @example { marginBottom: '8px', padding: '12px' }
|
|
161
|
+
*/
|
|
162
|
+
style?: CSSProperties;
|
|
163
|
+
/**
|
|
164
|
+
* @description 字段formItem样式类名
|
|
165
|
+
* @example 'custom-form-item' | 'required-field'
|
|
166
|
+
*/
|
|
167
|
+
className?: string;
|
|
168
|
+
/**
|
|
169
|
+
* @description 嵌套子字段配置
|
|
170
|
+
* @example [{ key: 'firstName', label: '名' }, { key: 'lastName', label: '姓' }]
|
|
171
|
+
*/
|
|
172
|
+
fields?: Fields<D>;
|
|
173
|
+
/**
|
|
174
|
+
* @description 网格布局属性,true表示使用默认网格布局,针对具有嵌套字段的字段
|
|
175
|
+
* @example boolean | { gutter: 24 }
|
|
176
|
+
*/
|
|
177
|
+
grid?: Grid;
|
|
178
|
+
/**
|
|
179
|
+
* @description 字段formItem容器包裹组件
|
|
180
|
+
* @example (props, ctx) => h('div', { class: 'custom-container' }, ctx.slots.default?.())
|
|
181
|
+
*/
|
|
182
|
+
container?: ContainerComponent;
|
|
183
|
+
/**
|
|
184
|
+
* @description 字段component样式属性
|
|
185
|
+
* @example { width: '100%', borderColor: '#d9d9d9' }
|
|
186
|
+
*/
|
|
187
|
+
componentStyle?: CSSProperties;
|
|
188
|
+
/**
|
|
189
|
+
* @description 字段component样式类名
|
|
190
|
+
* @example 'custom-input' | 'error-input'
|
|
191
|
+
*/
|
|
192
|
+
componentClassName?: string;
|
|
193
|
+
/**
|
|
194
|
+
* @description 字段component容器包裹组件
|
|
195
|
+
* @example (props, ctx) => h('div', { class: 'input-wrapper' }, ctx.slots.default?.())
|
|
196
|
+
*/
|
|
197
|
+
componentContainer?: ContainerComponent;
|
|
198
|
+
/**
|
|
199
|
+
* @description 字段值处理函数,在onUpdateValue前执行,函数返回值将作为更新值,也可设置get和set函数,用于处理字段值
|
|
200
|
+
* @example (val) => val?.trim()
|
|
201
|
+
*/
|
|
202
|
+
valueFormatter?: ValueFormatter;
|
|
203
|
+
/**
|
|
204
|
+
* @description 组件v-model双向绑定更新属性名,默认'value'
|
|
205
|
+
*/
|
|
206
|
+
modelName?: string;
|
|
207
|
+
/**
|
|
208
|
+
* @description 以data-form-item-开始的属性名将会被渲染至formItem的dom节点
|
|
209
|
+
* @example { 'data-form-item-test': 'test-value' }
|
|
210
|
+
*/
|
|
211
|
+
[key: `data-form-item-${string}`]: string;
|
|
212
|
+
/**
|
|
213
|
+
* @description 以data-component-开始的属性名将会被渲染至component的dom节点
|
|
214
|
+
* @example { 'data-component-test': 'test-value' }
|
|
215
|
+
*/
|
|
216
|
+
[key: `data-component-${string}`]: string;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @description 基础组件字符串名称类型
|
|
221
|
+
*/
|
|
222
|
+
export declare type BaseComponentStringName = Exclude<Field['component'], RenderComponentType | undefined>;
|
|
223
|
+
|
|
224
|
+
export declare const BaseField: DefineComponent<Props, {
|
|
225
|
+
getComponentRef: () => any;
|
|
226
|
+
getComponentComputedProps: () => any;
|
|
227
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
228
|
+
componentRef: unknown;
|
|
229
|
+
}, any>;
|
|
230
|
+
|
|
231
|
+
export declare const BaseForm: <F extends Form<any> = Form>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal_2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
232
|
+
props: __VLS_PrettifyLocal_2<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ({
|
|
233
|
+
grid?: Grid;
|
|
234
|
+
form?: F;
|
|
235
|
+
} & Partial<Omit<FormProps, "model">>) & Partial<{}>> & PublicProps;
|
|
236
|
+
expose(exposed: ShallowUnwrapRef< {}>): void;
|
|
237
|
+
attrs: any;
|
|
238
|
+
slots: Readonly<Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
|
|
239
|
+
path?: string;
|
|
240
|
+
} & Data & {
|
|
241
|
+
[x: string]: any;
|
|
242
|
+
disabled?: boolean;
|
|
243
|
+
}>> & {
|
|
244
|
+
default: Slot;
|
|
245
|
+
}>> & Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
|
|
246
|
+
path?: string;
|
|
247
|
+
} & Data & {
|
|
248
|
+
[x: string]: any;
|
|
249
|
+
disabled?: boolean;
|
|
250
|
+
}>> & {
|
|
251
|
+
default: Slot;
|
|
252
|
+
}>;
|
|
253
|
+
emit: {};
|
|
254
|
+
}>) => VNode & {
|
|
255
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export declare const BaseFormItem: DefineComponent<Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_4> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
259
|
+
|
|
260
|
+
declare type ButtonProps = {
|
|
261
|
+
onClick: () => void;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
export declare type Column<D extends Data = Data> = Omit<TableColumnType, 'dataIndex' | 'key'> & {
|
|
265
|
+
dataIndex?: KeyExpandString<Extract<keyof D, string>> | Paths<D>;
|
|
266
|
+
key?: Path<D>;
|
|
267
|
+
hidden?: boolean;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
export declare type Columns<D extends Data = Data> = Array<Column<D>>;
|
|
271
|
+
|
|
272
|
+
export declare const COMPONENT_MAP: Map<BaseComponentStringName, Component>;
|
|
273
|
+
|
|
274
|
+
export declare type ComponentVars = Partial<RequiredComponentVars>;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @description 容器组件类型
|
|
278
|
+
*/
|
|
279
|
+
export declare type ContainerComponent = Component<PathProps>;
|
|
280
|
+
|
|
281
|
+
export declare const ContainerFragment: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
282
|
+
|
|
283
|
+
declare const _default: {
|
|
284
|
+
install(app: App): void;
|
|
285
|
+
};
|
|
286
|
+
export default _default;
|
|
287
|
+
|
|
288
|
+
declare const _default_2: <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<{
|
|
289
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
290
|
+
readonly "onUpdate:size"?: ((value: ButtonSize) => any) | undefined;
|
|
291
|
+
readonly "onUpdate:loading"?: ((value: boolean) => any) | undefined;
|
|
292
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onUpdate:size" | "onUpdate:loading"> & ({
|
|
293
|
+
size?: TableProps["size"];
|
|
294
|
+
loading?: boolean;
|
|
295
|
+
} & {
|
|
296
|
+
table?: T;
|
|
297
|
+
search?: () => Promise<unknown>;
|
|
298
|
+
addIndexColumn?: boolean;
|
|
299
|
+
immediateSearch?: boolean;
|
|
300
|
+
control?: boolean | Partial<{
|
|
301
|
+
sizeControl: boolean;
|
|
302
|
+
columnControl: boolean;
|
|
303
|
+
}>;
|
|
304
|
+
searchFormConfig?: Omit<SearchFormProps, "form"> & {
|
|
305
|
+
hidden?: boolean;
|
|
306
|
+
container?: ContainerComponent | false;
|
|
307
|
+
};
|
|
308
|
+
tableContainer?: ContainerComponent | false;
|
|
309
|
+
} & TableProps<AnyObject>) & Partial<{}>> & PublicProps;
|
|
310
|
+
expose(exposed: ShallowUnwrapRef< {}>): void;
|
|
311
|
+
attrs: any;
|
|
312
|
+
slots: Readonly<Omit<Omit<Readonly<{
|
|
313
|
+
default?: (() => any) | undefined;
|
|
314
|
+
title?: ((data: readonly AnyObject[]) => any) | undefined;
|
|
315
|
+
footer?: ((data: readonly AnyObject[]) => any) | undefined;
|
|
316
|
+
summary?: ((data: readonly AnyObject[]) => any) | undefined;
|
|
317
|
+
emptyText?: (() => any) | undefined;
|
|
318
|
+
expandIcon?: ((info: any) => any) | undefined;
|
|
319
|
+
expandedRowRender?: ((ctx: {
|
|
320
|
+
record: AnyObject;
|
|
321
|
+
index: number;
|
|
322
|
+
indent: number;
|
|
323
|
+
expanded: boolean;
|
|
324
|
+
}) => any) | undefined;
|
|
325
|
+
headerCell?: ((ctx: {
|
|
326
|
+
column: TableColumnType<AnyObject>;
|
|
327
|
+
index: number;
|
|
328
|
+
text: any;
|
|
329
|
+
}) => any) | undefined;
|
|
330
|
+
bodyCell?: ((ctx: {
|
|
331
|
+
column: TableColumnType<AnyObject>;
|
|
332
|
+
index: number;
|
|
333
|
+
text: any;
|
|
334
|
+
record: AnyObject;
|
|
335
|
+
}) => any) | undefined;
|
|
336
|
+
filterDropdown?: ((ctx: FilterDropdownProps & {
|
|
337
|
+
column: TableColumnType<AnyObject>;
|
|
338
|
+
}) => any) | undefined;
|
|
339
|
+
filterIcon?: ((ctx: {
|
|
340
|
+
column: TableColumnType<AnyObject>;
|
|
341
|
+
filtered: boolean;
|
|
342
|
+
}) => any) | undefined;
|
|
343
|
+
}>, "bodyCell"> & Readonly<{
|
|
344
|
+
bodyCell?: (props: {
|
|
345
|
+
text: any;
|
|
346
|
+
value: any;
|
|
347
|
+
record: T extends Table<infer U extends Data> ? U : never;
|
|
348
|
+
index: number;
|
|
349
|
+
column: Column<T extends Table<infer U extends Data> ? U : never>;
|
|
350
|
+
}) => void;
|
|
351
|
+
}> & Readonly<Partial<Record<"table" | "toolbar" | "search-form" | "button-bar", Slot>>>, "default">> & Omit<Omit<Readonly<{
|
|
352
|
+
default?: (() => any) | undefined;
|
|
353
|
+
title?: ((data: readonly AnyObject[]) => any) | undefined;
|
|
354
|
+
footer?: ((data: readonly AnyObject[]) => any) | undefined;
|
|
355
|
+
summary?: ((data: readonly AnyObject[]) => any) | undefined;
|
|
356
|
+
emptyText?: (() => any) | undefined;
|
|
357
|
+
expandIcon?: ((info: any) => any) | undefined;
|
|
358
|
+
expandedRowRender?: ((ctx: {
|
|
359
|
+
record: AnyObject;
|
|
360
|
+
index: number;
|
|
361
|
+
indent: number;
|
|
362
|
+
expanded: boolean;
|
|
363
|
+
}) => any) | undefined;
|
|
364
|
+
headerCell?: ((ctx: {
|
|
365
|
+
column: TableColumnType<AnyObject>;
|
|
366
|
+
index: number;
|
|
367
|
+
text: any;
|
|
368
|
+
}) => any) | undefined;
|
|
369
|
+
bodyCell?: ((ctx: {
|
|
370
|
+
column: TableColumnType<AnyObject>;
|
|
371
|
+
index: number;
|
|
372
|
+
text: any;
|
|
373
|
+
record: AnyObject;
|
|
374
|
+
}) => any) | undefined;
|
|
375
|
+
filterDropdown?: ((ctx: FilterDropdownProps & {
|
|
376
|
+
column: TableColumnType<AnyObject>;
|
|
377
|
+
}) => any) | undefined;
|
|
378
|
+
filterIcon?: ((ctx: {
|
|
379
|
+
column: TableColumnType<AnyObject>;
|
|
380
|
+
filtered: boolean;
|
|
381
|
+
}) => any) | undefined;
|
|
382
|
+
}>, "bodyCell"> & Readonly<{
|
|
383
|
+
bodyCell?: (props: {
|
|
384
|
+
text: any;
|
|
385
|
+
value: any;
|
|
386
|
+
record: T extends Table<infer U extends Data> ? U : never;
|
|
387
|
+
index: number;
|
|
388
|
+
column: Column<T extends Table<infer U extends Data> ? U : never>;
|
|
389
|
+
}) => void;
|
|
390
|
+
}> & Readonly<Partial<Record<"table" | "toolbar" | "search-form" | "button-bar", Slot>>>, "default">;
|
|
391
|
+
emit: ((evt: "update:size", value: ButtonSize) => void) & ((evt: "update:loading", value: boolean) => void);
|
|
392
|
+
}>) => VNode & {
|
|
393
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
declare type Expand = {
|
|
397
|
+
minExpandRows?: number;
|
|
398
|
+
expandStatus?: boolean;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
declare type ExpandButtonProps = ButtonProps & {
|
|
402
|
+
expandStatus: boolean;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* @description 字段配置类型,包含所有字段属性和响应式支持
|
|
407
|
+
* @template D - 数据对象类型
|
|
408
|
+
*/
|
|
409
|
+
export declare type Field<D extends Data = Data> = {
|
|
410
|
+
[K in keyof FieldTypeMap]: {
|
|
411
|
+
component?: K extends 'custom' ? FieldTypeMap<D>[K]['component'] : K;
|
|
412
|
+
} & FieldTypeMap<D>[K];
|
|
413
|
+
}[keyof FieldTypeMap];
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* @description 字段数组类型
|
|
417
|
+
* @template D - 数据对象类型
|
|
418
|
+
*/
|
|
419
|
+
export declare type Fields<D extends Data = Data> = Array<Field<D>>;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* @type {FieldTypeMap} 字段类型集合
|
|
423
|
+
*/
|
|
424
|
+
export declare type FieldTypeMap<D extends Data = Data> = {
|
|
425
|
+
/** 文本框 */
|
|
426
|
+
'input': WithCommon<{
|
|
427
|
+
slots?: InputSlots;
|
|
428
|
+
} & InputProps, D>;
|
|
429
|
+
/** 文本域 */
|
|
430
|
+
'textarea': WithCommon<{
|
|
431
|
+
slots?: TextAreaSlots;
|
|
432
|
+
} & TextAreaProps, D>;
|
|
433
|
+
/** 文本框-密码 */
|
|
434
|
+
'input-password': WithCommon<{
|
|
435
|
+
slots?: PasswordSlots;
|
|
436
|
+
} & InputPasswordProps, D>;
|
|
437
|
+
'input-otp': WithCommon<{
|
|
438
|
+
slots?: OPTSlots;
|
|
439
|
+
} & InputOTPProps, D>;
|
|
440
|
+
/** 文本框-搜索 */
|
|
441
|
+
'input-search': WithCommon<{
|
|
442
|
+
slots?: SearchSlots;
|
|
443
|
+
} & InputSearchProps, D>;
|
|
444
|
+
/** 数字文本框 */
|
|
445
|
+
'input-number': WithCommon<{
|
|
446
|
+
slots?: InputNumberSlots;
|
|
447
|
+
} & InputNumberProps, D>;
|
|
448
|
+
/** 下拉选择器 */
|
|
449
|
+
'select': WithCommon<{
|
|
450
|
+
slots?: SelectSlots;
|
|
451
|
+
} & SelectProps, D>;
|
|
452
|
+
/** 级联选择器 */
|
|
453
|
+
'cascader': WithCommon<{
|
|
454
|
+
slots?: CascaderSlots;
|
|
455
|
+
} & CascaderProps, D>;
|
|
456
|
+
/** 日期选择器 */
|
|
457
|
+
'date-picker': WithCommon<{
|
|
458
|
+
slots?: DatePickerSlots;
|
|
459
|
+
} & DatePickerProps, D>;
|
|
460
|
+
/** 日期选择器-范围 */
|
|
461
|
+
'range-picker': WithCommon<{
|
|
462
|
+
slots?: RangePickerSlots;
|
|
463
|
+
} & RangePickerProps, D>;
|
|
464
|
+
/** 时间选择器 */
|
|
465
|
+
'time-picker': WithCommon<{
|
|
466
|
+
slots?: TimePickerSlots;
|
|
467
|
+
} & TimePickerProps, D>;
|
|
468
|
+
/** 时间选择器 */
|
|
469
|
+
'time-range-picker': WithCommon<TimeRangePickerProps, D>;
|
|
470
|
+
/** 复选框组 */
|
|
471
|
+
'checkbox-group': WithCommon<CheckboxGroupProps, D>;
|
|
472
|
+
/** 单选框组 */
|
|
473
|
+
'radio-group': WithCommon<RadioGroupProps, D>;
|
|
474
|
+
/** 开关 */
|
|
475
|
+
'switch': WithCommon<{
|
|
476
|
+
slots?: SwitchSlots;
|
|
477
|
+
} & SwitchProps, D>;
|
|
478
|
+
/** 滑块 */
|
|
479
|
+
'slider': WithCommon<{
|
|
480
|
+
slots?: SliderSlots;
|
|
481
|
+
} & SliderProps, D>;
|
|
482
|
+
/** 树形选择器 */
|
|
483
|
+
'tree-select': WithCommon<{
|
|
484
|
+
slots?: TreeSelectSlots;
|
|
485
|
+
} & TreeSelectProps, D>;
|
|
486
|
+
/** 穿梭框 */
|
|
487
|
+
'transfer': WithCommon<{
|
|
488
|
+
slots?: TransferSlots;
|
|
489
|
+
} & TransferProps, D>;
|
|
490
|
+
/** 自定义组件 */
|
|
491
|
+
'custom': {
|
|
492
|
+
component?: RenderComponentType | Raw<RenderComponentType>;
|
|
493
|
+
} & WithCommon<{
|
|
494
|
+
slots?: Slots;
|
|
495
|
+
} & Record<string, any>, D>;
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* 重新定义 Form 类型,将 _Form 的第二个泛型参数 F 默认绑定为本地 Field<D>,
|
|
500
|
+
* 使得表单实例中 fields 属性的类型推断包含 UI 库的完整属性签名。
|
|
501
|
+
*/
|
|
502
|
+
export declare type Form<D extends Data = Data, F extends Field<D> = Field<D>> = Form_2<D, F>;
|
|
503
|
+
|
|
504
|
+
export declare const FORM_ITEM_SLOT_KEYS: readonly ["label", "extra", "help", "tooltip"];
|
|
505
|
+
|
|
506
|
+
export { FormInstance }
|
|
507
|
+
|
|
508
|
+
declare type FormItemInstance = InstanceType<typeof FormItem>;
|
|
509
|
+
|
|
510
|
+
declare type _FormProps = Pick<Partial<FormProps>, 'colon' | 'disabled' | 'labelAlign' | 'labelCol' | 'labelWrap' | 'name' | 'wrapperCol'>;
|
|
511
|
+
|
|
512
|
+
declare type FP<T extends Record<string, any>> = Partial<T & Pick<Base, 'valueFormatter' | 'componentContainer' | 'modelName'> & AllowedComponentProps>;
|
|
513
|
+
|
|
514
|
+
export declare const getInitProps: (field: Field) => Record<string, any>;
|
|
515
|
+
|
|
516
|
+
export declare type Grid = boolean | (RowProps & {});
|
|
517
|
+
|
|
518
|
+
export declare const INJECT_CONFIG: {
|
|
519
|
+
[key in keyof RequiredComponentVars]: {
|
|
520
|
+
injectionKey: InjectionKey<RequiredComponentVars[key]>;
|
|
521
|
+
default: RequiredComponentVars[key];
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
export { InjectionFormKey }
|
|
526
|
+
|
|
527
|
+
export { InjectionPathKey }
|
|
528
|
+
|
|
529
|
+
declare type MaybeRefOrComputedRef<T = any> = MaybeRef<T> | ComputedRef<T>;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* @description 不支持响应式的属性名
|
|
533
|
+
*/
|
|
534
|
+
declare type NotSupportedRefOrGetterProps = 'component' | 'container' | 'componentContainer' | 'valueFormatter' | 'fields' | 'slots' | 'modelName';
|
|
535
|
+
|
|
536
|
+
declare type Option_2 = {
|
|
537
|
+
label: string;
|
|
538
|
+
value: any;
|
|
539
|
+
[x: string]: any;
|
|
540
|
+
};
|
|
541
|
+
export { Option_2 as Option }
|
|
542
|
+
|
|
543
|
+
export declare type Options = Array<Option_2>;
|
|
544
|
+
|
|
545
|
+
export declare type PathProps = {
|
|
546
|
+
path?: string;
|
|
547
|
+
} & Data;
|
|
548
|
+
|
|
549
|
+
declare type PP<T extends Record<string, any>> = Partial<T & AllowedComponentProps>;
|
|
550
|
+
|
|
551
|
+
export declare const ProComponentProvider: SFCWithInstall<{
|
|
552
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
553
|
+
componentVars: ComponentVars;
|
|
554
|
+
}> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
555
|
+
P: {};
|
|
556
|
+
B: {};
|
|
557
|
+
D: {};
|
|
558
|
+
C: {};
|
|
559
|
+
M: {};
|
|
560
|
+
Defaults: {};
|
|
561
|
+
}, Readonly<{
|
|
562
|
+
componentVars: ComponentVars;
|
|
563
|
+
}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
564
|
+
__isFragment?: never;
|
|
565
|
+
__isTeleport?: never;
|
|
566
|
+
__isSuspense?: never;
|
|
567
|
+
} & ComponentOptionsBase<Readonly<{
|
|
568
|
+
componentVars: ComponentVars;
|
|
569
|
+
}> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
570
|
+
$slots: {
|
|
571
|
+
default?(_: {}): any;
|
|
572
|
+
};
|
|
573
|
+
})>;
|
|
574
|
+
|
|
575
|
+
export declare const ProForm: SFCWithInstall<(<F extends Form<any> = Form>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
576
|
+
slots: Readonly<Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
|
|
577
|
+
path?: string;
|
|
578
|
+
} & Data & {
|
|
579
|
+
[x: string]: any;
|
|
580
|
+
disabled?: boolean;
|
|
581
|
+
}>> & {
|
|
582
|
+
default: Slot;
|
|
583
|
+
}>> & Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
|
|
584
|
+
path?: string;
|
|
585
|
+
} & Data & {
|
|
586
|
+
[x: string]: any;
|
|
587
|
+
disabled?: boolean;
|
|
588
|
+
}>> & {
|
|
589
|
+
default: Slot;
|
|
590
|
+
}>;
|
|
591
|
+
attrs: any;
|
|
592
|
+
emit: {};
|
|
593
|
+
}, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
594
|
+
props: {
|
|
595
|
+
grid?: Grid | undefined;
|
|
596
|
+
form?: F | undefined;
|
|
597
|
+
requiredMark?: RequiredMark | undefined;
|
|
598
|
+
colon?: boolean | undefined;
|
|
599
|
+
labelAlign?: FormLabelAlign | undefined;
|
|
600
|
+
labelCol?: (ColProps & Partial<HTMLAttributes>) | undefined;
|
|
601
|
+
tooltip?: FormTooltipProps | undefined;
|
|
602
|
+
name?: string | undefined;
|
|
603
|
+
rules?: Record<string, Rule[]> | undefined;
|
|
604
|
+
validateTrigger?: string | string[] | false | undefined;
|
|
605
|
+
rootClass?: string | undefined;
|
|
606
|
+
prefixCls?: string | undefined;
|
|
607
|
+
wrapperCol?: (ColProps & Partial<HTMLAttributes>) | undefined;
|
|
608
|
+
layout?: FormLayout | undefined;
|
|
609
|
+
onReset?: FormEmits["reset"] | undefined;
|
|
610
|
+
onSubmit?: FormEmits["submit"] | undefined;
|
|
611
|
+
disabled?: boolean | undefined;
|
|
612
|
+
labelWrap?: boolean | undefined;
|
|
613
|
+
classes?: FormClassNamesType | undefined;
|
|
614
|
+
styles?: FormStylesType | undefined;
|
|
615
|
+
feedbackIcons?: FeedbackIcons | undefined;
|
|
616
|
+
size?: ButtonSize;
|
|
617
|
+
scrollToFirstError?: (ScrollFocusOptions | boolean) | undefined;
|
|
618
|
+
variant?: Variant | undefined;
|
|
619
|
+
validateMessages?: ValidateMessages | undefined;
|
|
620
|
+
preserve?: boolean | undefined;
|
|
621
|
+
clearOnDestroy?: boolean | undefined;
|
|
622
|
+
validateOnRuleChange?: boolean | undefined;
|
|
623
|
+
autoComplete?: string | undefined | undefined;
|
|
624
|
+
onFinish?: FormEmits["finish"] | undefined;
|
|
625
|
+
onFinishFailed?: FormEmits["finishFailed"] | undefined;
|
|
626
|
+
onValidate?: FormEmits["validate"] | undefined;
|
|
627
|
+
onValuesChange?: FormEmits["valuesChange"] | undefined;
|
|
628
|
+
onFieldsChange?: FormEmits["fieldsChange"] | undefined;
|
|
629
|
+
} & PublicProps;
|
|
630
|
+
expose(exposed: ShallowUnwrapRef< {}>): void;
|
|
631
|
+
attrs: any;
|
|
632
|
+
slots: Readonly<Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
|
|
633
|
+
path?: string;
|
|
634
|
+
} & Data & {
|
|
635
|
+
[x: string]: any;
|
|
636
|
+
disabled?: boolean;
|
|
637
|
+
}>> & {
|
|
638
|
+
default: Slot;
|
|
639
|
+
}>> & Partial<Record<F extends Form<infer D extends Data> ? Path<D> : string, Slot<VModelProps & {
|
|
640
|
+
path?: string;
|
|
641
|
+
} & Data & {
|
|
642
|
+
[x: string]: any;
|
|
643
|
+
disabled?: boolean;
|
|
644
|
+
}>> & {
|
|
645
|
+
default: Slot;
|
|
646
|
+
}>;
|
|
647
|
+
emit: {};
|
|
648
|
+
}>) => VNode & {
|
|
649
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
650
|
+
})>;
|
|
651
|
+
|
|
652
|
+
export declare type ProFormInstance = ComponentExposed<typeof BaseForm>;
|
|
653
|
+
|
|
654
|
+
export declare type ProFormItemInstance = ComponentExposed<typeof BaseFormItem>;
|
|
655
|
+
|
|
656
|
+
export declare type ProFormItemProps = ComponentProps<typeof BaseFormItem>;
|
|
657
|
+
|
|
658
|
+
export declare type ProFormProps = ComponentProps<typeof BaseForm>;
|
|
659
|
+
|
|
660
|
+
declare type Props = {
|
|
661
|
+
component?: string | Component;
|
|
662
|
+
path?: string;
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
declare type Props_2 = {
|
|
666
|
+
component?: ContainerComponent;
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
declare type Props_3 = {
|
|
670
|
+
component?: SlotComponentType;
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
declare type Props_4 = {
|
|
674
|
+
grid?: Grid;
|
|
675
|
+
fields?: Fields;
|
|
676
|
+
disabled?: boolean;
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
export declare const ProTable: typeof _default_2;
|
|
680
|
+
|
|
681
|
+
export declare type ProTableInstance = ComponentExposed<typeof _default_2>;
|
|
682
|
+
|
|
683
|
+
export declare type ProTableProps = ComponentProps<typeof _default_2>;
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* @description 自定义组件
|
|
687
|
+
* @example (p, ctx) => h('div', ctx.attrs)
|
|
688
|
+
*/
|
|
689
|
+
export declare type RenderComponentType = Component<VModelProps & PathProps>;
|
|
690
|
+
|
|
691
|
+
export declare type RequiredComponentVars = {
|
|
692
|
+
'pro-table': PP<TableProps & Pick<ProTableProps, 'control' | 'searchFormConfig' | 'immediateSearch' | 'addIndexColumn' | 'tableContainer'>>;
|
|
693
|
+
'pro-form': PP<Omit<ProFormProps, 'form' | 'grid'> & {
|
|
694
|
+
grid: Exclude<Grid, undefined | boolean>;
|
|
695
|
+
}>;
|
|
696
|
+
'pro-form-item': PP<FormItemProps & Pick<ColProps, 'span' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'> & Pick<Base, 'container'>>;
|
|
697
|
+
'input': FP<InputProps>;
|
|
698
|
+
'textarea': FP<TextAreaProps>;
|
|
699
|
+
'input-password': FP<InputProps>;
|
|
700
|
+
'input-search': FP<InputProps>;
|
|
701
|
+
'input-number': FP<InputNumberProps>;
|
|
702
|
+
'input-opt': FP<InputOTPProps>;
|
|
703
|
+
'select': FP<SelectProps>;
|
|
704
|
+
'cascader': FP<CascaderProps>;
|
|
705
|
+
'date-picker': FP<DatePickerProps>;
|
|
706
|
+
'date-picker.date': FP<DatePickerProps>;
|
|
707
|
+
'date-picker.week': FP<WeekPickerProps>;
|
|
708
|
+
'date-picker.month': FP<MonthPickerProps>;
|
|
709
|
+
'date-picker.year': FP<DatePickerProps>;
|
|
710
|
+
'date-picker.quarter': FP<DatePickerProps>;
|
|
711
|
+
'range-picker': FP<RangePickerProps>;
|
|
712
|
+
'time-picker': FP<TimePickerProps>;
|
|
713
|
+
'time-range-picker': FP<TimeRangePickerProps>;
|
|
714
|
+
'checkbox-group': FP<CheckboxGroupProps>;
|
|
715
|
+
'radio-group': FP<RadioGroupProps>;
|
|
716
|
+
'switch': FP<SwitchProps>;
|
|
717
|
+
'slider': FP<SliderProps>;
|
|
718
|
+
'tree-select': FP<TreeSelectProps>;
|
|
719
|
+
'transfer': FP<TransferProps>;
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
declare type SearchFormProps = {
|
|
723
|
+
form: Form;
|
|
724
|
+
layout?: 'grid' | 'inline';
|
|
725
|
+
expand?: boolean | Expand;
|
|
726
|
+
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps>;
|
|
727
|
+
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps>;
|
|
728
|
+
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps>;
|
|
729
|
+
} & /* @vue-ignore */ _FormProps & AllowedComponentProps;
|
|
730
|
+
|
|
731
|
+
declare type SFCWithInstall<T> = T & Plugin_2;
|
|
732
|
+
|
|
733
|
+
export declare const SlotComponent: DefineComponent<Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_3> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* @description 插槽组件类型
|
|
737
|
+
*/
|
|
738
|
+
export declare type SlotComponentType = Component<PathProps> | VNode | string | number | boolean | null | undefined | ((...args: any[]) => SlotComponentType);
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* @description 插槽对象类型
|
|
742
|
+
*/
|
|
743
|
+
export declare type Slots = {
|
|
744
|
+
[name: string]: SlotComponentType;
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* 重新定义 Table 类型,将 Column 类型绑定为 antdv-next 的 Column<D>
|
|
749
|
+
*/
|
|
750
|
+
export declare type Table<D extends Data = Data, T extends object = ExtendWithAny<D>> = Table_2<D, T, Column<D>>;
|
|
751
|
+
|
|
752
|
+
export declare const TeleportComponentNamePrefix = "TeleportComponent_";
|
|
753
|
+
|
|
754
|
+
/** useFields 返回值类型,F 默认绑定为本地 Field<D> */
|
|
755
|
+
export declare type UseFields<D extends Data = Data, F extends Field<D> = Field<D>> = ReturnType<typeof useFields<D, F>>;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* 类型断言 re-export @qin-ui/core 的 useFields,
|
|
759
|
+
* 将泛型参数 F 的默认值覆盖为本地的 Field<D>,
|
|
760
|
+
* 使得 fields、getField 等方法的类型推断包含 UI 库的完整属性签名。
|
|
761
|
+
*/
|
|
762
|
+
export declare const useFields: {
|
|
763
|
+
<D extends Data = Data, F extends Field<D> = Field<D>>(initFields?: F[]): ReturnType<typeof useFields_2<D, F>>;
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* 类型断言 re-export @qin-ui/core 的 useForm,
|
|
768
|
+
* 将默认返回的 Form<D, BaseField<D>> 覆盖为本地的 Form<D, Field<D>>。
|
|
769
|
+
*/
|
|
770
|
+
export declare const useForm: {
|
|
771
|
+
<D extends Data = Data, F extends Field<D> = Field<D>>(initFormData?: ExtendWithAny<DeepPartial<D>>, initFields?: F[], root?: boolean): Form<D, F>;
|
|
772
|
+
<D extends Data = Data, F extends Field<D> = Field<D>>(root?: boolean): Form<D, F>;
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
export { useFormData }
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* 类型断言 re-export @qin-ui/core 的 useFormRef,
|
|
779
|
+
* 将 FormInstance 泛型参数绑定为本地 UI 库(antdv-next)的 FormInstance。
|
|
780
|
+
*/
|
|
781
|
+
export declare const useFormRef: {
|
|
782
|
+
(): ReturnType<typeof useFormRef_2<FormInstance>>;
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* 类型断言 re-export @qin-ui/core 的 useTable,
|
|
787
|
+
*/
|
|
788
|
+
export declare const useTable: <D extends Data = Data, T extends object = ExtendWithAny<D>>(params: {
|
|
789
|
+
columns?: Columns<D>;
|
|
790
|
+
dataSource?: T[];
|
|
791
|
+
pageParam?: PageParam;
|
|
792
|
+
searchParam?: ExtendWithAny<DeepPartial<D>>;
|
|
793
|
+
searchFields?: Fields_2<D>;
|
|
794
|
+
}) => Table<D, T>;
|
|
795
|
+
|
|
796
|
+
export declare type ValueFormatter = {
|
|
797
|
+
(val: any, oldVal: any): any;
|
|
798
|
+
} | {
|
|
799
|
+
get?: (val: any) => any;
|
|
800
|
+
set?: (val: any, oldVal: any) => any;
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
export declare type VModelProps<T = any> = {
|
|
804
|
+
value?: T;
|
|
805
|
+
'onUpdate:value'?: (val: T) => void;
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
export declare type WithAdditionalMethodsGetter<T> = T & {
|
|
809
|
+
/**
|
|
810
|
+
* @description 获取FormItem实例的方法
|
|
811
|
+
*/
|
|
812
|
+
getFormItemRef?: () => FormItemInstance;
|
|
813
|
+
/**
|
|
814
|
+
* @description 获取传入FormItem组件的属性
|
|
815
|
+
*/
|
|
816
|
+
getFormItemComputedProps?: () => Readonly<FormItemProps>;
|
|
817
|
+
/**
|
|
818
|
+
* @description 获取组件实例的方法
|
|
819
|
+
*/
|
|
820
|
+
getComponentRef?: () => any;
|
|
821
|
+
/**
|
|
822
|
+
* @description 获取传入Component组件的属性
|
|
823
|
+
*/
|
|
824
|
+
getComponentComputedProps?: () => Readonly<{
|
|
825
|
+
disabled?: boolean;
|
|
826
|
+
[x: string]: any;
|
|
827
|
+
}>;
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
declare type WithCommon<T, D extends Data = Data> = WithRef<T & Omit<FormItemProps, 'label'> & ColProps & Base<D>>;
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* @description 为对象属性添加响应式支持的类型
|
|
834
|
+
* @template T - 原始类型
|
|
835
|
+
*/
|
|
836
|
+
export declare type WithRef<T> = {
|
|
837
|
+
[P in keyof T]: P extends NotSupportedRefOrGetterProps ? T[P] : T[P] extends (...args: any[]) => any ? T[P] : MaybeRefOrComputedRef<T[P]>;
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
export { }
|