snail.vue 1.0.13 → 1.0.15
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/css/snail.vue.vue.css +21 -1
- package/dist/snail.vue.d.ts +710 -51
- package/dist/snail.vue.js +772 -17
- package/dist/snail.vue.umd.js +1008 -245
- package/package.json +6 -6
package/dist/snail.vue.d.ts
CHANGED
|
@@ -1,23 +1,216 @@
|
|
|
1
|
-
import { IScope } from 'snail.core';
|
|
2
1
|
import * as vue from 'vue';
|
|
3
|
-
import {
|
|
2
|
+
import { Component, App } from 'vue';
|
|
3
|
+
import { IScope } from 'snail.core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* 无数据提醒的配置选项
|
|
7
7
|
*/
|
|
8
|
+
type NoDataOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* 提醒消息
|
|
11
|
+
* - 默认值:无数据
|
|
12
|
+
*/
|
|
13
|
+
message?: string;
|
|
14
|
+
/**
|
|
15
|
+
* 无数据提醒图标Url地址
|
|
16
|
+
* - 不传入则使用默认的
|
|
17
|
+
*/
|
|
18
|
+
imageUrl?: string;
|
|
19
|
+
};
|
|
8
20
|
|
|
9
21
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @param fn 回调通知
|
|
12
|
-
* @returns 通知句柄,可销毁回调通知,一般在外部销毁时执行
|
|
22
|
+
* loading提示框的配置选项
|
|
13
23
|
*/
|
|
14
|
-
|
|
24
|
+
type LoadingOptions = {
|
|
25
|
+
/**
|
|
26
|
+
* 是否显示loading效果
|
|
27
|
+
* - 默认值:false
|
|
28
|
+
*/
|
|
29
|
+
show: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 展示遮罩层
|
|
32
|
+
* - 默认值:false,显示遮罩层
|
|
33
|
+
*/
|
|
34
|
+
disabledMask?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* loading的根样式
|
|
37
|
+
* - 外部传入后,可进行自由定制loading样式
|
|
38
|
+
*/
|
|
39
|
+
rootClass?: string | string[];
|
|
40
|
+
/**
|
|
41
|
+
* loading组件显示隐藏的动画名
|
|
42
|
+
* - 默认:snail-loading
|
|
43
|
+
*/
|
|
44
|
+
transition?: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
15
47
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @param app 创建的app实例
|
|
18
|
-
* @returns app自身
|
|
48
|
+
* 拖动验证配置选项
|
|
19
49
|
*/
|
|
20
|
-
|
|
50
|
+
type DragVerifyOptions = {
|
|
51
|
+
/**
|
|
52
|
+
* 验证提示消息
|
|
53
|
+
*/
|
|
54
|
+
message: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* 拖拽验证信息
|
|
58
|
+
*/
|
|
59
|
+
type DragVerifyInfo = {
|
|
60
|
+
/**
|
|
61
|
+
* 状态:无、拖拽中、成功
|
|
62
|
+
*/
|
|
63
|
+
status: "none" | "dragging" | "success";
|
|
64
|
+
/**
|
|
65
|
+
* 拖拽开始位置
|
|
66
|
+
*/
|
|
67
|
+
startX: number;
|
|
68
|
+
/**
|
|
69
|
+
* 拖拽结束位置
|
|
70
|
+
*/
|
|
71
|
+
endX: number;
|
|
72
|
+
/**
|
|
73
|
+
* 拖拽距离
|
|
74
|
+
*/
|
|
75
|
+
distance: number;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 滚动视图配置选项
|
|
80
|
+
*/
|
|
81
|
+
type ScrollOptions = {
|
|
82
|
+
/**
|
|
83
|
+
* x轴是否支持滚动
|
|
84
|
+
* - false(默认值)不支持
|
|
85
|
+
* - true 支持滚动
|
|
86
|
+
*/
|
|
87
|
+
scrollX?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* y轴是否支持滚动
|
|
90
|
+
* - false(默认值)不支持
|
|
91
|
+
* - true 支持滚动
|
|
92
|
+
*/
|
|
93
|
+
scrollY?: boolean;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* 滚动视图事件
|
|
97
|
+
*/
|
|
98
|
+
type ScrollEvents = {
|
|
99
|
+
/**
|
|
100
|
+
* 滚动条显示、隐藏事件
|
|
101
|
+
* - x轴是否展示,y轴是否显示
|
|
102
|
+
*/
|
|
103
|
+
bar: [x: boolean, y: boolean];
|
|
104
|
+
/**
|
|
105
|
+
* 滚动条触碰事件,到顶了、到底了
|
|
106
|
+
*/
|
|
107
|
+
touch: [type: ScrollTouchType];
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* 滚动触碰类型
|
|
111
|
+
* - left 最左侧
|
|
112
|
+
* - right 最右侧
|
|
113
|
+
* - top 最顶部
|
|
114
|
+
* - bottom 最底部
|
|
115
|
+
*/
|
|
116
|
+
type ScrollTouchType = "left" | "right" | "top" | "bottom";
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Table配置选项
|
|
120
|
+
*/
|
|
121
|
+
type TableOptions = ScrollOptions & {
|
|
122
|
+
/**
|
|
123
|
+
* 是否启用表格边框
|
|
124
|
+
*/
|
|
125
|
+
border?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* 表头样式
|
|
128
|
+
*/
|
|
129
|
+
headerStyle?: TableStyleOptions;
|
|
130
|
+
/**
|
|
131
|
+
* 表尾部样式
|
|
132
|
+
*/
|
|
133
|
+
footerStyle?: TableStyleOptions;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* 表格样式配置选项
|
|
137
|
+
* - 用于表头和表尾配置样式
|
|
138
|
+
*/
|
|
139
|
+
type TableStyleOptions = {
|
|
140
|
+
/**
|
|
141
|
+
* 背景色
|
|
142
|
+
*/
|
|
143
|
+
background?: string;
|
|
144
|
+
/**
|
|
145
|
+
* 高度
|
|
146
|
+
*/
|
|
147
|
+
height?: number;
|
|
148
|
+
/**
|
|
149
|
+
* 高度单位
|
|
150
|
+
* - 默认 px
|
|
151
|
+
*/
|
|
152
|
+
heightUnit?: "px" | "rem" | "vw" | "vh";
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Table 行配置选项
|
|
156
|
+
*/
|
|
157
|
+
type TableRowOptions = {
|
|
158
|
+
/**
|
|
159
|
+
* 行高
|
|
160
|
+
*/
|
|
161
|
+
height: number;
|
|
162
|
+
/**
|
|
163
|
+
* 行高单位
|
|
164
|
+
* - 默认px
|
|
165
|
+
*/
|
|
166
|
+
unit?: "px" | "rem" | "vw" | "vh";
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Table 列配置选项
|
|
170
|
+
*/
|
|
171
|
+
type TableColOptions = {
|
|
172
|
+
/**
|
|
173
|
+
* 列占比
|
|
174
|
+
* - 存在时,width属性无效
|
|
175
|
+
*/
|
|
176
|
+
flex?: number;
|
|
177
|
+
/**
|
|
178
|
+
* 列宽
|
|
179
|
+
*/
|
|
180
|
+
width?: number;
|
|
181
|
+
/**
|
|
182
|
+
* 列最小宽度
|
|
183
|
+
* - width属性未指定、或者无效时生效;
|
|
184
|
+
* - 推荐和flex搭配使用
|
|
185
|
+
*/
|
|
186
|
+
minWidth?: number;
|
|
187
|
+
/**
|
|
188
|
+
* 列最大宽度
|
|
189
|
+
* - width属性未指定、或者无效时生效;
|
|
190
|
+
* - 推荐和flex搭配使用
|
|
191
|
+
*/
|
|
192
|
+
maxWidth?: number;
|
|
193
|
+
/**
|
|
194
|
+
* 列宽单位
|
|
195
|
+
* - 默认px
|
|
196
|
+
*/
|
|
197
|
+
unit?: "px" | "rem" | "vw" | "vh";
|
|
198
|
+
/**
|
|
199
|
+
* 列对齐方式
|
|
200
|
+
* - 默认left
|
|
201
|
+
*/
|
|
202
|
+
align?: "left" | "center" | "right";
|
|
203
|
+
/**
|
|
204
|
+
* border样式
|
|
205
|
+
* - 完整的border样式;如 1px soloid #000000
|
|
206
|
+
* - 需要配合TableOptions.border使用,否则会导致边框线重叠
|
|
207
|
+
*/
|
|
208
|
+
borderStyle?: string;
|
|
209
|
+
/**
|
|
210
|
+
* padding样式
|
|
211
|
+
*/
|
|
212
|
+
paddingStyle?: string;
|
|
213
|
+
};
|
|
21
214
|
|
|
22
215
|
/**
|
|
23
216
|
* 组件配置选项
|
|
@@ -57,6 +250,253 @@ type ComponentMountOptions = ComponentOptions & {
|
|
|
57
250
|
props?: Record<string, any>;
|
|
58
251
|
};
|
|
59
252
|
|
|
253
|
+
/**
|
|
254
|
+
* 图标配置选项
|
|
255
|
+
* - 后续支持外部直接传入svg路径,这样实现更细粒度的控制
|
|
256
|
+
*/
|
|
257
|
+
type IconOptions = {
|
|
258
|
+
/**
|
|
259
|
+
* 图标类型
|
|
260
|
+
*/
|
|
261
|
+
type: IconType;
|
|
262
|
+
/**
|
|
263
|
+
* 图标颜色
|
|
264
|
+
*/
|
|
265
|
+
color?: string;
|
|
266
|
+
/**
|
|
267
|
+
* 图标大小:默认24
|
|
268
|
+
*/
|
|
269
|
+
size?: number;
|
|
270
|
+
/**
|
|
271
|
+
* 图标绘制路径
|
|
272
|
+
* - 等效 svg-path的d属性
|
|
273
|
+
* - 仅在type为 custom 时生效
|
|
274
|
+
*/
|
|
275
|
+
draw?: string;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* 图标类型
|
|
279
|
+
* - success 成功图标,对勾
|
|
280
|
+
* - close 关闭 用作数据删除,弹窗关闭
|
|
281
|
+
* - error 错误
|
|
282
|
+
* - warn 警告图标
|
|
283
|
+
* - custom 自定义图标:此时IconOptions.draw属性传入绘制路径
|
|
284
|
+
*/
|
|
285
|
+
type IconType = "success" | "close" | "error" | "warn" | "custom";
|
|
286
|
+
/**
|
|
287
|
+
* 图标路径配置选项
|
|
288
|
+
*/
|
|
289
|
+
type IconPathOptions = {
|
|
290
|
+
/**
|
|
291
|
+
* 绘制路径
|
|
292
|
+
*/
|
|
293
|
+
d: string;
|
|
294
|
+
/**
|
|
295
|
+
* 填充颜色
|
|
296
|
+
*/
|
|
297
|
+
fill?: string;
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* 头部配置选项
|
|
302
|
+
*/
|
|
303
|
+
type HeaderOptions = {
|
|
304
|
+
/**
|
|
305
|
+
* 使用到哪里
|
|
306
|
+
* - page :页面头部:默认类型;标题、关闭按钮等对齐一行;
|
|
307
|
+
* - dialog :弹窗头部;标题、关闭按钮等对齐两行,错开排列
|
|
308
|
+
*/
|
|
309
|
+
useTo: "page" | "dialog";
|
|
310
|
+
/**
|
|
311
|
+
* 是否启用分割线
|
|
312
|
+
* 启用后,则组件顶部设置边框 border-bottom: 1px solid #dddfed;;
|
|
313
|
+
*/
|
|
314
|
+
divider?: boolean;
|
|
315
|
+
/**
|
|
316
|
+
* 弹窗标题
|
|
317
|
+
* - 无则不展示标题区域
|
|
318
|
+
*/
|
|
319
|
+
title?: string;
|
|
320
|
+
/** 弹窗标题对齐方式
|
|
321
|
+
* - 默认值:center
|
|
322
|
+
*/
|
|
323
|
+
titleAlign?: "left" | "center" | "right";
|
|
324
|
+
/** 禁用【关闭】按钮
|
|
325
|
+
* - 默认值false
|
|
326
|
+
*/
|
|
327
|
+
closeDisable?: boolean;
|
|
328
|
+
};
|
|
329
|
+
/**
|
|
330
|
+
* 头部事件
|
|
331
|
+
*/
|
|
332
|
+
type HeaderEvents = {
|
|
333
|
+
/**
|
|
334
|
+
* 关闭按钮点击事件
|
|
335
|
+
*/
|
|
336
|
+
close: [];
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* 底部组件配置选项
|
|
341
|
+
*/
|
|
342
|
+
type FooterOptions = {
|
|
343
|
+
/**
|
|
344
|
+
* 内部的按钮等对齐方式:
|
|
345
|
+
* - 默认 right
|
|
346
|
+
*/
|
|
347
|
+
align?: "left" | "center" | "right";
|
|
348
|
+
/**
|
|
349
|
+
* 是否启用分割线
|
|
350
|
+
* 启用后,则组件顶部设置边框 border-top: 1px solid #dddfed;
|
|
351
|
+
*/
|
|
352
|
+
divider?: boolean;
|
|
353
|
+
/**
|
|
354
|
+
* 【取消】按钮名称
|
|
355
|
+
* - 默认【取消】
|
|
356
|
+
*/
|
|
357
|
+
cancelName?: string;
|
|
358
|
+
/**
|
|
359
|
+
* 禁用【取消】按钮
|
|
360
|
+
* - 为true时,不显示【取消】按钮
|
|
361
|
+
*/
|
|
362
|
+
cancelDisable?: boolean;
|
|
363
|
+
/**
|
|
364
|
+
* 【确定】按钮名称
|
|
365
|
+
* - 默认【确定】
|
|
366
|
+
*/
|
|
367
|
+
confirmName?: string;
|
|
368
|
+
/**
|
|
369
|
+
* 禁用【确定】按钮
|
|
370
|
+
* - 为true时,不显示【确定】按钮
|
|
371
|
+
*/
|
|
372
|
+
confirmDisable?: boolean;
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* 底部组件事件
|
|
376
|
+
*/
|
|
377
|
+
type FooterEvents = {
|
|
378
|
+
/**
|
|
379
|
+
* 【取消】按钮点击事件
|
|
380
|
+
*/
|
|
381
|
+
cancel: [];
|
|
382
|
+
/**
|
|
383
|
+
* 【确定】按钮点击事件
|
|
384
|
+
*/
|
|
385
|
+
confirm: [];
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* 按钮配置选项
|
|
390
|
+
*/
|
|
391
|
+
type ButtonOptions = {
|
|
392
|
+
/**
|
|
393
|
+
* 按钮尺寸
|
|
394
|
+
* - max : 120 X 40
|
|
395
|
+
* - middle : 80 X 32
|
|
396
|
+
* - normal : 54 X 28
|
|
397
|
+
* - small : 30 X 20
|
|
398
|
+
*/
|
|
399
|
+
size: "max" | "middle" | "normal" | "small";
|
|
400
|
+
/**
|
|
401
|
+
* 按钮类型
|
|
402
|
+
* - primary: 主按钮:蓝色背景
|
|
403
|
+
* - default: 默认按钮:白色背景
|
|
404
|
+
* - link :链接式按钮:蓝色字体颜色,无边框
|
|
405
|
+
*/
|
|
406
|
+
type: "primary" | "default" | "link";
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Vue App助手类,做一些app实例的辅助性工作
|
|
411
|
+
*/
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* app实例创建完之后的回调通知
|
|
415
|
+
* @param fn 回调通知
|
|
416
|
+
* @returns 通知句柄,可销毁回调通知,一般在外部销毁时执行
|
|
417
|
+
*/
|
|
418
|
+
declare function onAppCreated(fn: (app: App) => void): IScope;
|
|
419
|
+
/**
|
|
420
|
+
* 触发app创建后事件
|
|
421
|
+
* @param app 创建的app实例
|
|
422
|
+
* @returns app自身
|
|
423
|
+
*/
|
|
424
|
+
declare function triggerAppCreated(app: App): App;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* 图标助手类
|
|
428
|
+
*/
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* 基于类型获取Svg图标信息
|
|
432
|
+
* @param type 图标类型
|
|
433
|
+
* @param color 填充颜色,不传入则使用默认的
|
|
434
|
+
* @returns 图标路径信息
|
|
435
|
+
*/
|
|
436
|
+
declare function getSvgIcon(options: IconOptions): IconPathOptions;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* 监视器 模块:封装便捷方法做监听,并在不支持浏览器下做垫片
|
|
440
|
+
* - 和 VueUse 库很像,但只封装自己需要的
|
|
441
|
+
* - 内部变量不使用响应式,那样外部需要 传入el时内部需要兼容useTemplateRef逻辑,这个交给外部处理更灵活
|
|
442
|
+
* - ResizeObserver 监听元素大小变化
|
|
443
|
+
*/
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* 使用作用域
|
|
447
|
+
* - 内部管理多个子作用域,在destroy时自动执行子作用域的destroy方法
|
|
448
|
+
* - 在vue的setup中使用时,vue组件销毁时,自动销毁作用域
|
|
449
|
+
* @returns 销毁方法,add 添加子作用域
|
|
450
|
+
*/
|
|
451
|
+
declare function useScopes(): IScope & {
|
|
452
|
+
add: (scope: IScope) => void;
|
|
453
|
+
};
|
|
454
|
+
/**
|
|
455
|
+
* 监听Interval执行
|
|
456
|
+
* - 内部使用 setInterval 实现
|
|
457
|
+
* @param fn 执行方法
|
|
458
|
+
* @param delay 间隔,单位:ms
|
|
459
|
+
* @param args fn执行时传递参数
|
|
460
|
+
* @returns destroy 停止fn执行
|
|
461
|
+
*/
|
|
462
|
+
declare function onInterval(fn: (...args: any[]) => void, delay?: number, ...args: any[]): IScope;
|
|
463
|
+
/**
|
|
464
|
+
* 监听Timeout执行
|
|
465
|
+
* - 内部使用 setTimeout 实现
|
|
466
|
+
* @param fn 执行方法
|
|
467
|
+
* @param delay 延时,单位:ms
|
|
468
|
+
* @param args fn执行时传递参数
|
|
469
|
+
* @returns destroy 停止fn执行;若fn已执行则无效
|
|
470
|
+
*/
|
|
471
|
+
declare function onTimeout(fn: (...args: any[]) => void, delay?: number, ...args: any[]): IScope;
|
|
472
|
+
/**
|
|
473
|
+
* 监听事件
|
|
474
|
+
* - 内部使用addEventListener 方法监听事件,销毁时自动执行removeEventListener
|
|
475
|
+
* @param target 监听元素
|
|
476
|
+
* @param name 事件名称
|
|
477
|
+
* @param fn 事件处理方法
|
|
478
|
+
* @returns destroy 销毁监听
|
|
479
|
+
*/
|
|
480
|
+
declare function onEvent(target: Element | Window, name: string, fn: EventListenerOrEventListenerObject): IScope;
|
|
481
|
+
/**
|
|
482
|
+
* 监听元素尺寸变化
|
|
483
|
+
* @param el 监听元素
|
|
484
|
+
* @param fn 尺寸变化时的回调方法
|
|
485
|
+
* @returns destroy 销毁监听
|
|
486
|
+
*/
|
|
487
|
+
declare function onResize(el: Element, fn: (size: Readonly<{
|
|
488
|
+
width: number;
|
|
489
|
+
height: number;
|
|
490
|
+
}>) => void): IScope;
|
|
491
|
+
/**
|
|
492
|
+
* 监听元素客户端位置、大小变化
|
|
493
|
+
* - 位置计算规则:相对window屏幕
|
|
494
|
+
* @param el 监听元素
|
|
495
|
+
* @param fn
|
|
496
|
+
* @returns destroy 销毁监听
|
|
497
|
+
*/
|
|
498
|
+
declare function onRerect(el: Element, fn: (rect: DOMRectReadOnly) => void): IScope;
|
|
499
|
+
|
|
60
500
|
/**
|
|
61
501
|
* 模态弹窗显示的组件配置选项
|
|
62
502
|
*/
|
|
@@ -141,20 +581,6 @@ type Dialog = {
|
|
|
141
581
|
handle: DialogHandle<any>;
|
|
142
582
|
};
|
|
143
583
|
|
|
144
|
-
declare var __VLS_8: string | number;
|
|
145
|
-
declare var __VLS_9: any;
|
|
146
|
-
type __VLS_Slots$1 = {} & {
|
|
147
|
-
[K in NonNullable<typeof __VLS_8>]?: (props: typeof __VLS_9) => any;
|
|
148
|
-
};
|
|
149
|
-
declare const __VLS_component$1: vue.DefineComponent<ComponentOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<ComponentOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
150
|
-
declare const _default$1: __VLS_WithSlots$1<typeof __VLS_component$1, __VLS_Slots$1>;
|
|
151
|
-
|
|
152
|
-
type __VLS_WithSlots$1<T, S> = T & {
|
|
153
|
-
new (): {
|
|
154
|
-
$slots: S;
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
|
|
158
584
|
/**
|
|
159
585
|
* 打开模态弹窗
|
|
160
586
|
* @param options 弹窗组件配置选项
|
|
@@ -164,42 +590,275 @@ type __VLS_WithSlots$1<T, S> = T & {
|
|
|
164
590
|
declare function openDialog<T>(options: DialogOptions, onDestroyed?: (fn: () => void) => void): DialogOpenResult<T>;
|
|
165
591
|
|
|
166
592
|
/**
|
|
167
|
-
*
|
|
593
|
+
* 确认弹窗配置选项
|
|
168
594
|
*/
|
|
169
|
-
type
|
|
595
|
+
type ConfirmOptions = {
|
|
170
596
|
/**
|
|
171
|
-
*
|
|
172
|
-
* -
|
|
597
|
+
* 弹窗标题
|
|
598
|
+
* - 默认“提示”
|
|
173
599
|
*/
|
|
174
|
-
|
|
600
|
+
title?: string;
|
|
175
601
|
/**
|
|
176
|
-
*
|
|
177
|
-
* -
|
|
602
|
+
* 确认提示信息
|
|
603
|
+
* - 支持html格式内容
|
|
604
|
+
* - 默认“请确认?”
|
|
178
605
|
*/
|
|
179
|
-
|
|
606
|
+
message?: string;
|
|
180
607
|
/**
|
|
181
|
-
*
|
|
182
|
-
* -
|
|
608
|
+
* 【取消】按钮名称
|
|
609
|
+
* - 默认【取消】
|
|
183
610
|
*/
|
|
184
|
-
|
|
611
|
+
cancelName?: string;
|
|
185
612
|
/**
|
|
186
|
-
*
|
|
187
|
-
* -
|
|
613
|
+
* 禁用【取消】按钮
|
|
614
|
+
* - 为true时,不显示【取消】按钮
|
|
188
615
|
*/
|
|
189
|
-
|
|
616
|
+
cancelDisable?: boolean;
|
|
617
|
+
/**
|
|
618
|
+
* 【确定】按钮名称
|
|
619
|
+
* - 默认【确定】
|
|
620
|
+
*/
|
|
621
|
+
confirmName?: string;
|
|
622
|
+
/**
|
|
623
|
+
* 禁用【确定】按钮
|
|
624
|
+
* - 为true时,不显示【确定】按钮
|
|
625
|
+
*/
|
|
626
|
+
confirmDisable?: boolean;
|
|
190
627
|
};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
628
|
+
/**
|
|
629
|
+
* 确认弹窗句柄
|
|
630
|
+
*/
|
|
631
|
+
type ConfirmHandle = {
|
|
632
|
+
/**
|
|
633
|
+
* 关闭弹窗
|
|
634
|
+
* @param confirm 是否是点击【确认】按钮触发的关闭
|
|
635
|
+
*/
|
|
636
|
+
close: (confirm: boolean) => void;
|
|
195
637
|
};
|
|
196
|
-
declare const __VLS_component: vue.DefineComponent<LoadingOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<LoadingOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
197
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
198
638
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
639
|
+
/**
|
|
640
|
+
* toast提示
|
|
641
|
+
* @param type 提示类型:成功、失败、、、
|
|
642
|
+
* @param message 提示消息
|
|
643
|
+
*/
|
|
644
|
+
declare function toast(type: IconType, message: string): void;
|
|
645
|
+
/**
|
|
646
|
+
* 打开【确认】弹窗
|
|
647
|
+
* @param title 弹窗标题
|
|
648
|
+
* @param message 确认提示信息,支持html片段
|
|
649
|
+
* @returns 弹窗句柄
|
|
650
|
+
*/
|
|
651
|
+
declare function confirm(title: string, message: string): DialogOpenResult<boolean>;
|
|
652
|
+
|
|
653
|
+
declare const components: {
|
|
654
|
+
Button: {
|
|
655
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ButtonOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
656
|
+
P: {};
|
|
657
|
+
B: {};
|
|
658
|
+
D: {};
|
|
659
|
+
C: {};
|
|
660
|
+
M: {};
|
|
661
|
+
Defaults: {};
|
|
662
|
+
}, Readonly<ButtonOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
663
|
+
__isFragment?: never;
|
|
664
|
+
__isTeleport?: never;
|
|
665
|
+
__isSuspense?: never;
|
|
666
|
+
} & vue.ComponentOptionsBase<Readonly<ButtonOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
667
|
+
$slots: {
|
|
668
|
+
default?: (props: {}) => any;
|
|
669
|
+
};
|
|
670
|
+
});
|
|
671
|
+
Footer: {
|
|
672
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<FooterOptions> & Readonly<{
|
|
673
|
+
onCancel?: () => any;
|
|
674
|
+
onConfirm?: () => any;
|
|
675
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
676
|
+
cancel: () => any;
|
|
677
|
+
confirm: () => any;
|
|
678
|
+
}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
679
|
+
P: {};
|
|
680
|
+
B: {};
|
|
681
|
+
D: {};
|
|
682
|
+
C: {};
|
|
683
|
+
M: {};
|
|
684
|
+
Defaults: {};
|
|
685
|
+
}, Readonly<FooterOptions> & Readonly<{
|
|
686
|
+
onCancel?: () => any;
|
|
687
|
+
onConfirm?: () => any;
|
|
688
|
+
}>, {}, {}, {}, {}, {}>;
|
|
689
|
+
__isFragment?: never;
|
|
690
|
+
__isTeleport?: never;
|
|
691
|
+
__isSuspense?: never;
|
|
692
|
+
} & vue.ComponentOptionsBase<Readonly<FooterOptions> & Readonly<{
|
|
693
|
+
onCancel?: () => any;
|
|
694
|
+
onConfirm?: () => any;
|
|
695
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
696
|
+
cancel: () => any;
|
|
697
|
+
confirm: () => any;
|
|
698
|
+
}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
699
|
+
$slots: {
|
|
700
|
+
default?: (props: {}) => any;
|
|
701
|
+
};
|
|
702
|
+
});
|
|
703
|
+
Header: {
|
|
704
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<HeaderOptions> & Readonly<{
|
|
705
|
+
onClose?: () => any;
|
|
706
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
707
|
+
close: () => any;
|
|
708
|
+
}, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
709
|
+
P: {};
|
|
710
|
+
B: {};
|
|
711
|
+
D: {};
|
|
712
|
+
C: {};
|
|
713
|
+
M: {};
|
|
714
|
+
Defaults: {};
|
|
715
|
+
}, Readonly<HeaderOptions> & Readonly<{
|
|
716
|
+
onClose?: () => any;
|
|
717
|
+
}>, {}, {}, {}, {}, {}>;
|
|
718
|
+
__isFragment?: never;
|
|
719
|
+
__isTeleport?: never;
|
|
720
|
+
__isSuspense?: never;
|
|
721
|
+
} & vue.ComponentOptionsBase<Readonly<HeaderOptions> & Readonly<{
|
|
722
|
+
onClose?: () => any;
|
|
723
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
724
|
+
close: () => any;
|
|
725
|
+
}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
726
|
+
$slots: {
|
|
727
|
+
default?: (props: {
|
|
728
|
+
class: string;
|
|
729
|
+
}) => any;
|
|
730
|
+
};
|
|
731
|
+
});
|
|
732
|
+
Icon: vue.DefineComponent<IconOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<IconOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
733
|
+
Dynamic: {
|
|
734
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ComponentOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
735
|
+
P: {};
|
|
736
|
+
B: {};
|
|
737
|
+
D: {};
|
|
738
|
+
C: {};
|
|
739
|
+
M: {};
|
|
740
|
+
Defaults: {};
|
|
741
|
+
}, Readonly<ComponentOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
742
|
+
__isFragment?: never;
|
|
743
|
+
__isTeleport?: never;
|
|
744
|
+
__isSuspense?: never;
|
|
745
|
+
} & vue.ComponentOptionsBase<Readonly<ComponentOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
746
|
+
$slots: {
|
|
747
|
+
[x: string]: (props: any) => any;
|
|
748
|
+
[x: number]: (props: any) => any;
|
|
749
|
+
};
|
|
750
|
+
});
|
|
751
|
+
Scroll: {
|
|
752
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ScrollOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
753
|
+
P: {};
|
|
754
|
+
B: {};
|
|
755
|
+
D: {};
|
|
756
|
+
C: {};
|
|
757
|
+
M: {};
|
|
758
|
+
Defaults: {};
|
|
759
|
+
}, Readonly<ScrollOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
760
|
+
__isFragment?: never;
|
|
761
|
+
__isTeleport?: never;
|
|
762
|
+
__isSuspense?: never;
|
|
763
|
+
} & vue.ComponentOptionsBase<Readonly<ScrollOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
764
|
+
$slots: {
|
|
765
|
+
default?: (props: {}) => any;
|
|
766
|
+
};
|
|
767
|
+
});
|
|
768
|
+
Table: {
|
|
769
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<TableOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
770
|
+
P: {};
|
|
771
|
+
B: {};
|
|
772
|
+
D: {};
|
|
773
|
+
C: {};
|
|
774
|
+
M: {};
|
|
775
|
+
Defaults: {};
|
|
776
|
+
}, Readonly<TableOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
777
|
+
__isFragment?: never;
|
|
778
|
+
__isTeleport?: never;
|
|
779
|
+
__isSuspense?: never;
|
|
780
|
+
} & vue.ComponentOptionsBase<Readonly<TableOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
781
|
+
$slots: {
|
|
782
|
+
header?: (props: {}) => any;
|
|
783
|
+
} & {
|
|
784
|
+
default?: (props: {}) => any;
|
|
785
|
+
} & {
|
|
786
|
+
footer?: (props: {}) => any;
|
|
787
|
+
};
|
|
788
|
+
});
|
|
789
|
+
TableRow: {
|
|
790
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<TableRowOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
791
|
+
P: {};
|
|
792
|
+
B: {};
|
|
793
|
+
D: {};
|
|
794
|
+
C: {};
|
|
795
|
+
M: {};
|
|
796
|
+
Defaults: {};
|
|
797
|
+
}, Readonly<TableRowOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
798
|
+
__isFragment?: never;
|
|
799
|
+
__isTeleport?: never;
|
|
800
|
+
__isSuspense?: never;
|
|
801
|
+
} & vue.ComponentOptionsBase<Readonly<TableRowOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
802
|
+
$slots: {
|
|
803
|
+
default?: (props: {}) => any;
|
|
804
|
+
};
|
|
805
|
+
});
|
|
806
|
+
TableCol: {
|
|
807
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<TableColOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
808
|
+
P: {};
|
|
809
|
+
B: {};
|
|
810
|
+
D: {};
|
|
811
|
+
C: {};
|
|
812
|
+
M: {};
|
|
813
|
+
Defaults: {};
|
|
814
|
+
}, Readonly<TableColOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
815
|
+
__isFragment?: never;
|
|
816
|
+
__isTeleport?: never;
|
|
817
|
+
__isSuspense?: never;
|
|
818
|
+
} & vue.ComponentOptionsBase<Readonly<TableColOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
819
|
+
$slots: {
|
|
820
|
+
default?: (props: {}) => any;
|
|
821
|
+
};
|
|
822
|
+
});
|
|
823
|
+
DragVerify: vue.DefineComponent<DragVerifyOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
824
|
+
success: () => any;
|
|
825
|
+
}, string, vue.PublicProps, Readonly<DragVerifyOptions> & Readonly<{
|
|
826
|
+
onSuccess?: () => any;
|
|
827
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
828
|
+
Loading: {
|
|
829
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<LoadingOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
830
|
+
P: {};
|
|
831
|
+
B: {};
|
|
832
|
+
D: {};
|
|
833
|
+
C: {};
|
|
834
|
+
M: {};
|
|
835
|
+
Defaults: {};
|
|
836
|
+
}, Readonly<LoadingOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
837
|
+
__isFragment?: never;
|
|
838
|
+
__isTeleport?: never;
|
|
839
|
+
__isSuspense?: never;
|
|
840
|
+
} & vue.ComponentOptionsBase<Readonly<LoadingOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
841
|
+
$slots: {
|
|
842
|
+
default?: (props: {}) => any;
|
|
843
|
+
};
|
|
844
|
+
});
|
|
845
|
+
NoData: {
|
|
846
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<NoDataOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
847
|
+
P: {};
|
|
848
|
+
B: {};
|
|
849
|
+
D: {};
|
|
850
|
+
C: {};
|
|
851
|
+
M: {};
|
|
852
|
+
Defaults: {};
|
|
853
|
+
}, Readonly<NoDataOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
854
|
+
__isFragment?: never;
|
|
855
|
+
__isTeleport?: never;
|
|
856
|
+
__isSuspense?: never;
|
|
857
|
+
} & vue.ComponentOptionsBase<Readonly<NoDataOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
858
|
+
$slots: {
|
|
859
|
+
default?: (props: {}) => any;
|
|
860
|
+
};
|
|
861
|
+
});
|
|
203
862
|
};
|
|
204
863
|
|
|
205
864
|
/**
|
|
@@ -212,5 +871,5 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
212
871
|
*/
|
|
213
872
|
declare function mount(options: ComponentMountOptions, onDestroyed?: (fn: () => void) => void): IScope;
|
|
214
873
|
|
|
215
|
-
export {
|
|
216
|
-
export type { ComponentMountOptions, ComponentOptions, Dialog, DialogHandle, DialogOpenResult, DialogOptions, LoadingOptions };
|
|
874
|
+
export { components, confirm, getSvgIcon, mount, onAppCreated, onEvent, onInterval, onRerect, onResize, onTimeout, openDialog, toast, triggerAppCreated, useScopes };
|
|
875
|
+
export type { ButtonOptions, ComponentMountOptions, ComponentOptions, ConfirmHandle, ConfirmOptions, Dialog, DialogHandle, DialogOpenResult, DialogOptions, DragVerifyInfo, DragVerifyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IconOptions, IconPathOptions, IconType, LoadingOptions, NoDataOptions, ScrollEvents, ScrollOptions, ScrollTouchType, TableColOptions, TableOptions, TableRowOptions, TableStyleOptions };
|