vft 0.0.184 → 0.0.185
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/app-components/form/types.d.ts +30 -2
- package/es/app-components/row/types.d.ts +10 -0
- package/es/app-components/super-form/component-map.d.ts +2 -1
- package/es/app-components/super-form/types.d.ts +2 -2
- package/es/components/button/use-button.js +3 -3
- package/es/components/index.js +113 -113
- package/es/index.js +113 -113
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/app-components/form/types.d.ts +30 -2
- package/lib/app-components/row/types.d.ts +10 -0
- package/lib/app-components/super-form/component-map.d.ts +2 -1
- package/lib/app-components/super-form/types.d.ts +2 -2
- package/lib/components/button/use-button.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/web-types.json +1 -1
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
import type { Arrayable } from '../types';
|
|
2
2
|
import type { RuleItem, ValidateError, ValidateFieldsError } from 'async-validator';
|
|
3
3
|
import type { SetupContext, UnwrapRef } from 'vue';
|
|
4
|
-
import { type FormProps } from './form.vue';
|
|
5
|
-
import { type FormItemProps } from './form-item.vue';
|
|
6
4
|
import type { useFormLabelWidth } from './utils';
|
|
5
|
+
export interface FormItemProps {
|
|
6
|
+
label?: string;
|
|
7
|
+
labelWidth?: string | number;
|
|
8
|
+
prop?: string | string[];
|
|
9
|
+
required?: boolean;
|
|
10
|
+
rules?: FormItemRule;
|
|
11
|
+
error?: string;
|
|
12
|
+
for?: string;
|
|
13
|
+
validateStatus?: '' | 'error' | 'validating' | 'success';
|
|
14
|
+
inlineMessage?: string | boolean;
|
|
15
|
+
showMessage?: boolean;
|
|
16
|
+
size?: ComponentSize;
|
|
17
|
+
}
|
|
18
|
+
export interface FormProps {
|
|
19
|
+
size?: ComponentSize;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
model?: Record<string, any>;
|
|
22
|
+
rules?: FormRules;
|
|
23
|
+
labelPosition?: 'left' | 'right' | 'top';
|
|
24
|
+
requireAsteriskPosition?: 'left' | 'right';
|
|
25
|
+
labelWidth?: string | number;
|
|
26
|
+
labelSuffix?: string;
|
|
27
|
+
inline?: boolean;
|
|
28
|
+
inlineMessage?: boolean;
|
|
29
|
+
statusIcon?: boolean;
|
|
30
|
+
showMessage?: boolean;
|
|
31
|
+
validateOnRuleChange?: boolean;
|
|
32
|
+
hideRequiredAsterisk?: boolean;
|
|
33
|
+
scrollToError?: boolean;
|
|
34
|
+
}
|
|
7
35
|
export type FormItemProp = Arrayable<string>;
|
|
8
36
|
export declare const formItemValidateStates: readonly ["", "error", "validating", "success"];
|
|
9
37
|
export type FormItemValidateState = (typeof formItemValidateStates)[number];
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
export interface RowProps {
|
|
2
|
+
/** 自定义元素标签 */
|
|
3
|
+
tag?: string;
|
|
4
|
+
/** 栅格间隔 */
|
|
5
|
+
gutter?: number;
|
|
6
|
+
/** flex 布局下的水平排列方式 */
|
|
7
|
+
justify?: RowJustify;
|
|
8
|
+
/** flex 布局下的垂直排列方式 */
|
|
9
|
+
align?: RowAlign;
|
|
10
|
+
}
|
|
1
11
|
export type RowJustify = 'start' | 'center' | 'end' | 'space-around' | 'space-between' | 'space-evenly';
|
|
2
12
|
export type RowAlign = 'top' | 'middle' | 'bottom';
|
|
@@ -4,7 +4,8 @@ export declare enum FormCompEnum {
|
|
|
4
4
|
INPUT_NUMBER = "input-number",
|
|
5
5
|
INPUT_NUMBER_STEP = "input-number-step",
|
|
6
6
|
PASSWORD = "password",
|
|
7
|
-
TEXTAREA = "textarea"
|
|
7
|
+
TEXTAREA = "textarea",
|
|
8
|
+
DIVIDER = "divider"
|
|
8
9
|
}
|
|
9
10
|
declare const componentMap: Map<FormCompEnum, Component>;
|
|
10
11
|
export declare function add(compName: FormCompEnum, type: Component): void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ButtonProps, ColProps, RowProps } from '..';
|
|
2
2
|
import type { FormItemProps, FormProps } from '../form';
|
|
3
3
|
import type { InternalRuleItem, RuleItem } from 'async-validator';
|
|
4
|
-
import type { VNode } from 'vue';
|
|
5
|
-
import type { StyleValue } from 'vue/types/jsx';
|
|
4
|
+
import type { VNode, StyleValue } from 'vue';
|
|
6
5
|
import { FormCompEnum } from './component-map';
|
|
7
6
|
import type { Arrayable, Recordable } from '../types';
|
|
8
7
|
export type ButtonOptions = Partial<ButtonProps> & {
|
|
@@ -43,6 +42,7 @@ export interface FormActionType {
|
|
|
43
42
|
resetSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
|
|
44
43
|
setProps: (formProps: Partial<SuperFormProps>) => Promise<void>;
|
|
45
44
|
removeSchemaByField: (field: string | string[]) => Promise<void>;
|
|
45
|
+
/** 设置提交按钮 loading 状态 */
|
|
46
46
|
setSubmitLoading: (loading?: boolean) => Promise<void>;
|
|
47
47
|
appendSchemaByField: (schema: FormSchema | FormSchema[], prefixField: string | undefined, first?: boolean | undefined) => Promise<void>;
|
|
48
48
|
validateField: (nameList?: NamePath[]) => Promise<any>;
|
|
@@ -3,11 +3,11 @@ import "../form/index.js";
|
|
|
3
3
|
import { useThrottleFn as T } from "@vueuse/core";
|
|
4
4
|
import { inject as _, computed as i, ref as k, useSlots as p, Text as I } from "vue";
|
|
5
5
|
import { buttonGroupContextKey as S } from "./constants.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { useGlobalConfig as z } from "../config-provider/hooks/use-global-config.js";
|
|
7
|
+
import { useFormItem as C } from "../form/hooks/use-form-item.js";
|
|
8
8
|
import { useFormSize as D, useFormDisabled as j } from "../form/hooks/use-form-common-props.js";
|
|
9
9
|
const H = (t, u) => {
|
|
10
|
-
const o = _(S, void 0), m =
|
|
10
|
+
const o = _(S, void 0), m = z("button"), { form: s } = C(), d = D(i(() => o == null ? void 0 : o.size)), c = j(), f = k(), r = p(), h = i(() => t.type || (o == null ? void 0 : o.type) || ""), g = i(
|
|
11
11
|
() => {
|
|
12
12
|
var e;
|
|
13
13
|
return t.autoInsertSpace ?? ((e = m.value) == null ? void 0 : e.autoInsertSpace) ?? !1;
|
package/es/components/index.js
CHANGED
|
@@ -89,45 +89,45 @@ import { VftLoading as he } from "./loading/index.js";
|
|
|
89
89
|
import { VftMessage as Be, VftMessage as He } from "./message/index.js";
|
|
90
90
|
import { VftInfiniteScroll as Je } from "./infinite-scroll/index.js";
|
|
91
91
|
import { VftProgressI as je } from "./progress-i/index.js";
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import { default as Yt } from "./popper/
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
92
|
+
import { buttonGroupContextKey as We } from "./button/constants.js";
|
|
93
|
+
import { checkboxGroupContextKey as Ze } from "./checkbox/constants.js";
|
|
94
|
+
import { configProviderContextKey as ot, messageConfig as rt } from "./config-provider/constants.js";
|
|
95
|
+
import { provideGlobalConfig as tt, useGlobalComponentSettings as ft, useGlobalConfig as mt } from "./config-provider/hooks/use-global-config.js";
|
|
96
|
+
import { ROOT_PICKER_INJECTION_KEY as xt, datePickerConfig as at } from "./date-picker/constants.js";
|
|
97
|
+
import { datePickerProps as Vt } from "./date-picker/props/date-picker.js";
|
|
98
|
+
import { dialogInjectionKey as st } from "./dialog/constants.js";
|
|
99
|
+
import { useDialog as ut } from "./dialog/hooks/use-dialog.js";
|
|
100
|
+
import { DROPDOWN_INJECTION_KEY as ct } from "./dropdown/tokens.js";
|
|
101
|
+
import { EmptyEnum as Tt } from "./empty/constants.js";
|
|
102
|
+
import { formContextKey as gt, formItemContextKey as Dt } from "./form/constants.js";
|
|
103
|
+
import { useDisabled as Pt, useFormDisabled as Mt, useFormSize as Ft, useSize as St } from "./form/hooks/use-form-common-props.js";
|
|
104
|
+
import { useFormItem as yt, useFormItemInputId as bt } from "./form/hooks/use-form-item.js";
|
|
105
|
+
import { formItemValidateStates as At } from "./form/types.js";
|
|
106
|
+
import { MenuTypeEnum as kt } from "./horizontal-menu/constants.js";
|
|
107
|
+
import { initAffixTabs as Rt, useTabsDrag as Gt } from "./multiple-tabs/use/use-multiple-tabs.js";
|
|
108
|
+
import { useTabDropdown as wt } from "./multiple-tabs/use/use-tab-dropdown.js";
|
|
109
|
+
import { usePagination as Nt, vftPaginationKey as ht } from "./pagination/usePagination.js";
|
|
110
|
+
import { default as Bt } from "./popper/arrow.vue2.js";
|
|
111
|
+
import { default as qt } from "./popper/content.vue2.js";
|
|
112
|
+
import { default as Yt } from "./popper/trigger.vue2.js";
|
|
113
|
+
import { radioGroupKey as Qt } from "./radio/constants.js";
|
|
114
|
+
import { rowContextKey as Xt } from "./row/constants.js";
|
|
115
|
+
import { scrollbarContextKey as $t } from "./scrollbar/constants.js";
|
|
116
|
+
import { BAR_MAP as rf, GAP as ef, renderThumbStyle as tf } from "./scrollbar/util.js";
|
|
117
|
+
import { selectInjectionKey as mf } from "./select/token.js";
|
|
118
|
+
import { sliderContextKey as xf } from "./slider/constants.js";
|
|
119
|
+
import { sliderEmits as Vf } from "./slider/slider.js";
|
|
120
|
+
import { spaceProps as sf } from "./space/space.js";
|
|
121
|
+
import { useSpace as uf } from "./space/use-space.js";
|
|
122
|
+
import { ACTION_FIELD as cf, CHECKED_FIELD as If, CREATE_TIME_FIELD as Tf, DATE_FIELD as Cf, DATE_TIME_FIELD as gf, ID_FIELD as Df, NAME_FIELD as Ef, SEQ_FIELD as Pf, STATUS_FIELD as Mf, UPDATE_TIME_FIELD as Ff } from "./table/field.js";
|
|
123
|
+
import { useTable as Lf } from "./table/use/use-table.js";
|
|
124
|
+
import { addRequire as bf, removeRequire as _f, selectMapping as Af } from "./table/utils.js";
|
|
125
|
+
import { TabsRootContextKey as kf } from "./tabs/types.js";
|
|
126
|
+
import { timePickerDefaultProps as Rf } from "./time-picker/common/props.js";
|
|
127
|
+
import { DEFAULT_FORMATS_DATE as Of, DEFAULT_FORMATS_DATEPICKER as wf, DEFAULT_FORMATS_TIME as zf, timeUnits as Nf } from "./time-picker/constants.js";
|
|
128
|
+
import { buildTimeList as Uf, dateEquals as Bf, extractDateFormat as Hf, extractTimeFormat as qf, formatter as Jf, makeList as Yf, parseDate as jf, rangeArr as Qf, valueEquals as Wf } from "./time-picker/utils.js";
|
|
129
|
+
import { default as Zf } from "./time-picker/common/picker.vue2.js";
|
|
130
|
+
import { default as om } from "./time-picker/time-picker-com/panel-time-pick.vue2.js";
|
|
131
131
|
import { TOOLTIP_INJECTION_KEY as em } from "./tooltip/constants.js";
|
|
132
132
|
import { getChildState as fm } from "./tree/model/node.js";
|
|
133
133
|
import { dragEventsKey as pm, useDragNodeHandler as xm } from "./tree/model/useDragNode.js";
|
|
@@ -140,36 +140,36 @@ import { vLoading as ym, createLoadingDirective as bm, vLoading as _m } from "./
|
|
|
140
140
|
import { Loading as Km } from "./loading/service.js";
|
|
141
141
|
import { messageDefaults as vm, messageTypes as Rm } from "./message/types.js";
|
|
142
142
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
143
|
+
cf as ACTION_FIELD,
|
|
144
|
+
rf as BAR_MAP,
|
|
145
|
+
If as CHECKED_FIELD,
|
|
146
|
+
Tf as CREATE_TIME_FIELD,
|
|
147
|
+
Zf as CommonPicker,
|
|
148
|
+
Cf as DATE_FIELD,
|
|
149
|
+
gf as DATE_TIME_FIELD,
|
|
150
|
+
Of as DEFAULT_FORMATS_DATE,
|
|
151
|
+
wf as DEFAULT_FORMATS_DATEPICKER,
|
|
152
|
+
zf as DEFAULT_FORMATS_TIME,
|
|
153
|
+
ct as DROPDOWN_INJECTION_KEY,
|
|
154
154
|
oe as DynamicSizeGrid,
|
|
155
155
|
ee as DynamicSizeList,
|
|
156
|
-
|
|
156
|
+
Tt as EmptyEnum,
|
|
157
157
|
fe as FixedSizeGrid,
|
|
158
158
|
pe as FixedSizeList,
|
|
159
159
|
sm as FormCompEnum,
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
ef as GAP,
|
|
161
|
+
Df as ID_FIELD,
|
|
162
162
|
Po as Icon,
|
|
163
|
-
|
|
163
|
+
kt as MenuTypeEnum,
|
|
164
164
|
Be as Message,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
Ef as NAME_FIELD,
|
|
166
|
+
xt as ROOT_PICKER_INJECTION_KEY,
|
|
167
|
+
Pf as SEQ_FIELD,
|
|
168
|
+
Mf as STATUS_FIELD,
|
|
169
169
|
em as TOOLTIP_INJECTION_KEY,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
kf as TabsRootContextKey,
|
|
171
|
+
om as TimePickPanel,
|
|
172
|
+
Ff as UPDATE_TIME_FIELD,
|
|
173
173
|
e as VftAlert,
|
|
174
174
|
k as VftAside,
|
|
175
175
|
le as VftAutocomplete,
|
|
@@ -246,9 +246,9 @@ export {
|
|
|
246
246
|
fr as VftPopconfirm,
|
|
247
247
|
pr as VftPopover,
|
|
248
248
|
ar as VftPopper,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
Bt as VftPopperArrow,
|
|
250
|
+
qt as VftPopperContent,
|
|
251
|
+
Yt as VftPopperTrigger,
|
|
252
252
|
Ie as VftProgress,
|
|
253
253
|
je as VftProgressI,
|
|
254
254
|
Vr as VftQrcode,
|
|
@@ -281,77 +281,77 @@ export {
|
|
|
281
281
|
De as VftUpload,
|
|
282
282
|
Zr as VftVerifyCode,
|
|
283
283
|
lm as add,
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
bf as addRequire,
|
|
285
|
+
Uf as buildTimeList,
|
|
286
|
+
We as buttonGroupContextKey,
|
|
287
287
|
Sm as carouselContextKey,
|
|
288
|
-
|
|
288
|
+
Ze as checkboxGroupContextKey,
|
|
289
289
|
um as componentMap,
|
|
290
|
-
|
|
290
|
+
ot as configProviderContextKey,
|
|
291
291
|
z as createContextMenu,
|
|
292
292
|
bm as createLoadingDirective,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
293
|
+
Bf as dateEquals,
|
|
294
|
+
at as datePickerConfig,
|
|
295
|
+
Vt as datePickerProps,
|
|
296
296
|
dm as del,
|
|
297
297
|
N as destroyContextMenu,
|
|
298
|
-
|
|
298
|
+
st as dialogInjectionKey,
|
|
299
299
|
pm as dragEventsKey,
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
300
|
+
Hf as extractDateFormat,
|
|
301
|
+
qf as extractTimeFormat,
|
|
302
|
+
gt as formContextKey,
|
|
303
|
+
Dt as formItemContextKey,
|
|
304
|
+
At as formItemValidateStates,
|
|
305
|
+
Jf as formatter,
|
|
306
306
|
Pm as genFileId,
|
|
307
307
|
fm as getChildState,
|
|
308
308
|
gm as getDynamicProps,
|
|
309
|
-
|
|
309
|
+
Rt as initAffixTabs,
|
|
310
310
|
cm as isDatePicker,
|
|
311
311
|
Im as isInput,
|
|
312
312
|
Tm as isRangePicker,
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
Yf as makeList,
|
|
314
|
+
rt as messageConfig,
|
|
315
315
|
vm as messageDefaults,
|
|
316
316
|
Rm as messageTypes,
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
317
|
+
jf as parseDate,
|
|
318
|
+
tt as provideGlobalConfig,
|
|
319
|
+
Qt as radioGroupKey,
|
|
320
|
+
Qf as rangeArr,
|
|
321
|
+
_f as removeRequire,
|
|
322
|
+
tf as renderThumbStyle,
|
|
323
|
+
Xt as rowContextKey,
|
|
324
|
+
$t as scrollbarContextKey,
|
|
325
|
+
mf as selectInjectionKey,
|
|
326
|
+
Af as selectMapping,
|
|
327
|
+
xf as sliderContextKey,
|
|
328
|
+
Vf as sliderEmits,
|
|
329
|
+
sf as spaceProps,
|
|
330
|
+
Rf as timePickerDefaultProps,
|
|
331
|
+
Nf as timeUnits,
|
|
332
332
|
Mm as uploadContextKey,
|
|
333
333
|
U as useContextMenu,
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
ut as useDialog,
|
|
335
|
+
Pt as useDisabled,
|
|
336
336
|
xm as useDragNodeHandler,
|
|
337
337
|
Dm as useForm,
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
338
|
+
Mt as useFormDisabled,
|
|
339
|
+
yt as useFormItem,
|
|
340
|
+
bt as useFormItemInputId,
|
|
341
|
+
Ft as useFormSize,
|
|
342
|
+
ft as useGlobalComponentSettings,
|
|
343
|
+
mt as useGlobalConfig,
|
|
344
344
|
im as useModal,
|
|
345
345
|
Vm as useModalInner,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
346
|
+
Nt as usePagination,
|
|
347
|
+
St as useSize,
|
|
348
|
+
uf as useSpace,
|
|
349
|
+
wt as useTabDropdown,
|
|
350
|
+
Lf as useTable,
|
|
351
|
+
Gt as useTabsDrag,
|
|
352
352
|
_m as vLoading,
|
|
353
|
-
|
|
354
|
-
|
|
353
|
+
Wf as valueEquals,
|
|
354
|
+
ht as vftPaginationKey,
|
|
355
355
|
ae as virtualizedGridProps,
|
|
356
356
|
ie as virtualizedListProps,
|
|
357
357
|
Ve as virtualizedProps,
|