snail.vue 1.0.35 → 1.0.36
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/snail.vue.d.ts +299 -214
- package/dist/snail.vue.js +303 -155
- package/dist/snail.vue.umd.js +301 -153
- package/dist/styles/snail.vue.vue.css +18 -16
- package/package.json +3 -4
package/dist/snail.vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as snail_view from 'snail.view';
|
|
2
|
-
import { BaseStyle,
|
|
2
|
+
import { BaseStyle, HeightStyle, FlexBoxStyle, WidthStyle, BorderStyle, PaddingStyle, MarginStyle } from 'snail.view';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
4
|
import { Component, ShallowRef, Ref, WatchSource, App } from 'vue';
|
|
5
5
|
import { IScope, RunResult, IAsyncScope } from 'snail.core';
|
|
@@ -32,14 +32,102 @@ type LoadingOptions = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* 组件基础的数据实体
|
|
36
|
+
* 1、元数据形式存在;方便外部做&组装
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* 组件标题 配置选项
|
|
40
|
+
*/
|
|
41
|
+
type TitleOptions = {
|
|
42
|
+
/**
|
|
43
|
+
* 标题信息
|
|
44
|
+
* - 根据组件自身逻辑,渲染效果不一样
|
|
45
|
+
* - - html元素的title属性:鼠标移入时的提示消息,如 Icon
|
|
46
|
+
* - - 组件展示的标题文本,如 Confirm
|
|
47
|
+
*/
|
|
48
|
+
title?: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* 占位提示语 配置选项
|
|
52
|
+
*/
|
|
53
|
+
type PlaceholderOptions = {
|
|
54
|
+
/**
|
|
55
|
+
* 提示语
|
|
56
|
+
* - 根据组件自身逻辑,渲染效果不一样
|
|
57
|
+
* - - html元素的placeholder属性:如 Input、Search
|
|
58
|
+
* - - 独立占位提示语,作为说明文字存在;如排序时,可提示“拖拽元素可排序”
|
|
59
|
+
*/
|
|
60
|
+
placeholder?: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* 消息信息 配置选项
|
|
36
64
|
*/
|
|
37
|
-
type
|
|
65
|
+
type MessageOptions = {
|
|
38
66
|
/**
|
|
39
|
-
*
|
|
40
|
-
* -
|
|
67
|
+
* 消息内容
|
|
68
|
+
* - 如 Confirm 显示的 确认信息
|
|
69
|
+
* - 如 Empty 中显示的 空状态消息
|
|
41
70
|
*/
|
|
42
71
|
message?: string;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* 只读 配置选项
|
|
75
|
+
* - 抽取出来,方便外部服用
|
|
76
|
+
*/
|
|
77
|
+
type ReadonlyOptions = {
|
|
78
|
+
/**
|
|
79
|
+
* 是否只读
|
|
80
|
+
* - true 时,为只读状态
|
|
81
|
+
*/
|
|
82
|
+
readonly?: boolean;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* 禁用 配置选项
|
|
86
|
+
* - 抽取出来,方便外部服用
|
|
87
|
+
*/
|
|
88
|
+
type DisabledOptions = {
|
|
89
|
+
/**
|
|
90
|
+
* 是否禁用;
|
|
91
|
+
* - true 时,为禁用状态
|
|
92
|
+
* - 根据组件自身逻辑,禁用效果不一样
|
|
93
|
+
* - - 禁用时:组件不显示,如 TreeNode
|
|
94
|
+
* - - 禁用时:组件不可编辑,如 Input、Switch
|
|
95
|
+
* - - 禁用时:组件核心功能不可用;如 Fold,不再可折叠;Sort,不能再拖拽排序、、、
|
|
96
|
+
*/
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* 确认区域 配置选项
|
|
101
|
+
* - 约束 确认区域 的 确定、取消 按钮
|
|
102
|
+
*/
|
|
103
|
+
type ConfirmAreaOptions = {
|
|
104
|
+
/**
|
|
105
|
+
* 【取消】按钮名称
|
|
106
|
+
* - 默认【取消】
|
|
107
|
+
*/
|
|
108
|
+
cancelName?: string;
|
|
109
|
+
/**
|
|
110
|
+
* 禁用【取消】按钮
|
|
111
|
+
* - 为true时,不显示【取消】按钮
|
|
112
|
+
*/
|
|
113
|
+
cancelDisabled?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* 【确定】按钮名称
|
|
116
|
+
* - 默认【确定】
|
|
117
|
+
*/
|
|
118
|
+
confirmName?: string;
|
|
119
|
+
/**
|
|
120
|
+
* 禁用【确定】按钮
|
|
121
|
+
* - 为true时,不显示【确定】按钮
|
|
122
|
+
*/
|
|
123
|
+
confirmDisabled?: boolean;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 空状态配置选项
|
|
128
|
+
* - message 提醒消息 ;默认值:无数据
|
|
129
|
+
*/
|
|
130
|
+
type EmptyOptions = MessageOptions & {
|
|
43
131
|
/**
|
|
44
132
|
* 提醒图标Url地址
|
|
45
133
|
* - 不传入则使用默认的
|
|
@@ -78,63 +166,6 @@ type DragVerifyInfo = {
|
|
|
78
166
|
distance: number;
|
|
79
167
|
};
|
|
80
168
|
|
|
81
|
-
/**
|
|
82
|
-
* 输入框配置选项
|
|
83
|
-
*/
|
|
84
|
-
type InputOptions = {
|
|
85
|
-
/**
|
|
86
|
-
* 输入框类型
|
|
87
|
-
* - text: 文本输入框
|
|
88
|
-
* - number: 数字输入框
|
|
89
|
-
* - password: 密码输入框
|
|
90
|
-
*/
|
|
91
|
-
type?: "text" | "number" | "password";
|
|
92
|
-
/**
|
|
93
|
-
* 输入框标题
|
|
94
|
-
* - 不传入则不展示 标题区域
|
|
95
|
-
*/
|
|
96
|
-
title?: string;
|
|
97
|
-
/**
|
|
98
|
-
* 输入框是否必填
|
|
99
|
-
* - 必填,则验证不通过时,显示错误信息
|
|
100
|
-
* - 必填时,显示必填标记,红色 * 号
|
|
101
|
-
*/
|
|
102
|
-
required?: boolean;
|
|
103
|
-
/**
|
|
104
|
-
* 输入框提示语
|
|
105
|
-
*/
|
|
106
|
-
placeholder?: string;
|
|
107
|
-
/**
|
|
108
|
-
* 是否为只读状态
|
|
109
|
-
*/
|
|
110
|
-
readonly?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
* 是否为禁用状态
|
|
113
|
-
* - 暂时不对外开放
|
|
114
|
-
disabled?: boolean;
|
|
115
|
-
*/
|
|
116
|
-
/**
|
|
117
|
-
* 标题区域样式
|
|
118
|
-
* - 对齐方式
|
|
119
|
-
* - 标题区域宽度
|
|
120
|
-
*/
|
|
121
|
-
titleStyle?: BaseStyle & WidthStyle & FlexBoxStyle;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* 输入框事件
|
|
125
|
-
*/
|
|
126
|
-
type InputEvents = {
|
|
127
|
-
/**
|
|
128
|
-
* 输入框点击时
|
|
129
|
-
*/
|
|
130
|
-
click: [];
|
|
131
|
-
/**
|
|
132
|
-
* 输入框内容发生改变时
|
|
133
|
-
* @param value 输入框内容
|
|
134
|
-
*/
|
|
135
|
-
change: [value: string];
|
|
136
|
-
};
|
|
137
|
-
|
|
138
169
|
/**
|
|
139
170
|
* 树组件配置选项
|
|
140
171
|
*/
|
|
@@ -155,8 +186,9 @@ type TreeOptions<T> = {
|
|
|
155
186
|
type TreeEvents<T> = {};
|
|
156
187
|
/**
|
|
157
188
|
* 树节点
|
|
189
|
+
* - disabled 不展示节点和子节点
|
|
158
190
|
*/
|
|
159
|
-
type TreeNode<T> = {
|
|
191
|
+
type TreeNode<T> = DisabledOptions & {
|
|
160
192
|
/**
|
|
161
193
|
* 树节点 文本
|
|
162
194
|
*/
|
|
@@ -176,11 +208,6 @@ type TreeNode<T> = {
|
|
|
176
208
|
* - false 此节点不可点击
|
|
177
209
|
*/
|
|
178
210
|
clickable?: boolean;
|
|
179
|
-
/**
|
|
180
|
-
* 是否禁用
|
|
181
|
-
* - true:禁用此节点 禁用时不显示此节点及其子节点
|
|
182
|
-
*/
|
|
183
|
-
disabled?: boolean;
|
|
184
211
|
/**
|
|
185
212
|
* 子节点 数据
|
|
186
213
|
*/
|
|
@@ -311,22 +338,15 @@ type TableColOptions = BaseStyle & FlexBoxStyle & WidthStyle & BorderStyle & Pad
|
|
|
311
338
|
|
|
312
339
|
/**
|
|
313
340
|
* 折叠面板配置选项
|
|
341
|
+
* - title 折叠面板标题
|
|
342
|
+
* - disabled 禁用折叠效果,始终展开
|
|
314
343
|
*/
|
|
315
|
-
type FoldOptions = {
|
|
316
|
-
/**
|
|
317
|
-
* 折叠面板标题
|
|
318
|
-
*/
|
|
319
|
-
title?: string;
|
|
344
|
+
type FoldOptions = DisabledOptions & TitleOptions & {
|
|
320
345
|
/**
|
|
321
346
|
* 副标题
|
|
322
347
|
* - 跟随在title后
|
|
323
348
|
*/
|
|
324
349
|
subtitle?: string;
|
|
325
|
-
/**
|
|
326
|
-
* 禁用【折叠】功能
|
|
327
|
-
* - true 则禁用折叠,始终展开内容区域
|
|
328
|
-
*/
|
|
329
|
-
disabled?: boolean;
|
|
330
350
|
};
|
|
331
351
|
/**
|
|
332
352
|
* 折叠状态
|
|
@@ -383,63 +403,15 @@ type ComponentMountOptions = ComponentOptions & {
|
|
|
383
403
|
props?: Record<string, any>;
|
|
384
404
|
};
|
|
385
405
|
|
|
386
|
-
/**
|
|
387
|
-
* 开关 配置选项
|
|
388
|
-
*/
|
|
389
|
-
type SwitchOptions = {
|
|
390
|
-
/**
|
|
391
|
-
* 是否只读
|
|
392
|
-
*/
|
|
393
|
-
readonly?: boolean;
|
|
394
|
-
};
|
|
395
|
-
/**
|
|
396
|
-
* 开关 事件
|
|
397
|
-
*/
|
|
398
|
-
type SwitchEvents = {
|
|
399
|
-
/**
|
|
400
|
-
* 开关 状态变化时
|
|
401
|
-
* @param value 开启、还是关闭
|
|
402
|
-
*/
|
|
403
|
-
change: [value: boolean];
|
|
404
|
-
};
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* 搜索组件配置选项
|
|
408
|
-
*/
|
|
409
|
-
type SearchOptions = {
|
|
410
|
-
/**
|
|
411
|
-
* 是否为只读模式
|
|
412
|
-
*/
|
|
413
|
-
readonly?: boolean;
|
|
414
|
-
/**
|
|
415
|
-
* 搜索提示语
|
|
416
|
-
*/
|
|
417
|
-
placeholder?: string;
|
|
418
|
-
};
|
|
419
|
-
/**
|
|
420
|
-
* 搜索组件事件
|
|
421
|
-
*/
|
|
422
|
-
type SearchEvents = {
|
|
423
|
-
/**
|
|
424
|
-
* 事件:执行搜索
|
|
425
|
-
* @param value 为搜索文本
|
|
426
|
-
*/
|
|
427
|
-
search: [value: string];
|
|
428
|
-
};
|
|
429
|
-
|
|
430
406
|
/**
|
|
431
407
|
* 图标配置选项
|
|
432
|
-
* -
|
|
408
|
+
* - title 作为鼠标移入图标时的提示
|
|
433
409
|
*/
|
|
434
|
-
type IconOptions = {
|
|
410
|
+
type IconOptions = TitleOptions & {
|
|
435
411
|
/**
|
|
436
412
|
* 图标类型
|
|
437
413
|
*/
|
|
438
414
|
type: IconType;
|
|
439
|
-
/**
|
|
440
|
-
* 标题,鼠标移上去时的提示
|
|
441
|
-
*/
|
|
442
|
-
title?: string;
|
|
443
415
|
/**
|
|
444
416
|
* 图标颜色
|
|
445
417
|
*/
|
|
@@ -474,8 +446,9 @@ type IconType = "success" | "close" | "error" | "warn" | "trash" | "grip" | "cus
|
|
|
474
446
|
|
|
475
447
|
/**
|
|
476
448
|
* 头部配置选项
|
|
449
|
+
* - title 将作为头部标题,无则不展示标题区域
|
|
477
450
|
*/
|
|
478
|
-
type HeaderOptions = {
|
|
451
|
+
type HeaderOptions = TitleOptions & {
|
|
479
452
|
/**
|
|
480
453
|
* 使用到哪里
|
|
481
454
|
* - page :页面头部:默认类型;标题、关闭按钮等对齐一行;
|
|
@@ -487,11 +460,6 @@ type HeaderOptions = {
|
|
|
487
460
|
* 启用后,则组件顶部设置边框 border-bottom: 1px solid #dddfed;;
|
|
488
461
|
*/
|
|
489
462
|
divider?: boolean;
|
|
490
|
-
/**
|
|
491
|
-
* 弹窗标题
|
|
492
|
-
* - 无则不展示标题区域
|
|
493
|
-
*/
|
|
494
|
-
title?: string;
|
|
495
463
|
/** 弹窗标题对齐方式
|
|
496
464
|
* - 默认值:center
|
|
497
465
|
*/
|
|
@@ -514,7 +482,7 @@ type HeaderEvents = {
|
|
|
514
482
|
/**
|
|
515
483
|
* 底部组件配置选项
|
|
516
484
|
*/
|
|
517
|
-
type FooterOptions = {
|
|
485
|
+
type FooterOptions = ConfirmAreaOptions & {
|
|
518
486
|
/**
|
|
519
487
|
* 内部的按钮等对齐方式:
|
|
520
488
|
* - 默认 right
|
|
@@ -525,26 +493,6 @@ type FooterOptions = {
|
|
|
525
493
|
* 启用后,则组件顶部设置边框 border-top: 1px solid #dddfed;
|
|
526
494
|
*/
|
|
527
495
|
divider?: boolean;
|
|
528
|
-
/**
|
|
529
|
-
* 【取消】按钮名称
|
|
530
|
-
* - 默认【取消】
|
|
531
|
-
*/
|
|
532
|
-
cancelName?: string;
|
|
533
|
-
/**
|
|
534
|
-
* 禁用【取消】按钮
|
|
535
|
-
* - 为true时,不显示【取消】按钮
|
|
536
|
-
*/
|
|
537
|
-
cancelDisabled?: boolean;
|
|
538
|
-
/**
|
|
539
|
-
* 【确定】按钮名称
|
|
540
|
-
* - 默认【确定】
|
|
541
|
-
*/
|
|
542
|
-
confirmName?: string;
|
|
543
|
-
/**
|
|
544
|
-
* 禁用【确定】按钮
|
|
545
|
-
* - 为true时,不显示【确定】按钮
|
|
546
|
-
*/
|
|
547
|
-
confirmDisabled?: boolean;
|
|
548
496
|
};
|
|
549
497
|
/**
|
|
550
498
|
* 底部组件事件
|
|
@@ -567,7 +515,7 @@ type FooterEvents = {
|
|
|
567
515
|
/**
|
|
568
516
|
* 选择 组件配置选项
|
|
569
517
|
*/
|
|
570
|
-
type ChooseOptions<T> = {
|
|
518
|
+
type ChooseOptions<T> = ReadonlyOptions & {
|
|
571
519
|
/**
|
|
572
520
|
* 是否为多选模式
|
|
573
521
|
* - true 多选模式,可以选中items中多个选项
|
|
@@ -580,10 +528,6 @@ type ChooseOptions<T> = {
|
|
|
580
528
|
* - checkbox: 多选框样式
|
|
581
529
|
*/
|
|
582
530
|
type: "checkbox" | "radio";
|
|
583
|
-
/**
|
|
584
|
-
* 是否是只读模式
|
|
585
|
-
*/
|
|
586
|
-
readonly?: boolean;
|
|
587
531
|
/**
|
|
588
532
|
* 待选项目
|
|
589
533
|
* text 可不传入
|
|
@@ -687,6 +631,36 @@ interface IReactiveManager {
|
|
|
687
631
|
*/
|
|
688
632
|
type ReactiveVar<T> = ShallowRef<T> | Ref<T>;
|
|
689
633
|
|
|
634
|
+
/**
|
|
635
|
+
* 搜索组件配置选项
|
|
636
|
+
*/
|
|
637
|
+
type SearchOptions = ReadonlyOptions & PlaceholderOptions & {};
|
|
638
|
+
/**
|
|
639
|
+
* 搜索组件事件
|
|
640
|
+
*/
|
|
641
|
+
type SearchEvents = {
|
|
642
|
+
/**
|
|
643
|
+
* 事件:执行搜索
|
|
644
|
+
* @param value 为搜索文本
|
|
645
|
+
*/
|
|
646
|
+
search: [value: string];
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* 开关 配置选项
|
|
651
|
+
*/
|
|
652
|
+
type SwitchOptions = ReadonlyOptions & {};
|
|
653
|
+
/**
|
|
654
|
+
* 开关 事件
|
|
655
|
+
*/
|
|
656
|
+
type SwitchEvents = {
|
|
657
|
+
/**
|
|
658
|
+
* 开关 状态变化时
|
|
659
|
+
* @param value 开启、还是关闭
|
|
660
|
+
*/
|
|
661
|
+
change: [value: boolean];
|
|
662
|
+
};
|
|
663
|
+
|
|
690
664
|
/**
|
|
691
665
|
* 使用【响应式管理器】
|
|
692
666
|
* - 请在Vue组件的setup中使用此方法,否则 getCurrentScope 方法无法取到值
|
|
@@ -725,20 +699,16 @@ declare function getSvgDraw(options: IconOptions): string[];
|
|
|
725
699
|
|
|
726
700
|
/**
|
|
727
701
|
* 排序组件 配置选项
|
|
702
|
+
* - disabled 禁用排序效果,不能再拖拽元素排序
|
|
728
703
|
* - 整理部分SortableJs中的配置,不分逻辑不开放
|
|
729
704
|
*/
|
|
730
|
-
type SortOptions<T> = {
|
|
705
|
+
type SortOptions<T> = DisabledOptions & {
|
|
731
706
|
/**
|
|
732
707
|
* 变化器
|
|
733
708
|
* - 在此元素值发生变化时,重新刷新排序面板
|
|
734
709
|
* - 如在增加元素时,改变此值实现 新元素 可拖拽排序
|
|
735
710
|
*/
|
|
736
711
|
changer: T;
|
|
737
|
-
/**
|
|
738
|
-
* 是否禁用排序
|
|
739
|
-
* - true 不支持排序
|
|
740
|
-
*/
|
|
741
|
-
disabled?: boolean;
|
|
742
712
|
/**
|
|
743
713
|
* 拖动哪个元素
|
|
744
714
|
* - 传入类样式选择器;如 .table-row
|
|
@@ -798,6 +768,47 @@ type SortEvents = {
|
|
|
798
768
|
*/
|
|
799
769
|
declare function mount(options: ComponentMountOptions, onDestroyed?: (fn: () => void) => void): IScope;
|
|
800
770
|
|
|
771
|
+
/**
|
|
772
|
+
* 输入框配置选项
|
|
773
|
+
* - title 将作为 输入框标题区域文本;不传入则不展示 标题区域,仅展示输入框
|
|
774
|
+
* - 暂不提供 disabled 逻辑
|
|
775
|
+
*/
|
|
776
|
+
type InputOptions = ReadonlyOptions & /*DisabledOptions & */ PlaceholderOptions & TitleOptions & {
|
|
777
|
+
/**
|
|
778
|
+
* 输入框类型
|
|
779
|
+
* - text: 文本输入框
|
|
780
|
+
* - number: 数字输入框
|
|
781
|
+
* - password: 密码输入框
|
|
782
|
+
*/
|
|
783
|
+
type?: "text" | "number" | "password";
|
|
784
|
+
/**
|
|
785
|
+
* 输入框是否必填
|
|
786
|
+
* - 必填,则验证不通过时,显示错误信息
|
|
787
|
+
* - 必填时,显示必填标记,红色 * 号
|
|
788
|
+
*/
|
|
789
|
+
required?: boolean;
|
|
790
|
+
/**
|
|
791
|
+
* 标题区域样式
|
|
792
|
+
* - 对齐方式
|
|
793
|
+
* - 标题区域宽度
|
|
794
|
+
*/
|
|
795
|
+
titleStyle?: BaseStyle & WidthStyle & FlexBoxStyle;
|
|
796
|
+
};
|
|
797
|
+
/**
|
|
798
|
+
* 输入框事件
|
|
799
|
+
*/
|
|
800
|
+
type InputEvents = {
|
|
801
|
+
/**
|
|
802
|
+
* 输入框点击时
|
|
803
|
+
*/
|
|
804
|
+
click: [];
|
|
805
|
+
/**
|
|
806
|
+
* 输入框内容发生改变时
|
|
807
|
+
* @param value 输入框内容
|
|
808
|
+
*/
|
|
809
|
+
change: [value: string];
|
|
810
|
+
};
|
|
811
|
+
|
|
801
812
|
/**
|
|
802
813
|
* 公共通用数据结构:
|
|
803
814
|
* 1、在弹窗、模态弹窗、跟随弹窗的效果下复用
|
|
@@ -883,7 +894,7 @@ type PopupExtend = {
|
|
|
883
894
|
*/
|
|
884
895
|
|
|
885
896
|
/**
|
|
886
|
-
*
|
|
897
|
+
* 模态弹窗 配置选项
|
|
887
898
|
* - 继承 ComponentOptions ,动态加载组件
|
|
888
899
|
*/
|
|
889
900
|
type DialogOptions = PopupOptions & {
|
|
@@ -951,53 +962,110 @@ type DailogExtend = {
|
|
|
951
962
|
|
|
952
963
|
/**
|
|
953
964
|
* 确认弹窗配置选项
|
|
965
|
+
* - title 弹窗标题,默认“提示”
|
|
966
|
+
* - message 确认提示信息;默认“请确认?”;支持html格式内容
|
|
954
967
|
*/
|
|
955
|
-
type ConfirmOptions = {
|
|
968
|
+
type ConfirmOptions = TitleOptions & MessageOptions & ConfirmAreaOptions & {};
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Toast配置选项
|
|
972
|
+
*/
|
|
973
|
+
type ToastOptions = {
|
|
956
974
|
/**
|
|
957
|
-
*
|
|
958
|
-
* - 默认“提示”
|
|
975
|
+
* 提示类型,基于类型展示图标
|
|
959
976
|
*/
|
|
960
|
-
|
|
977
|
+
type?: IconType;
|
|
961
978
|
/**
|
|
962
|
-
*
|
|
963
|
-
* - 支持html格式内容
|
|
964
|
-
* - 默认“请确认?”
|
|
979
|
+
* 提示消息;支持html格式
|
|
965
980
|
*/
|
|
966
|
-
message
|
|
981
|
+
message: string;
|
|
982
|
+
};
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* 跟随效果 弹窗
|
|
986
|
+
*/
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* 跟随弹窗 配置选项
|
|
990
|
+
* - 传入的组件,根据配置跟随 target 位置和大小;
|
|
991
|
+
*/
|
|
992
|
+
type FollowOptions = PopupOptions & {
|
|
967
993
|
/**
|
|
968
|
-
*
|
|
969
|
-
* -
|
|
994
|
+
* 启用【宽度】跟随
|
|
995
|
+
* - 为true则和 target 宽度保持一致
|
|
996
|
+
* - false时,宽度由 弹出组件 自己维护
|
|
997
|
+
* - 不管是true、还是false,若宽度超过浏览器最大宽度,会进行强制干预
|
|
970
998
|
*/
|
|
971
|
-
|
|
999
|
+
width?: boolean;
|
|
972
1000
|
/**
|
|
973
|
-
*
|
|
974
|
-
* - 为true
|
|
1001
|
+
* 启用【高度】更碎
|
|
1002
|
+
* - 为true则和 target 高度保持一致
|
|
1003
|
+
* - false时,高度由 弹出组件 自己维护
|
|
1004
|
+
* - 不管是true、还是false,若高度超过浏览器最大高度,会进行强制干预
|
|
975
1005
|
*/
|
|
976
|
-
|
|
1006
|
+
height?: boolean;
|
|
977
1007
|
/**
|
|
978
|
-
*
|
|
979
|
-
* -
|
|
1008
|
+
* x轴方向上的位置跟随效果
|
|
1009
|
+
* - start : 和 target 的 left 值保持一致
|
|
1010
|
+
* - center:和 target x轴中心位置一致
|
|
1011
|
+
* - end : 和 target 的 right 值保持一致
|
|
1012
|
+
* - 不传入则自动裁决最合适位置:start ,然后 end,最后 center
|
|
980
1013
|
*/
|
|
981
|
-
|
|
1014
|
+
followX?: "start" | "center" | "end";
|
|
982
1015
|
/**
|
|
983
|
-
*
|
|
984
|
-
* -
|
|
1016
|
+
* y轴方向上的位置跟随效果
|
|
1017
|
+
* - start : 和 target 的 top 值保持一致
|
|
1018
|
+
* - center:和 target y轴中心位置一致
|
|
1019
|
+
* - end : 和 target 的 bottom 值保持一致
|
|
1020
|
+
* - 不传入则自动裁决最合适位置:start ,然后 end,最后 center
|
|
985
1021
|
*/
|
|
986
|
-
|
|
1022
|
+
followY?: "start" | "center" | "end";
|
|
1023
|
+
/**
|
|
1024
|
+
* x轴方向上的位置跟随偏移量
|
|
1025
|
+
* - 默认为0;>0 向右偏移,<0 向左偏移
|
|
1026
|
+
* - followX 计算出来的位置值 加 此偏移量值,最最终x方向上的跟随位置
|
|
1027
|
+
*/
|
|
1028
|
+
offsetX?: number;
|
|
1029
|
+
/**
|
|
1030
|
+
* y轴方向上的位置跟随偏移量
|
|
1031
|
+
* - 默认为0;>0 向下偏移,<0 向上偏移
|
|
1032
|
+
* - followy 计算出来的位置值 加 此偏移量值,最最终x方向上的跟随位置
|
|
1033
|
+
*/
|
|
1034
|
+
offsetY?: number;
|
|
1035
|
+
/**
|
|
1036
|
+
* 客户端留白空间
|
|
1037
|
+
* - 弹出组件 和浏览器客户端窗口之间的【留白空间】
|
|
1038
|
+
* - 仅在 弹出组件 计算出来位置紧贴浏览器窗口时生效
|
|
1039
|
+
*/
|
|
1040
|
+
clientSpace?: number;
|
|
987
1041
|
};
|
|
988
|
-
|
|
989
1042
|
/**
|
|
990
|
-
*
|
|
1043
|
+
* 跟随弹窗 句柄
|
|
1044
|
+
* - 用于在 弹窗组件 内部进行模式判断和关闭跟随弹窗
|
|
991
1045
|
*/
|
|
992
|
-
type
|
|
1046
|
+
type FollowHandle<T> = {
|
|
993
1047
|
/**
|
|
994
|
-
*
|
|
1048
|
+
* 组件是否处于【跟随弹窗】模式
|
|
995
1049
|
*/
|
|
996
|
-
|
|
1050
|
+
inFollow?: boolean;
|
|
997
1051
|
/**
|
|
998
|
-
*
|
|
1052
|
+
* 关闭跟随
|
|
1053
|
+
* @param data 关闭时传递数据
|
|
999
1054
|
*/
|
|
1000
|
-
|
|
1055
|
+
closeFollow(data?: T): void;
|
|
1056
|
+
};
|
|
1057
|
+
/**
|
|
1058
|
+
* 跟随弹窗 扩展配置
|
|
1059
|
+
*/
|
|
1060
|
+
type FollowExtend = {
|
|
1061
|
+
/**
|
|
1062
|
+
* 跟随状态
|
|
1063
|
+
*/
|
|
1064
|
+
followStatus: PopupStatus;
|
|
1065
|
+
/**
|
|
1066
|
+
* 跟随的目标元素
|
|
1067
|
+
*/
|
|
1068
|
+
target: HTMLElement;
|
|
1001
1069
|
};
|
|
1002
1070
|
|
|
1003
1071
|
/**
|
|
@@ -1019,6 +1087,14 @@ interface IPopupManager {
|
|
|
1019
1087
|
* @returns 弹窗打开结果,外部可手动关闭弹窗
|
|
1020
1088
|
*/
|
|
1021
1089
|
dialog<T>(options: DialogOptions): IAsyncScope<T>;
|
|
1090
|
+
/**
|
|
1091
|
+
* 跟随弹窗
|
|
1092
|
+
* - 跟随指定的target对象,可跟随位置、大小
|
|
1093
|
+
* @param target 跟随的目标元素
|
|
1094
|
+
* @param options 跟随配置选项
|
|
1095
|
+
* @returns 弹窗异步作用域,外部可手动关闭弹窗
|
|
1096
|
+
*/
|
|
1097
|
+
follow<T>(target: HTMLElement, options: FollowOptions): IAsyncScope<T>;
|
|
1022
1098
|
/**
|
|
1023
1099
|
* 打开【确认】弹窗
|
|
1024
1100
|
* @param title 弹窗标题
|
|
@@ -1077,10 +1153,9 @@ declare const components: {
|
|
|
1077
1153
|
default?: (props: {}) => any;
|
|
1078
1154
|
};
|
|
1079
1155
|
});
|
|
1080
|
-
Choose: vue.DefineComponent<{
|
|
1156
|
+
Choose: vue.DefineComponent<ReadonlyOptions & {
|
|
1081
1157
|
multi?: boolean;
|
|
1082
1158
|
type: "checkbox" | "radio";
|
|
1083
|
-
readonly?: boolean;
|
|
1084
1159
|
items: ChooseItem<any>[];
|
|
1085
1160
|
itemStyle?: snail_view.WidthStyle & snail_view.HeightStyle & snail_view.MarginStyle;
|
|
1086
1161
|
} & {
|
|
@@ -1088,10 +1163,9 @@ declare const components: {
|
|
|
1088
1163
|
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1089
1164
|
change: (values: any) => any;
|
|
1090
1165
|
"update:modelValue": (value: any) => any;
|
|
1091
|
-
}, string, vue.PublicProps, Readonly<{
|
|
1166
|
+
}, string, vue.PublicProps, Readonly<ReadonlyOptions & {
|
|
1092
1167
|
multi?: boolean;
|
|
1093
1168
|
type: "checkbox" | "radio";
|
|
1094
|
-
readonly?: boolean;
|
|
1095
1169
|
items: ChooseItem<any>[];
|
|
1096
1170
|
itemStyle?: snail_view.WidthStyle & snail_view.HeightStyle & snail_view.MarginStyle;
|
|
1097
1171
|
} & {
|
|
@@ -1160,23 +1234,23 @@ declare const components: {
|
|
|
1160
1234
|
};
|
|
1161
1235
|
});
|
|
1162
1236
|
Icon: vue.DefineComponent<IconOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<IconOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1163
|
-
Search: vue.DefineComponent<
|
|
1237
|
+
Search: vue.DefineComponent<ReadonlyOptions & PlaceholderOptions & {
|
|
1164
1238
|
modelValue?: string;
|
|
1165
1239
|
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1166
1240
|
search: (value: string) => any;
|
|
1167
1241
|
"update:modelValue": (value: string) => any;
|
|
1168
|
-
}, string, vue.PublicProps, Readonly<
|
|
1242
|
+
}, string, vue.PublicProps, Readonly<ReadonlyOptions & PlaceholderOptions & {
|
|
1169
1243
|
modelValue?: string;
|
|
1170
1244
|
}> & Readonly<{
|
|
1171
1245
|
onSearch?: (value: string) => any;
|
|
1172
1246
|
"onUpdate:modelValue"?: (value: string) => any;
|
|
1173
1247
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1174
|
-
Switch: vue.DefineComponent<
|
|
1248
|
+
Switch: vue.DefineComponent<ReadonlyOptions & {
|
|
1175
1249
|
modelValue?: boolean;
|
|
1176
1250
|
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1177
1251
|
change: (value: boolean) => any;
|
|
1178
1252
|
"update:modelValue": (value: boolean) => any;
|
|
1179
|
-
}, string, vue.PublicProps, Readonly<
|
|
1253
|
+
}, string, vue.PublicProps, Readonly<ReadonlyOptions & {
|
|
1180
1254
|
modelValue?: boolean;
|
|
1181
1255
|
}> & Readonly<{
|
|
1182
1256
|
onChange?: (value: boolean) => any;
|
|
@@ -1201,7 +1275,9 @@ declare const components: {
|
|
|
1201
1275
|
};
|
|
1202
1276
|
});
|
|
1203
1277
|
Fold: {
|
|
1204
|
-
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<
|
|
1278
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<DisabledOptions & TitleOptions & {
|
|
1279
|
+
subtitle?: string;
|
|
1280
|
+
} & {
|
|
1205
1281
|
status?: FoldStatus;
|
|
1206
1282
|
}> & Readonly<{
|
|
1207
1283
|
onChange?: (status: FoldStatus) => any;
|
|
@@ -1216,7 +1292,9 @@ declare const components: {
|
|
|
1216
1292
|
C: {};
|
|
1217
1293
|
M: {};
|
|
1218
1294
|
Defaults: {};
|
|
1219
|
-
}, Readonly<
|
|
1295
|
+
}, Readonly<DisabledOptions & TitleOptions & {
|
|
1296
|
+
subtitle?: string;
|
|
1297
|
+
} & {
|
|
1220
1298
|
status?: FoldStatus;
|
|
1221
1299
|
}> & Readonly<{
|
|
1222
1300
|
onChange?: (status: FoldStatus) => any;
|
|
@@ -1225,7 +1303,9 @@ declare const components: {
|
|
|
1225
1303
|
__isFragment?: never;
|
|
1226
1304
|
__isTeleport?: never;
|
|
1227
1305
|
__isSuspense?: never;
|
|
1228
|
-
} & vue.ComponentOptionsBase<Readonly<
|
|
1306
|
+
} & vue.ComponentOptionsBase<Readonly<DisabledOptions & TitleOptions & {
|
|
1307
|
+
subtitle?: string;
|
|
1308
|
+
} & {
|
|
1229
1309
|
status?: FoldStatus;
|
|
1230
1310
|
}> & Readonly<{
|
|
1231
1311
|
onChange?: (status: FoldStatus) => any;
|
|
@@ -1258,9 +1338,8 @@ declare const components: {
|
|
|
1258
1338
|
};
|
|
1259
1339
|
});
|
|
1260
1340
|
Sort: {
|
|
1261
|
-
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
1341
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<DisabledOptions & {
|
|
1262
1342
|
changer: any;
|
|
1263
|
-
disabled?: boolean;
|
|
1264
1343
|
draggable: string;
|
|
1265
1344
|
handle?: string;
|
|
1266
1345
|
dragClass?: string;
|
|
@@ -1278,9 +1357,8 @@ declare const components: {
|
|
|
1278
1357
|
C: {};
|
|
1279
1358
|
M: {};
|
|
1280
1359
|
Defaults: {};
|
|
1281
|
-
}, Readonly<{
|
|
1360
|
+
}, Readonly<DisabledOptions & {
|
|
1282
1361
|
changer: any;
|
|
1283
|
-
disabled?: boolean;
|
|
1284
1362
|
draggable: string;
|
|
1285
1363
|
handle?: string;
|
|
1286
1364
|
dragClass?: string;
|
|
@@ -1293,9 +1371,8 @@ declare const components: {
|
|
|
1293
1371
|
__isFragment?: never;
|
|
1294
1372
|
__isTeleport?: never;
|
|
1295
1373
|
__isSuspense?: never;
|
|
1296
|
-
} & vue.ComponentOptionsBase<Readonly<{
|
|
1374
|
+
} & vue.ComponentOptionsBase<Readonly<DisabledOptions & {
|
|
1297
1375
|
changer: any;
|
|
1298
|
-
disabled?: boolean;
|
|
1299
1376
|
draggable: string;
|
|
1300
1377
|
handle?: string;
|
|
1301
1378
|
dragClass?: string;
|
|
@@ -1402,13 +1479,21 @@ declare const components: {
|
|
|
1402
1479
|
default?: (props: any) => any;
|
|
1403
1480
|
};
|
|
1404
1481
|
});
|
|
1405
|
-
Input: vue.DefineComponent<
|
|
1482
|
+
Input: vue.DefineComponent<ReadonlyOptions & PlaceholderOptions & TitleOptions & {
|
|
1483
|
+
type?: "text" | "number" | "password";
|
|
1484
|
+
required?: boolean;
|
|
1485
|
+
titleStyle?: snail_view.BaseStyle & snail_view.WidthStyle & snail_view.FlexBoxStyle;
|
|
1486
|
+
} & {
|
|
1406
1487
|
modelValue?: string;
|
|
1407
1488
|
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1408
1489
|
change: (value: string) => any;
|
|
1409
1490
|
click: () => any;
|
|
1410
1491
|
"update:modelValue": (value: string) => any;
|
|
1411
|
-
}, string, vue.PublicProps, Readonly<
|
|
1492
|
+
}, string, vue.PublicProps, Readonly<ReadonlyOptions & PlaceholderOptions & TitleOptions & {
|
|
1493
|
+
type?: "text" | "number" | "password";
|
|
1494
|
+
required?: boolean;
|
|
1495
|
+
titleStyle?: snail_view.BaseStyle & snail_view.WidthStyle & snail_view.FlexBoxStyle;
|
|
1496
|
+
} & {
|
|
1412
1497
|
modelValue?: string;
|
|
1413
1498
|
}> & Readonly<{
|
|
1414
1499
|
onChange?: (value: string) => any;
|
|
@@ -1457,4 +1542,4 @@ declare const components: {
|
|
|
1457
1542
|
};
|
|
1458
1543
|
|
|
1459
1544
|
export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive };
|
|
1460
|
-
export type { ButtonOptions, ChooseEvents, ChooseItem, ChooseOptions, ComponentMountOptions, ComponentOptions, ConfirmOptions, DailogExtend, DialogHandle, DialogOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, FoldEvents, FoldOptions, FoldStatus, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IPopupManager, IReactiveManager, IconOptions, IconType, InputEvents, InputOptions, LoadingOptions, PopupDescriptor, PopupExtend, PopupFlagOptions, PopupHandle, PopupOptions, PopupStatus, ReactiveVar, ScrollEvents, ScrollOptions, ScrollTouchType, SearchEvents, SearchOptions, SortEvents, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtendOptions, TreeNodeOptions, TreeOptions };
|
|
1545
|
+
export type { ButtonOptions, ChooseEvents, ChooseItem, ChooseOptions, ComponentMountOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DailogExtend, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, FoldEvents, FoldOptions, FoldStatus, FollowExtend, FollowHandle, FollowOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IPopupManager, IReactiveManager, IconOptions, IconType, InputEvents, InputOptions, LoadingOptions, MessageOptions, PlaceholderOptions, PopupDescriptor, PopupExtend, PopupFlagOptions, PopupHandle, PopupOptions, PopupStatus, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollOptions, ScrollTouchType, SearchEvents, SearchOptions, SortEvents, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtendOptions, TreeNodeOptions, TreeOptions };
|