@sunny-base-web/ui 0.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/dist/basic/icon/icon.d.ts +8 -0
- package/dist/basic/icon/icon.d.ts.map +1 -0
- package/dist/basic/icon/index.d.ts +2 -0
- package/dist/basic/icon/index.d.ts.map +1 -0
- package/dist/basic/scrollbar/components/ScrollArea.d.ts +28 -0
- package/dist/basic/scrollbar/components/ScrollArea.d.ts.map +1 -0
- package/dist/basic/scrollbar/components/ScrollBar.d.ts +9 -0
- package/dist/basic/scrollbar/components/ScrollBar.d.ts.map +1 -0
- package/dist/basic/scrollbar/components/index.d.ts +3 -0
- package/dist/basic/scrollbar/components/index.d.ts.map +1 -0
- package/dist/basic/scrollbar/index.d.ts +2 -0
- package/dist/basic/scrollbar/index.d.ts.map +1 -0
- package/dist/basic/scrollbar/scrollbar.d.ts +53 -0
- package/dist/basic/scrollbar/scrollbar.d.ts.map +1 -0
- package/dist/data/edit-grid/api.d.ts +21 -0
- package/dist/data/edit-grid/api.d.ts.map +1 -0
- package/dist/data/edit-grid/index.d.ts +2 -0
- package/dist/data/edit-grid/index.d.ts.map +1 -0
- package/dist/data/edit-grid/use-vxe-grid.d.ts +29 -0
- package/dist/data/edit-grid/use-vxe-grid.d.ts.map +1 -0
- package/dist/data/query-grid/api.d.ts +21 -0
- package/dist/data/query-grid/api.d.ts.map +1 -0
- package/dist/data/query-grid/index.d.ts +2 -0
- package/dist/data/query-grid/index.d.ts.map +1 -0
- package/dist/data/query-grid/renderer/FilterComplex.d.ts +11 -0
- package/dist/data/query-grid/renderer/FilterComplex.d.ts.map +1 -0
- package/dist/data/query-grid/renderer/index.d.ts +2 -0
- package/dist/data/query-grid/renderer/index.d.ts.map +1 -0
- package/dist/data/query-grid/sticky.d.ts +4 -0
- package/dist/data/query-grid/sticky.d.ts.map +1 -0
- package/dist/data/query-grid/use-query-grid.d.ts +29 -0
- package/dist/data/query-grid/use-query-grid.d.ts.map +1 -0
- package/dist/data/upload/index.d.ts +48 -0
- package/dist/data/upload/index.d.ts.map +1 -0
- package/dist/entry/form/SunnyForm.d.ts +30 -0
- package/dist/entry/form/SunnyForm.d.ts.map +1 -0
- package/dist/entry/form/SunnyUseForm.d.ts +29 -0
- package/dist/entry/form/SunnyUseForm.d.ts.map +1 -0
- package/dist/entry/form/components/form-actions.d.ts +55 -0
- package/dist/entry/form/components/form-actions.d.ts.map +1 -0
- package/dist/entry/form/config.d.ts +13 -0
- package/dist/entry/form/config.d.ts.map +1 -0
- package/dist/entry/form/form-api.d.ts +191 -0
- package/dist/entry/form/form-api.d.ts.map +1 -0
- package/dist/entry/form/form-render/Form.d.ts +20 -0
- package/dist/entry/form/form-render/Form.d.ts.map +1 -0
- package/dist/entry/form/form-render/FormField.d.ts +7 -0
- package/dist/entry/form/form-render/FormField.d.ts.map +1 -0
- package/dist/entry/form/form-render/context.d.ts +41 -0
- package/dist/entry/form/form-render/context.d.ts.map +1 -0
- package/dist/entry/form/form-render/dependencies.d.ts +19 -0
- package/dist/entry/form/form-render/dependencies.d.ts.map +1 -0
- package/dist/entry/form/form-render/expandable.d.ts +11 -0
- package/dist/entry/form/form-render/expandable.d.ts.map +1 -0
- package/dist/entry/form/form-render/helper.d.ts +33 -0
- package/dist/entry/form/form-render/helper.d.ts.map +1 -0
- package/dist/entry/form/index.d.ts +7 -0
- package/dist/entry/form/index.d.ts.map +1 -0
- package/dist/entry/form/store.d.ts +46 -0
- package/dist/entry/form/store.d.ts.map +1 -0
- package/dist/entry/form/types.d.ts +337 -0
- package/dist/entry/form/types.d.ts.map +1 -0
- package/dist/entry/form/use-form-context.d.ts +29 -0
- package/dist/entry/form/use-form-context.d.ts.map +1 -0
- package/dist/entry/form/use-sunny-form.d.ts +6 -0
- package/dist/entry/form/use-sunny-form.d.ts.map +1 -0
- package/dist/entry/index.d.ts +4 -0
- package/dist/entry/index.d.ts.map +1 -0
- package/dist/entry/search-input-tag/SearchInputTag.d.ts +32 -0
- package/dist/entry/search-input-tag/SearchInputTag.d.ts.map +1 -0
- package/dist/entry/search-input-tag/index.d.ts +5 -0
- package/dist/entry/search-input-tag/index.d.ts.map +1 -0
- package/dist/entry/search-input-tag/types.d.ts +12 -0
- package/dist/entry/search-input-tag/types.d.ts.map +1 -0
- package/dist/entry/select/BatchSelect.d.ts +28 -0
- package/dist/entry/select/BatchSelect.d.ts.map +1 -0
- package/dist/entry/select/Select.d.ts +37 -0
- package/dist/entry/select/Select.d.ts.map +1 -0
- package/dist/entry/select/index.d.ts +6 -0
- package/dist/entry/select/index.d.ts.map +1 -0
- package/dist/entry/select/types.d.ts +66 -0
- package/dist/entry/select/types.d.ts.map +1 -0
- package/dist/feedback/modal/Modal.d.ts +40 -0
- package/dist/feedback/modal/Modal.d.ts.map +1 -0
- package/dist/feedback/modal/index.d.ts +7 -0
- package/dist/feedback/modal/index.d.ts.map +1 -0
- package/dist/feedback/modal/modal-api.d.ts +9 -0
- package/dist/feedback/modal/modal-api.d.ts.map +1 -0
- package/dist/feedback/modal/types.d.ts +60 -0
- package/dist/feedback/modal/types.d.ts.map +1 -0
- package/dist/feedback/modal/use-sunny-modal.d.ts +3 -0
- package/dist/feedback/modal/use-sunny-modal.d.ts.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +3133 -0
- package/dist/navigation/nprogress/index.d.ts +12 -0
- package/dist/navigation/nprogress/index.d.ts.map +1 -0
- package/dist/ui.css +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { FormContext, GenericObject } from 'vee-validate';
|
|
2
|
+
import { ZodTypeAny } from 'zod';
|
|
3
|
+
import { Component } from 'vue';
|
|
4
|
+
export type FormLayout = 'horizontal' | 'inline' | 'vertical';
|
|
5
|
+
export type BaseFormComponentType = 'SunnyInput' | 'SunnySelect' | 'SunnyCheckbox' | 'SunnyRadio' | 'SunnySwitch' | 'SunnyDatePicker' | 'SunnyTimePicker' | 'SunnyUpload' | 'Input' | 'Select' | 'Checkbox' | 'Radio' | 'Switch' | 'DatePicker' | 'TimePicker' | 'Upload' | (Record<never, never> & string);
|
|
6
|
+
export interface FormShape {
|
|
7
|
+
default?: any;
|
|
8
|
+
fieldName: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
rules?: ZodTypeAny;
|
|
11
|
+
}
|
|
12
|
+
export type MaybeComponentProps = Record<string, any>;
|
|
13
|
+
export type FormActions = FormContext<GenericObject>;
|
|
14
|
+
export type FormSchemaRuleType = 'required' | 'selectRequired' | null | ZodTypeAny;
|
|
15
|
+
export interface FormItemDependencies {
|
|
16
|
+
/**
|
|
17
|
+
* 动态组件属性
|
|
18
|
+
* Dynamic component props
|
|
19
|
+
*/
|
|
20
|
+
componentProps?: (value: Partial<Record<string, any>>, actions: FormActions) => MaybeComponentProps | PromiseLike<MaybeComponentProps>;
|
|
21
|
+
/**
|
|
22
|
+
* 是否渲染 (v-if)
|
|
23
|
+
* Whether to render
|
|
24
|
+
*/
|
|
25
|
+
if?: (value: Partial<Record<string, any>>, actions: FormActions) => boolean | PromiseLike<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* 是否显示 (v-show)
|
|
28
|
+
* Whether to show
|
|
29
|
+
*/
|
|
30
|
+
show?: (value: Partial<Record<string, any>>, actions: FormActions) => boolean | PromiseLike<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* 触发依赖更新的字段
|
|
33
|
+
* Trigger fields for dependency updates
|
|
34
|
+
*/
|
|
35
|
+
triggerFields?: string[];
|
|
36
|
+
}
|
|
37
|
+
export interface ColProps {
|
|
38
|
+
span?: number;
|
|
39
|
+
offset?: number;
|
|
40
|
+
push?: number;
|
|
41
|
+
pull?: number;
|
|
42
|
+
order?: number;
|
|
43
|
+
xs?: number | {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
};
|
|
46
|
+
sm?: number | {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
};
|
|
49
|
+
md?: number | {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
};
|
|
52
|
+
lg?: number | {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
};
|
|
55
|
+
xl?: number | {
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
};
|
|
58
|
+
xxl?: number | {
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
};
|
|
61
|
+
[key: string]: any;
|
|
62
|
+
}
|
|
63
|
+
export type FieldMappingTime = [
|
|
64
|
+
string,
|
|
65
|
+
[
|
|
66
|
+
string,
|
|
67
|
+
string
|
|
68
|
+
],
|
|
69
|
+
(((value: any, fieldName: string) => any) | [string, string] | null | string)?
|
|
70
|
+
][];
|
|
71
|
+
export type ArrayToStringFields = Array<[string[], string?] | string | string[]>;
|
|
72
|
+
export interface FormSchema {
|
|
73
|
+
/**
|
|
74
|
+
* 组件属性
|
|
75
|
+
* Component props
|
|
76
|
+
*/
|
|
77
|
+
componentProps?: MaybeComponentProps;
|
|
78
|
+
/**
|
|
79
|
+
* 组件类型
|
|
80
|
+
* Component type
|
|
81
|
+
*/
|
|
82
|
+
component?: BaseFormComponentType | Component;
|
|
83
|
+
/**
|
|
84
|
+
* 默认值
|
|
85
|
+
* Default value
|
|
86
|
+
*/
|
|
87
|
+
defaultValue?: any;
|
|
88
|
+
/**
|
|
89
|
+
* 依赖项配置
|
|
90
|
+
* Dependencies configuration
|
|
91
|
+
*/
|
|
92
|
+
dependencies?: FormItemDependencies;
|
|
93
|
+
/**
|
|
94
|
+
* 字段名
|
|
95
|
+
* Field name
|
|
96
|
+
*/
|
|
97
|
+
fieldName?: string;
|
|
98
|
+
/**
|
|
99
|
+
* 标签
|
|
100
|
+
* Label
|
|
101
|
+
*/
|
|
102
|
+
label?: string;
|
|
103
|
+
/**
|
|
104
|
+
* 验证规则
|
|
105
|
+
* Validation rules
|
|
106
|
+
*/
|
|
107
|
+
rules?: FormSchemaRuleType;
|
|
108
|
+
/**
|
|
109
|
+
* 帮助信息
|
|
110
|
+
* Help message
|
|
111
|
+
*/
|
|
112
|
+
help?: string;
|
|
113
|
+
/**
|
|
114
|
+
* 标签宽度
|
|
115
|
+
* Label width
|
|
116
|
+
*/
|
|
117
|
+
labelWidth?: number | string;
|
|
118
|
+
/**
|
|
119
|
+
* 栅格列配置 (传递给 a-col)
|
|
120
|
+
* Col props (passed to a-col)
|
|
121
|
+
*/
|
|
122
|
+
colProps?: ColProps;
|
|
123
|
+
/**
|
|
124
|
+
* 栅格跨度 (1-24)
|
|
125
|
+
* Col span (1-24)
|
|
126
|
+
*/
|
|
127
|
+
colSpan?: number;
|
|
128
|
+
/**
|
|
129
|
+
* 通用组件属性
|
|
130
|
+
* Common component props
|
|
131
|
+
*/
|
|
132
|
+
commonComponentProps?: Record<string, any>;
|
|
133
|
+
/**
|
|
134
|
+
* 表单字段属性 (传递给 FormField/FormItem)
|
|
135
|
+
* Form field props
|
|
136
|
+
*/
|
|
137
|
+
formFieldProps?: Record<string, any>;
|
|
138
|
+
}
|
|
139
|
+
export interface SunnyFormProps {
|
|
140
|
+
/**
|
|
141
|
+
* 表单布局
|
|
142
|
+
* Form layout
|
|
143
|
+
*/
|
|
144
|
+
layout?: FormLayout;
|
|
145
|
+
/**
|
|
146
|
+
* 表单尺寸
|
|
147
|
+
* Form size
|
|
148
|
+
*/
|
|
149
|
+
size?: 'mini' | 'small' | 'medium' | 'large';
|
|
150
|
+
/**
|
|
151
|
+
* 表单 Schema 配置
|
|
152
|
+
* Form schema configuration
|
|
153
|
+
*/
|
|
154
|
+
schema?: FormSchema[];
|
|
155
|
+
/**
|
|
156
|
+
* 标签宽度
|
|
157
|
+
* Label width
|
|
158
|
+
*/
|
|
159
|
+
labelWidth?: number | string;
|
|
160
|
+
/**
|
|
161
|
+
* 外层容器类名
|
|
162
|
+
* Wrapper class
|
|
163
|
+
*/
|
|
164
|
+
wrapperClass?: string;
|
|
165
|
+
/**
|
|
166
|
+
* 栅格容器配置 (传递给 a-grid 组件,如 cols, xGap, yGap)
|
|
167
|
+
* Grid container props (passed to a-grid)
|
|
168
|
+
*/
|
|
169
|
+
gridProps?: Record<string, any>;
|
|
170
|
+
/**
|
|
171
|
+
* 操作栏外层类名
|
|
172
|
+
* Action wrapper class
|
|
173
|
+
*/
|
|
174
|
+
actionWrapperClass?: string;
|
|
175
|
+
/**
|
|
176
|
+
* 表单项通用配置 (如 colProps, labelWidth, componentProps)
|
|
177
|
+
* Common config for form items
|
|
178
|
+
*/
|
|
179
|
+
commonConfig?: Record<string, any>;
|
|
180
|
+
/**
|
|
181
|
+
* 是否显示默认操作按钮 (提交/重置)
|
|
182
|
+
* Show default actions (submit/reset)
|
|
183
|
+
*/
|
|
184
|
+
showDefaultActions?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* 提交按钮配置
|
|
187
|
+
* Submit button options
|
|
188
|
+
*/
|
|
189
|
+
submitButtonOptions?: Record<string, any>;
|
|
190
|
+
/**
|
|
191
|
+
* 重置按钮配置
|
|
192
|
+
* Reset button options
|
|
193
|
+
*/
|
|
194
|
+
resetButtonOptions?: Record<string, any>;
|
|
195
|
+
/**
|
|
196
|
+
* 是否回车提交
|
|
197
|
+
* Submit on enter
|
|
198
|
+
*/
|
|
199
|
+
submitOnEnter?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* 是否在值变化时自动提交
|
|
202
|
+
* Submit on change
|
|
203
|
+
*/
|
|
204
|
+
submitOnChange?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* 值变化时的回调
|
|
207
|
+
* Handle values change
|
|
208
|
+
*/
|
|
209
|
+
handleValuesChange?: (values: Record<string, any>, changedFields: string[]) => void;
|
|
210
|
+
/**
|
|
211
|
+
* 折叠状态变化时的回调
|
|
212
|
+
* Handle collapsed change
|
|
213
|
+
*/
|
|
214
|
+
handleCollapsedChange?: (collapsed: boolean) => void;
|
|
215
|
+
/**
|
|
216
|
+
* 提交回调
|
|
217
|
+
* Handle submit
|
|
218
|
+
*/
|
|
219
|
+
handleSubmit?: (values: Record<string, any>) => Promise<void> | void;
|
|
220
|
+
/**
|
|
221
|
+
* 滚动到第一个错误字段
|
|
222
|
+
* Scroll to first error field
|
|
223
|
+
*/
|
|
224
|
+
scrollToFirstError?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* 重置回调
|
|
227
|
+
* Handle reset
|
|
228
|
+
*/
|
|
229
|
+
handleReset?: (values: Record<string, any>) => Promise<void> | void;
|
|
230
|
+
/**
|
|
231
|
+
* 是否折叠
|
|
232
|
+
* Collapsed state
|
|
233
|
+
*/
|
|
234
|
+
collapsed?: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* 是否显示折叠按钮
|
|
237
|
+
* Show collapse button
|
|
238
|
+
*/
|
|
239
|
+
showCollapseButton?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* 折叠行数
|
|
242
|
+
* Collapsed rows
|
|
243
|
+
*/
|
|
244
|
+
collapsedRows?: number;
|
|
245
|
+
/**
|
|
246
|
+
* 折叠是否触发布局调整
|
|
247
|
+
* Collapse trigger resize
|
|
248
|
+
*/
|
|
249
|
+
collapseTriggerResize?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* 紧凑模式
|
|
252
|
+
* Compact mode
|
|
253
|
+
*/
|
|
254
|
+
compact?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* 操作按钮布局
|
|
257
|
+
* Action buttons layout
|
|
258
|
+
*/
|
|
259
|
+
actionLayout?: 'inline' | 'newLine' | 'rowEnd';
|
|
260
|
+
/**
|
|
261
|
+
* 操作按钮位置
|
|
262
|
+
* Action buttons position
|
|
263
|
+
*/
|
|
264
|
+
actionPosition?: 'left' | 'right' | 'center';
|
|
265
|
+
/**
|
|
266
|
+
* 操作栏栅格配置 (传递给 a-grid-item)
|
|
267
|
+
* Action column props
|
|
268
|
+
*/
|
|
269
|
+
actionColProps?: ColProps;
|
|
270
|
+
/**
|
|
271
|
+
* 表单值
|
|
272
|
+
* Form values
|
|
273
|
+
*/
|
|
274
|
+
values?: Record<string, any>;
|
|
275
|
+
/**
|
|
276
|
+
* 表单字段映射到时间格式
|
|
277
|
+
* Field mapping time
|
|
278
|
+
*/
|
|
279
|
+
fieldMappingTime?: FieldMappingTime;
|
|
280
|
+
/**
|
|
281
|
+
* 表单字段数组映射字符串配置 默认使用","
|
|
282
|
+
* Array to string fields
|
|
283
|
+
*/
|
|
284
|
+
arrayToStringFields?: ArrayToStringFields;
|
|
285
|
+
}
|
|
286
|
+
export interface FormApiOptions extends SunnyFormProps {
|
|
287
|
+
/**
|
|
288
|
+
* 表单实例
|
|
289
|
+
* Form instance
|
|
290
|
+
*/
|
|
291
|
+
form?: any;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* 表单通用配置
|
|
295
|
+
* Form common configuration
|
|
296
|
+
*/
|
|
297
|
+
export interface FormCommonConfig {
|
|
298
|
+
/**
|
|
299
|
+
* 是否禁用 change 事件监听
|
|
300
|
+
* Whether to disable change listener
|
|
301
|
+
*/
|
|
302
|
+
disabledOnChangeListener?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* 是否禁用 input 事件监听
|
|
305
|
+
* Whether to disable input listener
|
|
306
|
+
*/
|
|
307
|
+
disabledOnInputListener?: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* 空状态值
|
|
310
|
+
* Empty state value
|
|
311
|
+
*/
|
|
312
|
+
emptyStateValue?: any;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* 表单适配器选项
|
|
316
|
+
* Form adapter options
|
|
317
|
+
*/
|
|
318
|
+
export interface SunnyFormAdapterOptions<T extends BaseFormComponentType = BaseFormComponentType> {
|
|
319
|
+
/**
|
|
320
|
+
* 配置
|
|
321
|
+
* Configuration
|
|
322
|
+
*/
|
|
323
|
+
config?: FormCommonConfig;
|
|
324
|
+
/**
|
|
325
|
+
* 定义验证规则
|
|
326
|
+
* Define validation rules
|
|
327
|
+
*/
|
|
328
|
+
defineRules?: Record<string, any>;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* 表单渲染属性
|
|
332
|
+
* Form render properties
|
|
333
|
+
*/
|
|
334
|
+
export interface FormRenderProps extends SunnyFormProps {
|
|
335
|
+
form?: any;
|
|
336
|
+
}
|
|
337
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/entry/form/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAsB,MAAM,KAAK,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE9D,MAAM,MAAM,qBAAqB,GAC7B,YAAY,GACZ,aAAa,GACb,eAAe,GACf,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,iBAAiB,GACjB,aAAa,GACb,OAAO,GACP,QAAQ,GACR,UAAU,GACV,OAAO,GACP,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC;AAEpC,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEtD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAC1B,UAAU,GACV,gBAAgB,GAChB,IAAI,GACJ,UAAU,CAAC;AAEf,MAAM,WAAW,oBA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EAAE,GAAG,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB,CACtC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB;IAEvD;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { SunnyFormProps } from './types';
|
|
3
|
+
export { provideComponentRefMap, injectComponentRefMap } from './form-render/context';
|
|
4
|
+
/**
|
|
5
|
+
* 提供表单属性 (Provide Form Props)
|
|
6
|
+
* 在表单根组件 (SunnyForm / SunnyUseForm) 中调用,向下层组件提供配置
|
|
7
|
+
* @param props 表单配置属性的计算属性
|
|
8
|
+
*/
|
|
9
|
+
export declare function provideFormProps(props: ComputedRef<SunnyFormProps>): void;
|
|
10
|
+
/**
|
|
11
|
+
* 注入表单属性 (Inject Form Props)
|
|
12
|
+
* 在子组件 (如 FormRender, FormField) 中调用,获取表单配置
|
|
13
|
+
* @throws Error 如果没有找到 FormPropsKey (说明没有在 SunnyForm/SunnyUseForm 内部使用)
|
|
14
|
+
*/
|
|
15
|
+
export declare function injectFormProps(): ComputedRef<SunnyFormProps>;
|
|
16
|
+
/**
|
|
17
|
+
* 表单初始化 Hook (Initialize Form)
|
|
18
|
+
* 负责 vee-validate 的初始化、默认值计算和插槽处理
|
|
19
|
+
*
|
|
20
|
+
* @param props 表单属性
|
|
21
|
+
* @returns
|
|
22
|
+
* - form: vee-validate 的表单上下文
|
|
23
|
+
* - delegatedSlots: 需要透传给 FormRender 的插槽名称列表
|
|
24
|
+
*/
|
|
25
|
+
export declare function useFormInitial(props: ComputedRef<SunnyFormProps> | SunnyFormProps): {
|
|
26
|
+
form: import('vee-validate').FormContext<Record<string, any>, Record<string, any>>;
|
|
27
|
+
delegatedSlots: ComputedRef<string[]>;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=use-form-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-form-context.d.ts","sourceRoot":"","sources":["../../../src/entry/form/use-form-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,KAAK,WAAW,EAAqB,MAAM,KAAK,CAAC;AAEtG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAgBtF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,CAAC,cAAc,CAAC,QAElE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,gCAM9B;AAMD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC,cAAc,CAAC,GAAG,cAAc;;;EA2CjF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SunnyFormProps } from './types';
|
|
2
|
+
import { FormApi } from './form-api';
|
|
3
|
+
export declare function useSunnyForm(options?: SunnyFormProps): readonly [import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, FormApi];
|
|
6
|
+
//# sourceMappingURL=use-sunny-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sunny-form.d.ts","sourceRoot":"","sources":["../../../src/entry/form/use-sunny-form.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,wBAAgB,YAAY,CAAC,OAAO,GAAE,cAAmB;;sPAsExD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entry/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SearchInputTagProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: any;
|
|
5
|
+
refs: {};
|
|
6
|
+
rootEl: any;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<SearchInputTagProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (...args: any[]) => void;
|
|
11
|
+
search: (...args: any[]) => void;
|
|
12
|
+
change: (...args: any[]) => void;
|
|
13
|
+
clear: (...args: any[]) => void;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<SearchInputTagProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
onSearch?: ((...args: any[]) => any) | undefined;
|
|
17
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
18
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
modelValue: any[];
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
fieldNames: import('./types').FieldNames;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=SearchInputTag.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInputTag.vue.d.ts","sourceRoot":"","sources":["../../../src/entry/search-input-tag/SearchInputTag.vue"],"names":[],"mappings":"AA8BA;AAqGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAwEnD,iBAAS,cAAc;WA0FT,OAAO,IAA6B;;;;EAKjD;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entry/search-input-tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAElD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,CAAC;AACjD,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FieldNames {
|
|
2
|
+
label?: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SearchInputTagProps {
|
|
6
|
+
modelValue?: any[];
|
|
7
|
+
fieldNames?: FieldNames;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
maxTagCount?: number;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/entry/search-input-tag/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BatchSelectProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: any;
|
|
5
|
+
refs: {};
|
|
6
|
+
rootEl: any;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<BatchSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (...args: any[]) => void;
|
|
11
|
+
change: (...args: any[]) => void;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<BatchSelectProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
modelValue: (string | number)[];
|
|
17
|
+
options: import('./types').SelectOption[];
|
|
18
|
+
filterModel: Record<string, any>;
|
|
19
|
+
matchStrategy: import('./types').MatchStrategy;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=BatchSelect.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BatchSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/entry/select/BatchSelect.vue"],"names":[],"mappings":"AA4CA;AAoNA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAqKhD,iBAAS,cAAc;WAiJT,OAAO,IAA6B;;;;EAKjD;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { SelectOption } from './types';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: PropType<string | number | boolean | Record<string, any> | (string | number | boolean | Record<string, any>)[]>;
|
|
6
|
+
default: undefined;
|
|
7
|
+
};
|
|
8
|
+
options: {
|
|
9
|
+
type: PropType<SelectOption[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
filterModel: {
|
|
13
|
+
type: PropType<Record<string, any>>;
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: PropType<string | number | boolean | Record<string, any> | (string | number | boolean | Record<string, any>)[]>;
|
|
19
|
+
default: undefined;
|
|
20
|
+
};
|
|
21
|
+
options: {
|
|
22
|
+
type: PropType<SelectOption[]>;
|
|
23
|
+
default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
filterModel: {
|
|
26
|
+
type: PropType<Record<string, any>>;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{
|
|
30
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
modelValue: string | number | boolean | Record<string, any> | (string | number | boolean | Record<string, any>)[];
|
|
33
|
+
options: SelectOption[];
|
|
34
|
+
filterModel: Record<string, any>;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
36
|
+
export default _default;
|
|
37
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/entry/select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;;;cAOY,QAAQ,CACtD,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CACtD;;;;cAIc,QAAQ,CAAC,YAAY,EAAE,CAAC;;;;cAIvB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;;;cAdK,QAAQ,CACtD,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CACtD;;;;cAIc,QAAQ,CAAC,YAAY,EAAE,CAAC;;;;cAIvB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;;;;;;;;AAnBnD,wBA2IG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entry/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,IAAI,WAAW,EAAE,CAAC;AAClE,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface SelectOption {
|
|
2
|
+
/**
|
|
3
|
+
* 选项值
|
|
4
|
+
* @en Option value
|
|
5
|
+
*/
|
|
6
|
+
value: string | number;
|
|
7
|
+
/**
|
|
8
|
+
* 选项标签
|
|
9
|
+
* @en Option label
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* 是否禁用
|
|
14
|
+
* @en Whether to disable
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 选项元数据,用于过滤显示条件
|
|
19
|
+
* 例如:{ company: 1400 } 表示只有在 filterModel.company == 1400 时才显示该选项
|
|
20
|
+
*/
|
|
21
|
+
cMeta?: Record<string, any>;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
export type MatchStrategy = 'label' | 'value' | 'both';
|
|
25
|
+
export interface BatchSelectProps {
|
|
26
|
+
/**
|
|
27
|
+
* 绑定值
|
|
28
|
+
* @en Selected values
|
|
29
|
+
*/
|
|
30
|
+
modelValue?: (string | number)[];
|
|
31
|
+
/**
|
|
32
|
+
* 选项列表
|
|
33
|
+
* @en Options list
|
|
34
|
+
*/
|
|
35
|
+
options?: SelectOption[];
|
|
36
|
+
/**
|
|
37
|
+
* 粘贴匹配策略
|
|
38
|
+
* - 'label': 仅匹配标签
|
|
39
|
+
* - 'value': 仅匹配值
|
|
40
|
+
* - 'both': 同时匹配标签和值,优先匹配值
|
|
41
|
+
* @en Paste matching strategy
|
|
42
|
+
* @default 'both'
|
|
43
|
+
*/
|
|
44
|
+
matchStrategy?: MatchStrategy;
|
|
45
|
+
/**
|
|
46
|
+
* 过滤上下文模型(环境上下文)
|
|
47
|
+
*/
|
|
48
|
+
filterModel?: Record<string, any>;
|
|
49
|
+
}
|
|
50
|
+
export interface SunnySelectProps {
|
|
51
|
+
/**
|
|
52
|
+
* 绑定值
|
|
53
|
+
*/
|
|
54
|
+
modelValue?: string | number | boolean | Record<string, any> | (string | number | boolean | Record<string, any>)[];
|
|
55
|
+
/**
|
|
56
|
+
* 选项列表
|
|
57
|
+
*/
|
|
58
|
+
options?: SelectOption[];
|
|
59
|
+
/**
|
|
60
|
+
* 过滤上下文模型(环境上下文)
|
|
61
|
+
* 这是一个对象,包含了当前的上下文信息,例如 { company: 1400, role: 'admin' }。
|
|
62
|
+
* 组件会将选项的 cMeta 与此对象进行比对。
|
|
63
|
+
*/
|
|
64
|
+
filterModel?: Record<string, any>;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/entry/select/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEvD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;IACnH;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ModalProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
title?(_: {}): any;
|
|
7
|
+
footer?(_: {}): any;
|
|
8
|
+
insertFooter?(_: {}): any;
|
|
9
|
+
centerFooter?(_: {}): any;
|
|
10
|
+
appendFooter?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: any;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<ModalProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
|
+
"update:modelValue": (value: boolean) => any;
|
|
18
|
+
close: () => any;
|
|
19
|
+
ok: () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<ModalProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
onClose?: (() => any) | undefined;
|
|
23
|
+
onOk?: (() => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
modelValue: boolean;
|
|
26
|
+
title: string;
|
|
27
|
+
width: string | number;
|
|
28
|
+
zIndex: number;
|
|
29
|
+
helpMessage: string;
|
|
30
|
+
closeOnEsc: boolean;
|
|
31
|
+
closeOnClickModal: boolean;
|
|
32
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=Modal.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../src/feedback/modal/Modal.vue"],"names":[],"mappings":"AAqEA;AA6KA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAwF1C,iBAAS,cAAc;WAmMT,OAAO,IAA6B;;yBAhBrB,GAAG;uBACL,GAAG;wBACD,GAAG;8BACG,GAAG;8BACH,GAAG;8BACH,GAAG;;;;EAgBrC;AAyBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;6EASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|