@qin-ui/antdv-next-pro 1.0.5 → 1.1.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/README.md +14 -5
- package/es/component-provider/index.js +7 -1
- package/es/form/{index-CMvNb50_.js → index-DmAaZ_i3.js} +33 -32
- package/es/form/index.js +5 -6
- package/es/index.d.ts +207 -114
- package/es/index.js +8 -8
- package/es/table/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -135,19 +135,28 @@ const form = useForm<FormData>({}, [
|
|
|
135
135
|
|
|
136
136
|
#### 注册可复用自定义组件
|
|
137
137
|
|
|
138
|
-
```
|
|
139
|
-
|
|
138
|
+
```vue
|
|
139
|
+
<script setup lang="ts">
|
|
140
|
+
import { ProComponentProvider } from '@qin-ui/antdv-next-pro';
|
|
140
141
|
import MyRateComponent from './MyRate.vue';
|
|
141
142
|
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
const componentMap = {
|
|
144
|
+
'my-rate': MyRateComponent,
|
|
145
|
+
};
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<template>
|
|
149
|
+
<ProComponentProvider :component-map="componentMap">
|
|
150
|
+
<RouterView />
|
|
151
|
+
</ProComponentProvider>
|
|
152
|
+
</template>
|
|
144
153
|
```
|
|
145
154
|
|
|
146
155
|
配合 TypeScript 模块扩充获得完整类型提示:
|
|
147
156
|
|
|
148
157
|
```ts
|
|
149
158
|
declare module '@qin-ui/antdv-next-pro' {
|
|
150
|
-
interface
|
|
159
|
+
interface ComponentMap {
|
|
151
160
|
'my-rate': typeof MyRateComponent;
|
|
152
161
|
}
|
|
153
162
|
}
|
|
@@ -137,13 +137,15 @@ const INJECT_CONFIG = {
|
|
|
137
137
|
default: {}
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
+
const INJECT_COMPONENTS = Symbol("INJECT_COMPONENTS");
|
|
140
141
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
141
142
|
...{
|
|
142
143
|
inheritAttrs: false
|
|
143
144
|
},
|
|
144
145
|
__name: "index",
|
|
145
146
|
props: {
|
|
146
|
-
componentVars: {}
|
|
147
|
+
componentVars: {},
|
|
148
|
+
componentMap: {}
|
|
147
149
|
},
|
|
148
150
|
setup(__props) {
|
|
149
151
|
const props = __props;
|
|
@@ -154,12 +156,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
154
156
|
provide(config.injectionKey, { ...config.default, ...getObject(val) });
|
|
155
157
|
});
|
|
156
158
|
}
|
|
159
|
+
if (props.componentMap) {
|
|
160
|
+
provide(INJECT_COMPONENTS, props.componentMap);
|
|
161
|
+
}
|
|
157
162
|
return (_ctx, _cache) => {
|
|
158
163
|
return renderSlot(_ctx.$slots, "default");
|
|
159
164
|
};
|
|
160
165
|
}
|
|
161
166
|
});
|
|
162
167
|
export {
|
|
168
|
+
INJECT_COMPONENTS,
|
|
163
169
|
INJECT_CONFIG,
|
|
164
170
|
_sfc_main as default
|
|
165
171
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, provide, computed, inject, useSlots, watchEffect, createBlock, openBlock, unref, mergeProps, withCtx, createVNode, renderSlot, toValue, normalizeProps, guardReactiveProps, resolveComponent, createElementBlock, Fragment, renderList, createSlots, ref, useAttrs, createCommentVNode, resolveDynamicComponent, isVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { FormItem, Col, Table, Form,
|
|
2
|
+
import { FormItem, Col, Table, Form, Transfer, TreeSelect, Slider, Switch, RadioGroup, CheckboxGroup, TimeRangePicker, TimePicker, DateRangePicker, DatePicker, Cascader, Select, AutoComplete, InputOTP, InputNumber, InputPassword, InputSearch, TextArea, Input, Row } from "antdv-next";
|
|
3
3
|
import { useDisabledContextProvider, useDisabledContext } from "antdv-next/dist/config-provider/DisabledContext";
|
|
4
|
-
import { INJECT_CONFIG } from "../component-provider/index.js";
|
|
4
|
+
import { INJECT_CONFIG, INJECT_COMPONENTS } from "../component-provider/index.js";
|
|
5
5
|
import { I as InjectionFormKey, c as camelizeProperties, a as InjectionPathKey, g as getObject, u as useForm$1, b as useFields$1, d as useFormRef$1 } from "../core/index-BrBzu6aj.js";
|
|
6
6
|
import { i as isPlainObject, t as toPath, o as omit, c as cloneDeep } from "../vendor/utils/lodash-es-p6jau26B.js";
|
|
7
7
|
const tableProps = () => Table.props || {};
|
|
@@ -51,29 +51,26 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
const FORM_ITEM_SLOT_KEYS = ["label", "extra", "help", "tooltip"];
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
]);
|
|
75
|
-
const registerComponent = (name, component) => {
|
|
76
|
-
COMPONENT_MAP.set(name, component);
|
|
54
|
+
const componentMap = {
|
|
55
|
+
"input": Input,
|
|
56
|
+
"textarea": TextArea,
|
|
57
|
+
"input-search": InputSearch,
|
|
58
|
+
"input-password": InputPassword,
|
|
59
|
+
"input-number": InputNumber,
|
|
60
|
+
"input-otp": InputOTP,
|
|
61
|
+
"auto-complete": AutoComplete,
|
|
62
|
+
"select": Select,
|
|
63
|
+
"cascader": Cascader,
|
|
64
|
+
"date-picker": DatePicker,
|
|
65
|
+
"range-picker": DateRangePicker,
|
|
66
|
+
"time-picker": TimePicker,
|
|
67
|
+
"time-range-picker": TimeRangePicker,
|
|
68
|
+
"checkbox-group": CheckboxGroup,
|
|
69
|
+
"radio-group": RadioGroup,
|
|
70
|
+
"switch": Switch,
|
|
71
|
+
"slider": Slider,
|
|
72
|
+
"tree-select": TreeSelect,
|
|
73
|
+
"transfer": Transfer
|
|
77
74
|
};
|
|
78
75
|
const TeleportComponentNamePrefix = "TeleportComponent_";
|
|
79
76
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
@@ -288,7 +285,7 @@ const useForm = useForm$1;
|
|
|
288
285
|
const getInitProps = (field) => {
|
|
289
286
|
const { component } = field;
|
|
290
287
|
const picker = component === "date-picker" ? "" : field.picker;
|
|
291
|
-
if (
|
|
288
|
+
if (typeof component === "string" && componentMap[component]) {
|
|
292
289
|
const k = [component, picker].filter(Boolean).join(".");
|
|
293
290
|
if (INJECT_CONFIG[k]) {
|
|
294
291
|
const config = INJECT_CONFIG[k];
|
|
@@ -368,8 +365,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
368
365
|
`${TeleportComponentNamePrefix}${__props.path}`,
|
|
369
366
|
void 0
|
|
370
367
|
);
|
|
368
|
+
const customComponents = inject(INJECT_COMPONENTS, {});
|
|
371
369
|
const is = computed(() => {
|
|
372
|
-
|
|
370
|
+
if (teleportComponent) return teleportComponent;
|
|
371
|
+
if (typeof __props.component === "string") {
|
|
372
|
+
return customComponents[__props.component] || componentMap[__props.component] || __props.component;
|
|
373
|
+
}
|
|
374
|
+
return __props.component;
|
|
373
375
|
});
|
|
374
376
|
__expose({
|
|
375
377
|
getComponentRef: () => componentRef.value,
|
|
@@ -437,7 +439,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
437
439
|
const useFields = useFields$1;
|
|
438
440
|
const useFormRef = useFormRef$1;
|
|
439
441
|
export {
|
|
440
|
-
COMPONENT_MAP as C,
|
|
441
442
|
FORM_ITEM_SLOT_KEYS as F,
|
|
442
443
|
TeleportComponentNamePrefix as T,
|
|
443
444
|
_sfc_main$6 as _,
|
|
@@ -445,10 +446,10 @@ export {
|
|
|
445
446
|
_sfc_main$3 as b,
|
|
446
447
|
_sfc_main$2 as c,
|
|
447
448
|
_sfc_main as d,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
449
|
+
componentMap as e,
|
|
450
|
+
useFields as f,
|
|
451
|
+
useFormRef as g,
|
|
452
|
+
getInitProps as h,
|
|
452
453
|
tableProps as t,
|
|
453
454
|
useForm as u
|
|
454
455
|
};
|
package/es/form/index.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { c, _, b,
|
|
1
|
+
import { c, _, b, a, F, d, T, e, _ as _2, h, f, u, g } from "./index-DmAaZ_i3.js";
|
|
2
2
|
import { I, a as a2, e as e2 } from "../core/index-BrBzu6aj.js";
|
|
3
3
|
export {
|
|
4
4
|
c as BaseField,
|
|
5
5
|
_ as BaseForm,
|
|
6
6
|
b as BaseFormItem,
|
|
7
|
-
C as COMPONENT_MAP,
|
|
8
7
|
a as ContainerFragment,
|
|
9
8
|
F as FORM_ITEM_SLOT_KEYS,
|
|
10
9
|
I as InjectionFormKey,
|
|
11
10
|
a2 as InjectionPathKey,
|
|
12
11
|
d as SlotComponent,
|
|
13
12
|
T as TeleportComponentNamePrefix,
|
|
13
|
+
e as componentMap,
|
|
14
14
|
_2 as default,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
e as useFields,
|
|
15
|
+
h as getInitProps,
|
|
16
|
+
f as useFields,
|
|
18
17
|
u as useForm,
|
|
19
18
|
e2 as useFormData,
|
|
20
|
-
|
|
19
|
+
g as useFormRef
|
|
21
20
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -17,16 +17,11 @@ import { ComponentSlots } from 'vue-component-type-helpers';
|
|
|
17
17
|
import { ComputedRef } from 'vue';
|
|
18
18
|
import { CreateComponentPublicInstanceWithMixins } from 'vue';
|
|
19
19
|
import { CSSProperties } from 'vue';
|
|
20
|
-
import { Data } from '@qin-ui/core';
|
|
21
20
|
import { DatePicker } from 'antdv-next';
|
|
22
21
|
import { DateRangePicker } from 'antdv-next';
|
|
23
|
-
import { DeepPartial } from '@qin-ui/core';
|
|
24
22
|
import { DefineComponent } from 'vue';
|
|
25
|
-
import { ExtendWithAny } from '@qin-ui/core';
|
|
26
23
|
import { FeedbackIcons } from 'antdv-next/dist/form/FormItem/index';
|
|
27
|
-
import { Fields as Fields_2 } from '@qin-ui/core';
|
|
28
24
|
import { FilterDropdownProps } from 'antdv-next/dist/table/interface';
|
|
29
|
-
import { Form as Form_2 } from '@qin-ui/core';
|
|
30
25
|
import { FormClassNamesType } from 'antdv-next/dist/form/Form';
|
|
31
26
|
import { FormEmits } from 'antdv-next';
|
|
32
27
|
import { FormInstance } from 'antdv-next';
|
|
@@ -40,23 +35,19 @@ import { FormTooltipProps } from 'antdv-next/dist/form/FormItemLabel';
|
|
|
40
35
|
import { GlobalComponents } from 'vue';
|
|
41
36
|
import { GlobalDirectives } from 'vue';
|
|
42
37
|
import { HTMLAttributes } from 'vue';
|
|
43
|
-
import { InjectionFormKey } from '@qin-ui/core';
|
|
44
38
|
import { InjectionKey } from 'vue';
|
|
45
|
-
import { InjectionPathKey } from '@qin-ui/core';
|
|
46
39
|
import { Input } from 'antdv-next';
|
|
47
40
|
import { InputNumber } from 'antdv-next';
|
|
48
41
|
import { InputOTP } from 'antdv-next';
|
|
49
42
|
import { InputPassword } from 'antdv-next';
|
|
50
43
|
import { InputSearch } from 'antdv-next';
|
|
51
|
-
import { KeyExpandString } from '@qin-ui/core';
|
|
52
44
|
import { MaybeRef } from 'vue';
|
|
53
|
-
import { PageParam } from '@qin-ui/core';
|
|
54
|
-
import { Path } from '@qin-ui/core';
|
|
55
|
-
import { Paths } from '@qin-ui/core';
|
|
56
45
|
import { Plugin as Plugin_2 } from 'vue';
|
|
57
46
|
import { PublicProps } from 'vue';
|
|
58
47
|
import { RadioGroup } from 'antdv-next';
|
|
59
48
|
import { Raw } from 'vue';
|
|
49
|
+
import { Reactive } from 'vue';
|
|
50
|
+
import { Ref } from 'vue';
|
|
60
51
|
import { RequiredMark } from 'antdv-next/dist/form/Form';
|
|
61
52
|
import { RowProps } from 'antdv-next';
|
|
62
53
|
import { Rule } from 'antdv-next/dist/form/types';
|
|
@@ -66,7 +57,6 @@ import { ShallowUnwrapRef } from 'vue';
|
|
|
66
57
|
import { Slider } from 'antdv-next';
|
|
67
58
|
import { Slot } from 'vue';
|
|
68
59
|
import { Switch } from 'antdv-next';
|
|
69
|
-
import { Table as Table_2 } from '@qin-ui/core';
|
|
70
60
|
import { TableColumnType } from 'antdv-next';
|
|
71
61
|
import { TableProps } from 'antdv-next';
|
|
72
62
|
import { TextArea } from 'antdv-next';
|
|
@@ -74,9 +64,6 @@ import { TimePicker } from 'antdv-next';
|
|
|
74
64
|
import { TimeRangePicker } from 'antdv-next';
|
|
75
65
|
import { Transfer } from 'antdv-next';
|
|
76
66
|
import { TreeSelect } from 'antdv-next';
|
|
77
|
-
import { useFields as useFields_2 } from '@qin-ui/core';
|
|
78
|
-
import { useFormData } from '@qin-ui/core';
|
|
79
|
-
import { useFormRef as useFormRef_2 } from '@qin-ui/core';
|
|
80
67
|
import { ValidateMessages } from 'antdv-next/dist/form/types';
|
|
81
68
|
import { Variant } from 'antdv-next/dist/config-provider/context';
|
|
82
69
|
import { VNode } from 'vue';
|
|
@@ -110,6 +97,10 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
110
97
|
};
|
|
111
98
|
};
|
|
112
99
|
|
|
100
|
+
declare type AllowStringKey<T, Prefix extends string = ''> = {
|
|
101
|
+
[K in keyof T]: K extends string ? T[K] extends (infer U)[] ? `${Prefix}${K}` | (IsRecord<U> extends true ? AllowStringKey<U, `${Prefix}${K}[index].`> : never) : IsRecord<T[K]> extends true ? `${Prefix}${K}` | AllowStringKey<T[K], `${Prefix}${K}.`> : `${Prefix}${K}` : never;
|
|
102
|
+
}[keyof T];
|
|
103
|
+
|
|
113
104
|
/**
|
|
114
105
|
* @type {Object} Base - 基础公共字段类型
|
|
115
106
|
*/
|
|
@@ -201,10 +192,34 @@ export declare interface Base<D extends Data = Data> {
|
|
|
201
192
|
modelProp?: string;
|
|
202
193
|
}
|
|
203
194
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
195
|
+
declare interface BaseColumn<D extends Data = Data> {
|
|
196
|
+
key?: Path<D>;
|
|
197
|
+
dataIndex?: Path<D> | Path<D>[];
|
|
198
|
+
children?: BaseColumn<D>[];
|
|
199
|
+
[key: string]: any;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export declare type BaseComponentMap = {
|
|
203
|
+
'input': typeof Input;
|
|
204
|
+
'textarea': typeof TextArea;
|
|
205
|
+
'input-search': typeof InputSearch;
|
|
206
|
+
'input-password': typeof InputPassword;
|
|
207
|
+
'input-number': typeof InputNumber;
|
|
208
|
+
'input-otp': typeof InputOTP;
|
|
209
|
+
'auto-complete': typeof AutoComplete;
|
|
210
|
+
'select': typeof Select;
|
|
211
|
+
'cascader': typeof Cascader;
|
|
212
|
+
'date-picker': typeof DatePicker;
|
|
213
|
+
'range-picker': typeof DateRangePicker;
|
|
214
|
+
'time-picker': typeof TimePicker;
|
|
215
|
+
'time-range-picker': typeof TimeRangePicker;
|
|
216
|
+
'checkbox-group': typeof CheckboxGroup;
|
|
217
|
+
'radio-group': typeof RadioGroup;
|
|
218
|
+
'switch': typeof Switch;
|
|
219
|
+
'slider': typeof Slider;
|
|
220
|
+
'tree-select': typeof TreeSelect;
|
|
221
|
+
'transfer': typeof Transfer;
|
|
222
|
+
};
|
|
208
223
|
|
|
209
224
|
export declare const BaseField: DefineComponent<Props, {
|
|
210
225
|
getComponentRef: () => any;
|
|
@@ -213,6 +228,13 @@ getComponentComputedProps: () => any;
|
|
|
213
228
|
componentRef: unknown;
|
|
214
229
|
}, any>;
|
|
215
230
|
|
|
231
|
+
declare interface BaseField_2<D extends Data = Data> {
|
|
232
|
+
path?: Path<D> | any;
|
|
233
|
+
name?: any;
|
|
234
|
+
fields?: any[];
|
|
235
|
+
[key: string]: any;
|
|
236
|
+
}
|
|
237
|
+
|
|
216
238
|
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<{
|
|
217
239
|
props: __VLS_PrettifyLocal_2<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ({
|
|
218
240
|
grid?: Grid;
|
|
@@ -252,33 +274,45 @@ export declare type Column<D extends Data = Data> = Omit<TableColumnType, 'dataI
|
|
|
252
274
|
hidden?: boolean;
|
|
253
275
|
};
|
|
254
276
|
|
|
255
|
-
|
|
277
|
+
declare type ColumnFindBy<D extends Data, C extends BaseColumn<D> = BaseColumn<D>> = (column: Readonly<C>) => boolean;
|
|
256
278
|
|
|
257
|
-
export declare
|
|
279
|
+
export declare type Columns<D extends Data = Data> = Array<Column<D>>;
|
|
258
280
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* @description 容器组件类型
|
|
263
|
-
*/
|
|
264
|
-
export declare type ContainerComponent = Component<PathProps>;
|
|
265
|
-
|
|
266
|
-
export declare const ContainerFragment: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
281
|
+
declare type Columns_2<D extends Data = Data, C extends BaseColumn<D> = BaseColumn<D>> = Array<C>;
|
|
267
282
|
|
|
268
283
|
/**
|
|
269
284
|
* @description 暴露给外部扩充自定义组件类型的接口
|
|
270
285
|
* @example
|
|
271
286
|
* ```ts
|
|
272
287
|
* declare module 'antdv-next-pro' {
|
|
273
|
-
* interface
|
|
288
|
+
* interface ComponentMap {
|
|
274
289
|
* 'my-custom-input': typeof MyCustomInput;
|
|
275
290
|
* }
|
|
276
291
|
* }
|
|
277
292
|
* ```
|
|
278
293
|
*/
|
|
279
|
-
export declare interface
|
|
294
|
+
export declare interface ComponentMap {
|
|
280
295
|
}
|
|
281
296
|
|
|
297
|
+
export declare const componentMap: BaseComponentMap;
|
|
298
|
+
|
|
299
|
+
export declare type ComponentName = keyof BaseComponentMap | keyof ComponentMap;
|
|
300
|
+
|
|
301
|
+
export declare type ComponentVars = Partial<RequiredComponentVars>;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @description 容器组件类型
|
|
305
|
+
*/
|
|
306
|
+
export declare type ContainerComponent = Component<PathProps>;
|
|
307
|
+
|
|
308
|
+
export declare const ContainerFragment: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
309
|
+
|
|
310
|
+
declare type Data = Record<string, any>;
|
|
311
|
+
|
|
312
|
+
declare type DeepPartial<T> = T extends object ? {
|
|
313
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
314
|
+
} : T;
|
|
315
|
+
|
|
282
316
|
declare const _default: {
|
|
283
317
|
install(app: App): void;
|
|
284
318
|
};
|
|
@@ -401,15 +435,21 @@ declare type ExpandButtonProps = ButtonProps & {
|
|
|
401
435
|
expandStatus: boolean;
|
|
402
436
|
};
|
|
403
437
|
|
|
438
|
+
declare type ExtendWithAny<D> = {
|
|
439
|
+
[K in keyof D]: IsRecord<D[K]> extends true ? ExtendWithAny<D[K]> : D[K];
|
|
440
|
+
} & Record<string, any>;
|
|
441
|
+
|
|
404
442
|
/**
|
|
405
443
|
* @description 字段配置类型,包含所有字段属性和响应式支持
|
|
406
444
|
* @template D - 数据对象类型
|
|
407
445
|
*/
|
|
408
|
-
export declare type Field<D extends Data = Data> = {
|
|
446
|
+
export declare type Field<D extends Data = Data> = WithAdditionalMethodsGetter<{
|
|
409
447
|
[K in keyof FieldTypeMap]: {
|
|
410
448
|
component?: K extends 'custom' ? FieldTypeMap<D>[K]['component'] : K;
|
|
411
449
|
} & FieldTypeMap<D>[K];
|
|
412
|
-
}[keyof FieldTypeMap]
|
|
450
|
+
}[keyof FieldTypeMap]>;
|
|
451
|
+
|
|
452
|
+
declare type FieldFindBy<D extends Data, F extends BaseField_2<D> = BaseField_2<D>> = (field: Readonly<F>) => boolean;
|
|
413
453
|
|
|
414
454
|
/**
|
|
415
455
|
* @description 字段数组类型
|
|
@@ -417,55 +457,20 @@ export declare type Field<D extends Data = Data> = {
|
|
|
417
457
|
*/
|
|
418
458
|
export declare type Fields<D extends Data = Data> = Array<Field<D>>;
|
|
419
459
|
|
|
460
|
+
declare type Fields_2<D extends Data = Data, F extends BaseField_2<D> = BaseField_2<D>> = F[];
|
|
461
|
+
|
|
420
462
|
/**
|
|
421
463
|
* @type {FieldTypeMap} 字段类型集合
|
|
422
464
|
*/
|
|
423
465
|
export declare type FieldTypeMap<D extends Data = Data> = {
|
|
424
|
-
/** 文本框 */
|
|
425
|
-
'input': WithComponent<typeof Input, D>;
|
|
426
|
-
/** 文本域 */
|
|
427
|
-
'textarea': WithComponent<typeof TextArea, D>;
|
|
428
|
-
/** 文本框-密码 */
|
|
429
|
-
'input-password': WithComponent<typeof InputPassword, D>;
|
|
430
|
-
'input-otp': WithComponent<typeof InputOTP, D>;
|
|
431
|
-
/** 文本框-搜索 */
|
|
432
|
-
'input-search': WithComponent<typeof InputSearch, D>;
|
|
433
|
-
/** 数字文本框 */
|
|
434
|
-
'input-number': WithComponent<typeof InputNumber, D>;
|
|
435
|
-
/** 下拉选择器 */
|
|
436
|
-
'select': WithComponent<typeof Select, D>;
|
|
437
|
-
/** 自动完成 */
|
|
438
|
-
'auto-complete': WithComponent<typeof AutoComplete, D>;
|
|
439
|
-
/** 级联选择器 */
|
|
440
|
-
'cascader': WithComponent<typeof Cascader, D>;
|
|
441
|
-
/** 日期选择器 */
|
|
442
|
-
'date-picker': WithComponent<typeof DatePicker, D>;
|
|
443
|
-
/** 日期选择器-范围 */
|
|
444
|
-
'range-picker': WithComponent<typeof DateRangePicker, D>;
|
|
445
|
-
/** 时间选择器 */
|
|
446
|
-
'time-picker': WithComponent<typeof TimePicker, D>;
|
|
447
|
-
/** 时间范围选择器 */
|
|
448
|
-
'time-range-picker': WithComponent<typeof TimeRangePicker, D>;
|
|
449
|
-
/** 复选框组 */
|
|
450
|
-
'checkbox-group': WithComponent<typeof CheckboxGroup, D>;
|
|
451
|
-
/** 单选框组 */
|
|
452
|
-
'radio-group': WithComponent<typeof RadioGroup, D>;
|
|
453
|
-
/** 开关 */
|
|
454
|
-
'switch': WithComponent<typeof Switch, D>;
|
|
455
|
-
/** 滑块 */
|
|
456
|
-
'slider': WithComponent<typeof Slider, D>;
|
|
457
|
-
/** 树形选择器 */
|
|
458
|
-
'tree-select': WithComponent<typeof TreeSelect, D>;
|
|
459
|
-
/** 穿梭框 */
|
|
460
|
-
'transfer': WithComponent<typeof Transfer, D>;
|
|
461
466
|
/** 自定义组件 */
|
|
462
|
-
|
|
467
|
+
custom: {
|
|
463
468
|
component?: RenderComponentType | Raw<RenderComponentType>;
|
|
464
469
|
} & WithCommon<{
|
|
465
470
|
slots?: Slots;
|
|
466
471
|
} & Record<string, any>, D>;
|
|
467
472
|
} & {
|
|
468
|
-
[K in
|
|
473
|
+
[K in ComponentName]: WithComponent<GetComponentType<K>, D>;
|
|
469
474
|
};
|
|
470
475
|
|
|
471
476
|
/**
|
|
@@ -476,6 +481,8 @@ export declare type FieldTypeMap<D extends Data = Data> = {
|
|
|
476
481
|
*/
|
|
477
482
|
export declare type Form<D extends Data = Data, F extends Field<D> = Field<D>> = Form_2<D, F, FormInstance>;
|
|
478
483
|
|
|
484
|
+
declare type Form_2<D extends Data = Data, F extends BaseField_2<D> = BaseField_2<D>, I = any> = ReturnType<typeof useFormData<D>> & ReturnType<typeof useFields_2<D, F>> & ReturnType<typeof useFormRef_2<I>>;
|
|
485
|
+
|
|
479
486
|
export declare const FORM_ITEM_SLOT_KEYS: readonly ["label", "extra", "help", "tooltip"];
|
|
480
487
|
|
|
481
488
|
export { FormInstance }
|
|
@@ -486,10 +493,14 @@ declare type _FormProps = Pick<Partial<FormProps>, 'colon' | 'disabled' | 'label
|
|
|
486
493
|
|
|
487
494
|
declare type FP<T extends Record<string, any>> = Partial<T & Pick<Base, 'valueFormatter' | 'componentContainer' | 'modelProp' | 'componentClass' | 'componentStyle'> & AllowedComponentProps>;
|
|
488
495
|
|
|
496
|
+
export declare type GetComponentType<K extends ComponentName> = K extends keyof ComponentMap ? ComponentMap[K] : K extends keyof BaseComponentMap ? BaseComponentMap[K] : never;
|
|
497
|
+
|
|
489
498
|
export declare const getInitProps: (field: Field) => Record<string, any>;
|
|
490
499
|
|
|
491
500
|
export declare type Grid = boolean | (RowProps & {});
|
|
492
501
|
|
|
502
|
+
export declare const INJECT_COMPONENTS: InjectionKey<Partial<Record<string, Component>>>;
|
|
503
|
+
|
|
493
504
|
export declare const INJECT_CONFIG: {
|
|
494
505
|
[key in keyof RequiredComponentVars]: {
|
|
495
506
|
injectionKey: InjectionKey<RequiredComponentVars[key]>;
|
|
@@ -497,9 +508,20 @@ export declare const INJECT_CONFIG: {
|
|
|
497
508
|
};
|
|
498
509
|
};
|
|
499
510
|
|
|
500
|
-
export
|
|
511
|
+
export declare const InjectionFormKey: InjectionKey<any>;
|
|
512
|
+
|
|
513
|
+
export declare const InjectionPathKey: InjectionKey<ComputedRef<string | undefined>>;
|
|
514
|
+
|
|
515
|
+
declare type IsRecord<T> = T extends object ? T extends ((...args: any[]) => any) | any[] | null ? false : true : false;
|
|
501
516
|
|
|
502
|
-
|
|
517
|
+
declare type JoinPath<Prefix extends any[], Key extends PropertyKey> = [
|
|
518
|
+
...Prefix,
|
|
519
|
+
KeyExpandString<Extract<Key, string>>
|
|
520
|
+
];
|
|
521
|
+
|
|
522
|
+
declare type KeyExpandString<T extends string> = T | (string & {});
|
|
523
|
+
|
|
524
|
+
declare type KeyPathString<D extends Data> = KeyExpandString<AllowStringKey<D>>;
|
|
503
525
|
|
|
504
526
|
declare type MaybeRefOrComputedRef<T = any> = MaybeRef<T> | ComputedRef<T>;
|
|
505
527
|
|
|
@@ -517,15 +539,29 @@ export { Option_2 as Option }
|
|
|
517
539
|
|
|
518
540
|
export declare type Options = Array<Option_2>;
|
|
519
541
|
|
|
542
|
+
declare interface PageParam {
|
|
543
|
+
current: number;
|
|
544
|
+
pageSize: number;
|
|
545
|
+
total: number;
|
|
546
|
+
[key: string]: any;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
declare type Path<D extends Data = Data> = KeyPathString<D>;
|
|
550
|
+
|
|
520
551
|
export declare type PathProps = {
|
|
521
552
|
path?: string;
|
|
522
553
|
} & Data;
|
|
523
554
|
|
|
555
|
+
declare type Paths<T, Prefix extends any[] = []> = T extends object ? {
|
|
556
|
+
[K in keyof T]: IsRecord<T[K]> extends true ? JoinPath<Prefix, K> | Paths<T[K], JoinPath<Prefix, K>> : JoinPath<Prefix, K>;
|
|
557
|
+
}[keyof T] : never;
|
|
558
|
+
|
|
524
559
|
declare type PP<T extends Record<string, any>> = Partial<T & AllowedComponentProps>;
|
|
525
560
|
|
|
526
561
|
export declare const ProComponentProvider: SFCWithInstall<{
|
|
527
562
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
528
|
-
componentVars
|
|
563
|
+
componentVars?: ComponentVars;
|
|
564
|
+
componentMap?: Partial<Record<KeyExpandString<ComponentName>, Component>>;
|
|
529
565
|
}> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
530
566
|
P: {};
|
|
531
567
|
B: {};
|
|
@@ -534,13 +570,15 @@ export declare const ProComponentProvider: SFCWithInstall<{
|
|
|
534
570
|
M: {};
|
|
535
571
|
Defaults: {};
|
|
536
572
|
}, Readonly<{
|
|
537
|
-
componentVars
|
|
573
|
+
componentVars?: ComponentVars;
|
|
574
|
+
componentMap?: Partial<Record<KeyExpandString<ComponentName>, Component>>;
|
|
538
575
|
}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
539
576
|
__isFragment?: never;
|
|
540
577
|
__isTeleport?: never;
|
|
541
578
|
__isSuspense?: never;
|
|
542
579
|
} & ComponentOptionsBase<Readonly<{
|
|
543
|
-
componentVars
|
|
580
|
+
componentVars?: ComponentVars;
|
|
581
|
+
componentMap?: Partial<Record<KeyExpandString<ComponentName>, Component>>;
|
|
544
582
|
}> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
545
583
|
$slots: {
|
|
546
584
|
default?(_: {}): any;
|
|
@@ -657,13 +695,6 @@ export declare type ProTableInstance = ComponentExposed<typeof _default_2>;
|
|
|
657
695
|
|
|
658
696
|
export declare type ProTableProps = ComponentProps<typeof _default_2>;
|
|
659
697
|
|
|
660
|
-
/**
|
|
661
|
-
* 注册自定义组件
|
|
662
|
-
* @param name 组件名称标识
|
|
663
|
-
* @param component Vue组件
|
|
664
|
-
*/
|
|
665
|
-
export declare const registerComponent: (name: string, component: Component) => void;
|
|
666
|
-
|
|
667
698
|
/**
|
|
668
699
|
* @description 自定义组件
|
|
669
700
|
* @example (p, ctx) => h('div', ctx.attrs)
|
|
@@ -676,30 +707,13 @@ export declare type RequiredComponentVars = {
|
|
|
676
707
|
grid: Exclude<Grid, undefined | boolean>;
|
|
677
708
|
}>;
|
|
678
709
|
'pro-form-item': PP<FormItemProps & Pick<ColProps, 'span' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'> & Pick<Base, 'formItemContainer'>>;
|
|
679
|
-
'
|
|
680
|
-
'
|
|
681
|
-
'
|
|
682
|
-
'
|
|
683
|
-
'
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
'select': FP<ComponentProps<typeof Select>>;
|
|
687
|
-
'cascader': FP<ComponentProps<typeof Cascader>>;
|
|
688
|
-
'date-picker': FP<ComponentProps<typeof DatePicker>>;
|
|
689
|
-
'date-picker.date': FP<ComponentProps<typeof DatePicker>>;
|
|
690
|
-
'date-picker.week': FP<ComponentProps<typeof DatePicker>>;
|
|
691
|
-
'date-picker.month': FP<ComponentProps<typeof DatePicker>>;
|
|
692
|
-
'date-picker.year': FP<ComponentProps<typeof DatePicker>>;
|
|
693
|
-
'date-picker.quarter': FP<ComponentProps<typeof DatePicker>>;
|
|
694
|
-
'range-picker': FP<ComponentProps<typeof DateRangePicker>>;
|
|
695
|
-
'time-picker': FP<ComponentProps<typeof TimePicker>>;
|
|
696
|
-
'time-range-picker': FP<ComponentProps<typeof TimeRangePicker>>;
|
|
697
|
-
'checkbox-group': FP<ComponentProps<typeof CheckboxGroup>>;
|
|
698
|
-
'radio-group': FP<ComponentProps<typeof RadioGroup>>;
|
|
699
|
-
'switch': FP<ComponentProps<typeof Switch>>;
|
|
700
|
-
'slider': FP<ComponentProps<typeof Slider>>;
|
|
701
|
-
'tree-select': FP<ComponentProps<typeof TreeSelect>>;
|
|
702
|
-
'transfer': FP<ComponentProps<typeof Transfer>>;
|
|
710
|
+
'date-picker.date': FP<ComponentProps<GetComponentType<'date-picker'>>>;
|
|
711
|
+
'date-picker.week': FP<ComponentProps<GetComponentType<'date-picker'>>>;
|
|
712
|
+
'date-picker.month': FP<ComponentProps<GetComponentType<'date-picker'>>>;
|
|
713
|
+
'date-picker.year': FP<ComponentProps<GetComponentType<'date-picker'>>>;
|
|
714
|
+
'date-picker.quarter': FP<ComponentProps<GetComponentType<'date-picker'>>>;
|
|
715
|
+
} & {
|
|
716
|
+
[K in ComponentName]: FP<ComponentProps<GetComponentType<K>>>;
|
|
703
717
|
};
|
|
704
718
|
|
|
705
719
|
declare type SearchFormProps = {
|
|
@@ -711,6 +725,12 @@ declare type SearchFormProps = {
|
|
|
711
725
|
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps>;
|
|
712
726
|
} & /* @vue-ignore */ _FormProps & AllowedComponentProps;
|
|
713
727
|
|
|
728
|
+
declare type SetColumn<D extends Data = Data, C extends BaseColumn<D> = BaseColumn<D>> = (key: Path<D>, column: C | ((pre: Readonly<C>) => C), options?: {
|
|
729
|
+
updateType?: 'rewrite' | 'merge';
|
|
730
|
+
} & UpdateColumnOptions) => void;
|
|
731
|
+
|
|
732
|
+
declare type SetPageParam = (pageParam: Partial<PageParam> | ((pre: Readonly<PageParam>) => Partial<PageParam>)) => void;
|
|
733
|
+
|
|
714
734
|
declare type SFCWithInstall<T> = T & Plugin_2;
|
|
715
735
|
|
|
716
736
|
export declare const SlotComponent: DefineComponent<Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_3> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
@@ -732,10 +752,31 @@ export declare type Slots = {
|
|
|
732
752
|
*/
|
|
733
753
|
export declare type Table<D extends Data = Data, T extends object = ExtendWithAny<D>> = Table_2<D, T, Column<D>>;
|
|
734
754
|
|
|
755
|
+
declare type Table_2<D extends Data = Data, T extends object = ExtendWithAny<D>, C extends BaseColumn<D> = BaseColumn<D>> = {
|
|
756
|
+
columns: Ref<Columns_2<D, C>>;
|
|
757
|
+
dataSource: Ref<T[]>;
|
|
758
|
+
pageParam: Reactive<PageParam>;
|
|
759
|
+
searchForm: Form_2<D>;
|
|
760
|
+
setColumn: SetColumn<D, C>;
|
|
761
|
+
deleteColumn: (path: Path<D> | ColumnFindBy<D, C>, options?: UpdateColumnOptions) => void;
|
|
762
|
+
appendColumn: (path: Path<D> | ColumnFindBy<D, C> | undefined, column: C | Columns_2<D, C>, options?: UpdateColumnOptions) => void;
|
|
763
|
+
prependColumn: (path: Path<D> | ColumnFindBy<D, C> | undefined, column: C | Columns_2<D, C>, options?: UpdateColumnOptions) => void;
|
|
764
|
+
setPageParam: SetPageParam;
|
|
765
|
+
resetQueryParams: () => void;
|
|
766
|
+
};
|
|
767
|
+
|
|
735
768
|
export declare const TeleportComponentNamePrefix = "TeleportComponent_";
|
|
736
769
|
|
|
737
|
-
|
|
738
|
-
|
|
770
|
+
declare type UpdateColumnOptions = {
|
|
771
|
+
all?: boolean;
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
declare type UpdateFieldOptions = {
|
|
775
|
+
all?: boolean;
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
/** useFields 返回值类型,固定为本地 Fields<D> */
|
|
779
|
+
export declare type UseFields<D extends Data = Data> = ReturnType<typeof useFields<D>>;
|
|
739
780
|
|
|
740
781
|
/**
|
|
741
782
|
* 类型断言 re-export @qin-ui/core 的 useFields,
|
|
@@ -743,7 +784,35 @@ export declare type UseFields<D extends Data = Data, F extends Field<D> = Field<
|
|
|
743
784
|
* 使得 fields、getField 等方法的类型推断包含 UI 库的完整属性签名。
|
|
744
785
|
*/
|
|
745
786
|
export declare const useFields: {
|
|
746
|
-
<D extends Data = Data
|
|
787
|
+
<D extends Data = Data>(initFields?: Fields<D>): ReturnType<typeof useFields_2<D, Field<D>>>;
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
declare const useFields_2: <D extends Data = Data, F extends BaseField_2<D> = BaseField_2<D>>(initFields?: F[]) => {
|
|
791
|
+
fields: Ref<F[], F[]>;
|
|
792
|
+
getField: {
|
|
793
|
+
(path: Path<D> | FieldFindBy<D, F>): Readonly<F> | undefined;
|
|
794
|
+
(path: Path<D> | FieldFindBy<D, F>, options?: {
|
|
795
|
+
all?: false;
|
|
796
|
+
}): Readonly<F> | undefined;
|
|
797
|
+
(path: Path<D> | FieldFindBy<D, F>, options: {
|
|
798
|
+
all: true;
|
|
799
|
+
}): Readonly<F>[] | undefined;
|
|
800
|
+
};
|
|
801
|
+
setField: (path: Path<D> | FieldFindBy<D, F>, field: F | ((preField: Readonly<F>) => F), options?: {
|
|
802
|
+
updateType?: "rewrite" | "merge";
|
|
803
|
+
} & UpdateFieldOptions) => void;
|
|
804
|
+
deleteField: (path: Path<D> | FieldFindBy<D, F>, options?: UpdateFieldOptions) => void;
|
|
805
|
+
appendField: (path: Path<D> | FieldFindBy<D, F> | undefined, field: F | F[], options?: UpdateFieldOptions) => void;
|
|
806
|
+
prependField: (path: Path<D> | FieldFindBy<D, F> | undefined, field: F | F[], options?: UpdateFieldOptions) => void;
|
|
807
|
+
getParentField: {
|
|
808
|
+
(path: Path<D> | FieldFindBy<D, F>): F | undefined;
|
|
809
|
+
(path: Path<D> | FieldFindBy<D, F>, options: {
|
|
810
|
+
all?: false;
|
|
811
|
+
}): F | undefined;
|
|
812
|
+
(path: Path<D> | FieldFindBy<D, F>, options: {
|
|
813
|
+
all: true;
|
|
814
|
+
}): F[] | undefined;
|
|
815
|
+
};
|
|
747
816
|
};
|
|
748
817
|
|
|
749
818
|
/**
|
|
@@ -751,11 +820,30 @@ export declare const useFields: {
|
|
|
751
820
|
* 将默认返回的 Form<D, BaseField<D>> 覆盖为本地的 Form<D, Field<D>>。
|
|
752
821
|
*/
|
|
753
822
|
export declare const useForm: {
|
|
754
|
-
<D extends Data = Data
|
|
755
|
-
<D extends Data = Data
|
|
823
|
+
<D extends Data = Data>(initFormData?: ExtendWithAny<DeepPartial<D>>, initFields?: Field<D>[], root?: boolean): Form<D, Field<D>>;
|
|
824
|
+
<D extends Data = Data>(root?: boolean): Form<D, Field<D>>;
|
|
756
825
|
};
|
|
757
826
|
|
|
758
|
-
|
|
827
|
+
/**
|
|
828
|
+
* 表单数据处理hook
|
|
829
|
+
* @param initFormData 初始表单数据
|
|
830
|
+
* @returns {Object} { formData, getFormData, setFormData }
|
|
831
|
+
*/
|
|
832
|
+
export declare const useFormData: <D extends Data = Data>(initFormData?: ExtendWithAny<DeepPartial<D>>) => {
|
|
833
|
+
formData: Reactive<ExtendWithAny<D>>;
|
|
834
|
+
getFormData: {
|
|
835
|
+
<K extends keyof D>(path: K): D[K];
|
|
836
|
+
<K extends keyof D & string, K1 extends keyof D[K] & string>(path: `${K}.${K1}`): D[K][K1];
|
|
837
|
+
<K extends keyof D & string, K1_1 extends keyof D[K] & string, K2 extends keyof D[K][K1_1] & string>(path: `${K}.${K1_1}.${K2}`): D[K][K1_1][K2];
|
|
838
|
+
(path: Path<D>): any;
|
|
839
|
+
};
|
|
840
|
+
setFormData: {
|
|
841
|
+
(path: Path<D>, value: any): void;
|
|
842
|
+
(path: Path<D>, value: (v: any) => any): void;
|
|
843
|
+
(value: ExtendWithAny<DeepPartial<D>>): void;
|
|
844
|
+
(value: (v: ExtendWithAny<DeepPartial<D>>) => ExtendWithAny<DeepPartial<D>>): void;
|
|
845
|
+
};
|
|
846
|
+
};
|
|
759
847
|
|
|
760
848
|
/**
|
|
761
849
|
* 类型断言 re-export @qin-ui/core 的 useFormRef,
|
|
@@ -765,6 +853,11 @@ export declare const useFormRef: {
|
|
|
765
853
|
(): ReturnType<typeof useFormRef_2<FormInstance>>;
|
|
766
854
|
};
|
|
767
855
|
|
|
856
|
+
declare const useFormRef_2: <F = any>() => {
|
|
857
|
+
formRef: Ref<F | undefined, F | undefined>;
|
|
858
|
+
setFormRef: (inst: F) => void;
|
|
859
|
+
};
|
|
860
|
+
|
|
768
861
|
/**
|
|
769
862
|
* 类型断言 re-export @qin-ui/core 的 useTable,
|
|
770
863
|
*/
|
package/es/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./antdv-next-pro.css";
|
|
2
|
-
import { _ as _sfc_main } from "./form/index-
|
|
3
|
-
import { c, b,
|
|
2
|
+
import { _ as _sfc_main } from "./form/index-DmAaZ_i3.js";
|
|
3
|
+
import { c, b, a, F, d, T, e, h, f, u, g } from "./form/index-DmAaZ_i3.js";
|
|
4
4
|
import { I, a as a2, e as e2 } from "./core/index-BrBzu6aj.js";
|
|
5
5
|
import BaseTable from "./table/index.js";
|
|
6
6
|
import { useTable } from "./table/index.js";
|
|
7
7
|
import _sfc_main$1 from "./component-provider/index.js";
|
|
8
|
-
import { INJECT_CONFIG } from "./component-provider/index.js";
|
|
8
|
+
import { INJECT_COMPONENTS, INJECT_CONFIG } from "./component-provider/index.js";
|
|
9
9
|
const withInstall = (comp) => {
|
|
10
10
|
comp.install = (app) => {
|
|
11
11
|
app.component(comp.name, comp);
|
|
@@ -27,9 +27,9 @@ export {
|
|
|
27
27
|
c as BaseField,
|
|
28
28
|
_sfc_main as BaseForm,
|
|
29
29
|
b as BaseFormItem,
|
|
30
|
-
C as COMPONENT_MAP,
|
|
31
30
|
a as ContainerFragment,
|
|
32
31
|
F as FORM_ITEM_SLOT_KEYS,
|
|
32
|
+
INJECT_COMPONENTS,
|
|
33
33
|
INJECT_CONFIG,
|
|
34
34
|
I as InjectionFormKey,
|
|
35
35
|
a2 as InjectionPathKey,
|
|
@@ -38,12 +38,12 @@ export {
|
|
|
38
38
|
ProTable,
|
|
39
39
|
d as SlotComponent,
|
|
40
40
|
T as TeleportComponentNamePrefix,
|
|
41
|
+
e as componentMap,
|
|
41
42
|
index as default,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
e as useFields,
|
|
43
|
+
h as getInitProps,
|
|
44
|
+
f as useFields,
|
|
45
45
|
u as useForm,
|
|
46
46
|
e2 as useFormData,
|
|
47
|
-
|
|
47
|
+
g as useFormRef,
|
|
48
48
|
useTable
|
|
49
49
|
};
|
package/es/table/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createElementVNode, defineComponent, ref, computed, watch, watchEffect, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, resolveDynamicComponent, createTextVNode, createCommentVNode, Fragment, toDisplayString, normalizeStyle, useModel, h, mergeModels, inject, useAttrs, useSlots, onMounted, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
2
2
|
import { Space, Button, theme, useConfig, Dropdown, Menu, Checkbox, Table } from "antdv-next";
|
|
3
3
|
import "antdv-next/dist/config-provider/DisabledContext";
|
|
4
|
-
import { _ as _sfc_main$9, t as tableProps, a as _sfc_main$a } from "../form/index-
|
|
4
|
+
import { _ as _sfc_main$9, t as tableProps, a as _sfc_main$a } from "../form/index-DmAaZ_i3.js";
|
|
5
5
|
import { INJECT_CONFIG } from "../component-provider/index.js";
|
|
6
6
|
import { g as getObject, c as camelizeProperties, f as useTable$1 } from "../core/index-BrBzu6aj.js";
|
|
7
7
|
import { p as pick } from "../vendor/utils/lodash-es-p6jau26B.js";
|