snail.vue 2.0.6 → 2.0.8
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 +479 -94
- package/dist/snail.vue.js +707 -190
- package/dist/snail.vue.umd.js +704 -187
- package/dist/styles/snail.vue.vue.css +22 -16
- package/package.json +3 -3
package/dist/snail.vue.d.ts
CHANGED
|
@@ -637,6 +637,55 @@ type TreeNodeSlotOptions<Node> = {
|
|
|
637
637
|
toggle(): void;
|
|
638
638
|
};
|
|
639
639
|
|
|
640
|
+
/**
|
|
641
|
+
* Vue 动画容器组件配置选项
|
|
642
|
+
*/
|
|
643
|
+
type TransitionOptions = {
|
|
644
|
+
/**
|
|
645
|
+
* 动画的自定义类样式名称
|
|
646
|
+
* - 默认为 `snail-transition`;不会作为 Transition的 name 属性名
|
|
647
|
+
* - 动画生效时组成的`class`规则为:`customClass`+动画状态;类似`snail-transition enter-from`
|
|
648
|
+
* - 动画状态可选值:
|
|
649
|
+
* |-------------------|----------------------|
|
|
650
|
+
* | -- |-- |
|
|
651
|
+
* | enter-active | 进入动画的生效状态 |
|
|
652
|
+
* | enter-from | 进入动画的起始状态 |
|
|
653
|
+
* | enter-to | 进入动画的结束状态 |
|
|
654
|
+
* | leave-active | 离开动画的生效状态 |
|
|
655
|
+
* | leave-from | 离开动画的起始状态 |
|
|
656
|
+
* | leave-to | 离开动画的结束状态 |
|
|
657
|
+
*
|
|
658
|
+
*/
|
|
659
|
+
customClass?: string;
|
|
660
|
+
/**
|
|
661
|
+
* 动画效果
|
|
662
|
+
* - 配合 `customClass` 使用,用于标记动画的具体实现
|
|
663
|
+
* - 作为默认动画效果,组装出来的动画效果类似 `snail-transition fade enter-from`
|
|
664
|
+
* - 效果可选值;默认值 fade
|
|
665
|
+
* |----------------|-------------|----------------------------------|---------------------------------|
|
|
666
|
+
* | -- |-- |-- |-- |
|
|
667
|
+
* | `fade` | 淡入淡出 | 进入时 `opacity` 0-1 | 离开时 `opacity` 1 - 0 |
|
|
668
|
+
* | `scale` | 缩放动画 | 进入时 `scale` 0-1 | 离开时 `scale` 0 - 1 |
|
|
669
|
+
* | `rotate` | 旋转动画 | 进入时 `rotate` 360deg - 0 | 离开时 `rotate` 0 - 360deg |
|
|
670
|
+
* | `up` | 上进上出 | 进入时 `translateY` 100% - 0 | 离开时 `translateY` 0 - -100% |
|
|
671
|
+
* | `down` | 下进下出 | 进入时 `translateY` -100% - 0 | 离开时 `translateY` 0 - 100% |
|
|
672
|
+
* | `up-down` | 上进下出 | 进入时 `translateY` 100% - 0 | 离开时 `translateY` 0 - 100% |
|
|
673
|
+
* | `down-up` | 下进上出 | 进入时 `translateY` -100% - 0 | 离开时 `translateY` 0 - -100% |
|
|
674
|
+
* | `left` | 左进左出 | 进入时 `translateX` -100% - 0 | 离开时 `translateX` 0 - -100% |
|
|
675
|
+
* | `right` | 右进右出 | 进入时 `translateX` 100% - 0 | 离开时 `translateX` 0 - 100% |
|
|
676
|
+
* | `left-right` | 左进右出 | 进入时 `translateX` -100% - 0 | 离开时 `translateX` 0 - 100% |
|
|
677
|
+
* | `right-left` | 右进左出 | 进入时 `translateX` 100% - 0 | 离开时 `translateX` 0 - -100% |
|
|
678
|
+
*/
|
|
679
|
+
effect?: TransitionEffectOptions | Array<TransitionEffectOptions>;
|
|
680
|
+
/**
|
|
681
|
+
* 是分组动画,还是单个动画
|
|
682
|
+
* - true 则使用 TransitionGroup
|
|
683
|
+
* - false 则使用 Transition
|
|
684
|
+
*/
|
|
685
|
+
group: boolean;
|
|
686
|
+
};
|
|
687
|
+
type TransitionEffectOptions = "fade" | "scale" | "rotate" | "up" | "down" | "up-down" | "down-up" | "left" | "right" | "left-right" | "right-left";
|
|
688
|
+
|
|
640
689
|
/**
|
|
641
690
|
* Table配置选项
|
|
642
691
|
*/
|
|
@@ -749,19 +798,25 @@ type SortGroupOptions = {
|
|
|
749
798
|
* - false:列表容器内的列表单元不可以被移出;
|
|
750
799
|
* - "clone":列表单元移出,移动的为该元素的副本;
|
|
751
800
|
* - function:用来进行pull的函数判断,可以进行复杂逻辑,在函数中return false/true来判断是否移出;
|
|
752
|
-
* - - 暂时不支持 function
|
|
753
801
|
*/
|
|
754
|
-
pull: true | false | "clone";
|
|
802
|
+
pull: true | false | "clone" | SortGroupHook;
|
|
755
803
|
/**
|
|
756
804
|
* 用来定义往这个列表容器放置列表单元的的设置
|
|
757
805
|
* - true:列表容器可以从其他列表容器内放入列表单元;
|
|
758
806
|
* - false:与true相反;
|
|
759
807
|
* - string|string[]:代表的是group配置项里定义的name值。如['foo','bar']
|
|
760
808
|
* - function:用来进行put的函数判断,可以进行复杂逻辑,在函数中return false/true来判断是否放入;
|
|
761
|
-
* - - 暂时不支持 function
|
|
762
809
|
*/
|
|
763
|
-
put: true | false | string | string[];
|
|
810
|
+
put: true | false | string | string[] | SortGroupHook;
|
|
764
811
|
};
|
|
812
|
+
/**
|
|
813
|
+
* 排序组件的Group属性钩子
|
|
814
|
+
* - 用于pull和put中使用,返回false时不执行pull、put操作
|
|
815
|
+
* - @param item 移动的元素
|
|
816
|
+
* - @param to 目标容器dom元素
|
|
817
|
+
* - @param from 来源容器dom元素
|
|
818
|
+
*/
|
|
819
|
+
type SortGroupHook = (item: HTMLElement, to: HTMLElement, from: HTMLElement) => void;
|
|
765
820
|
/**
|
|
766
821
|
* 排序组件 事件
|
|
767
822
|
*/
|
|
@@ -770,6 +825,10 @@ type SortEvents = {
|
|
|
770
825
|
* 开始拖拽
|
|
771
826
|
*/
|
|
772
827
|
start: [evt: SortEvent];
|
|
828
|
+
/**
|
|
829
|
+
* 移动中
|
|
830
|
+
*/
|
|
831
|
+
move: [evt: SortEvent, originalEvent: SortEvent];
|
|
773
832
|
/**
|
|
774
833
|
* 移动到新容器时
|
|
775
834
|
*/
|
|
@@ -878,13 +937,13 @@ type ComponentOptions = {
|
|
|
878
937
|
/**
|
|
879
938
|
* Vue组件对象
|
|
880
939
|
* - name未传入时生效
|
|
940
|
+
* - 推荐外部使用 shallowRef 包裹对象,避免响应式的性能问题
|
|
881
941
|
*/
|
|
882
942
|
component?: Component;
|
|
883
943
|
/**
|
|
884
944
|
* 组件js文件url地址
|
|
885
945
|
* - 支持#号锚点钻取
|
|
886
946
|
* - name、component未传入时生效
|
|
887
|
-
* - 推荐外部使用 shallowRef 包裹对象,避免响应式的性能问题
|
|
888
947
|
*/
|
|
889
948
|
url?: string;
|
|
890
949
|
};
|
|
@@ -1133,6 +1192,271 @@ type SelectNodeEvents<T> = {
|
|
|
1133
1192
|
click: [item: SelectItem<T>, parent?: SelectItem<T>];
|
|
1134
1193
|
};
|
|
1135
1194
|
|
|
1195
|
+
/**
|
|
1196
|
+
* 基础事件实体
|
|
1197
|
+
* 1、把一些常用事件,封装为原子结构,方便复用
|
|
1198
|
+
* 2、不强制必须复用,根据自身情况
|
|
1199
|
+
*/
|
|
1200
|
+
/**
|
|
1201
|
+
* 事件:点击
|
|
1202
|
+
*/
|
|
1203
|
+
type ClickEvents = {
|
|
1204
|
+
/**
|
|
1205
|
+
* 单击事件
|
|
1206
|
+
*/
|
|
1207
|
+
click: [];
|
|
1208
|
+
};
|
|
1209
|
+
/**
|
|
1210
|
+
* 事件:值改变
|
|
1211
|
+
* - 描述值的改变过程,新值是什么,改变前的旧值是什么
|
|
1212
|
+
*/
|
|
1213
|
+
type ChangeEvents<T> = {
|
|
1214
|
+
/**
|
|
1215
|
+
* 值改变;约束新旧值
|
|
1216
|
+
* @param newValue 新值
|
|
1217
|
+
* @param oldValue 旧值
|
|
1218
|
+
*/
|
|
1219
|
+
change: [newValue: T, oldValue?: T];
|
|
1220
|
+
};
|
|
1221
|
+
/**
|
|
1222
|
+
* 事件:移动
|
|
1223
|
+
* - 可描述数据索引位置变化
|
|
1224
|
+
* - 可用于数组元素拖动排序,调整位置等逻辑
|
|
1225
|
+
*/
|
|
1226
|
+
type MoveEvents = {
|
|
1227
|
+
/**
|
|
1228
|
+
* 移动事件
|
|
1229
|
+
* @param fromIndex 从哪个索引位置开始移动
|
|
1230
|
+
* @param toIndex 移动到的索引位置
|
|
1231
|
+
*/
|
|
1232
|
+
move: [fromIndex: number, toIndex: number];
|
|
1233
|
+
};
|
|
1234
|
+
/**
|
|
1235
|
+
* 事件:删除数据
|
|
1236
|
+
* - 描述要删除的具体数据
|
|
1237
|
+
*/
|
|
1238
|
+
type DeleteEvents<T> = {
|
|
1239
|
+
/**
|
|
1240
|
+
* 删除事件
|
|
1241
|
+
* @param value 要删除的数据
|
|
1242
|
+
*/
|
|
1243
|
+
delete: [value?: T];
|
|
1244
|
+
};
|
|
1245
|
+
/**
|
|
1246
|
+
* 事件:关闭
|
|
1247
|
+
*/
|
|
1248
|
+
type CloseEvents = {
|
|
1249
|
+
/**
|
|
1250
|
+
* 关闭事件
|
|
1251
|
+
*/
|
|
1252
|
+
close: [];
|
|
1253
|
+
};
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* 数值控件的数据结构
|
|
1257
|
+
*/
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* 数值组件的基础配置选项
|
|
1261
|
+
*/
|
|
1262
|
+
type NumberBaseOptions = {
|
|
1263
|
+
/**
|
|
1264
|
+
* 最小值
|
|
1265
|
+
*/
|
|
1266
|
+
minValue?: number;
|
|
1267
|
+
/**
|
|
1268
|
+
* 最大值
|
|
1269
|
+
*/
|
|
1270
|
+
maxValue?: number;
|
|
1271
|
+
/**
|
|
1272
|
+
* 值超过阈值(最大值、最小值)时的处理模式
|
|
1273
|
+
* - 默认值为 `keep`;可选取值范围:
|
|
1274
|
+
* - - `keep` 保持原样值显示,不做任何处理
|
|
1275
|
+
* - - `clamp` 截断超出阈值值,低于最小值时直接取最小值,超过最大值时,强制值为最大值
|
|
1276
|
+
* - 值超过阈值时,会自动触发事件,事件名`NumberEvents`的`belowMin`和`exceedMax`
|
|
1277
|
+
*/
|
|
1278
|
+
clamp?: "keep" | "clamp";
|
|
1279
|
+
/**
|
|
1280
|
+
* 精度,保留几位小数
|
|
1281
|
+
* - 要求0、正整数,输入小数则强制整数
|
|
1282
|
+
* - 负数、不传入则不处理
|
|
1283
|
+
*/
|
|
1284
|
+
precision?: number;
|
|
1285
|
+
/**
|
|
1286
|
+
* 对数值进行千分位格式处理
|
|
1287
|
+
* - 默认值为 `disabled`;可选值范围:
|
|
1288
|
+
* - `disabled` 禁用千分位功能
|
|
1289
|
+
* - `inline` 内联千分位功能
|
|
1290
|
+
* - `below` 下拉千分位功能
|
|
1291
|
+
*/
|
|
1292
|
+
thousands?: "disabled" | "inline" | "below";
|
|
1293
|
+
/**
|
|
1294
|
+
* 是否启用数值大写格式化处理
|
|
1295
|
+
* - 为true时,转成中文大写值
|
|
1296
|
+
* - 单位自动为“元”,不支持美元等
|
|
1297
|
+
* - 如金额时,自动转为壹仟壹佰壹拾壹元叁角叁分
|
|
1298
|
+
* - 小数点后面只处理两位(角分);剩余不处理
|
|
1299
|
+
*/
|
|
1300
|
+
upper?: boolean;
|
|
1301
|
+
/**
|
|
1302
|
+
* 格式化时的放大系数
|
|
1303
|
+
* - 用于在格式化千分位、大写时,对实际值进行系数放大,value*formatMultiplier
|
|
1304
|
+
* - 仅接收正整数,取值规则为10^n,默认1
|
|
1305
|
+
* - 千分位格式化时,仅`thousands`为`below`时才进行放到系数处理
|
|
1306
|
+
* - 使用示例例:金额是为万元单位时,这里的放大系数就为 “10000”
|
|
1307
|
+
*/
|
|
1308
|
+
formatMultiplier?: number;
|
|
1309
|
+
/**
|
|
1310
|
+
* 前缀字符串
|
|
1311
|
+
* - 如金额时,可配置前缀 ¥
|
|
1312
|
+
*/
|
|
1313
|
+
prefix?: string;
|
|
1314
|
+
/**
|
|
1315
|
+
* 后缀字符串
|
|
1316
|
+
* - 如金额时,可配置后缀 元/美元、、
|
|
1317
|
+
*/
|
|
1318
|
+
suffix?: string;
|
|
1319
|
+
/**
|
|
1320
|
+
* 数值控制器
|
|
1321
|
+
* - 便捷加减调整数值的控制按钮
|
|
1322
|
+
* - 默认值`disabled`;可选值范围:
|
|
1323
|
+
* - - `disabled` 时禁用
|
|
1324
|
+
* - - `default` 默认模式,左侧 — 右侧 +
|
|
1325
|
+
* - - `right` 右侧模式,+ - 都在右侧
|
|
1326
|
+
*/
|
|
1327
|
+
controls?: "disabled" | "default" | "right";
|
|
1328
|
+
/**
|
|
1329
|
+
* 数值步长值
|
|
1330
|
+
* - `controls` 未禁用时生效
|
|
1331
|
+
* - 每次+、- 的步长值
|
|
1332
|
+
*/
|
|
1333
|
+
step?: number;
|
|
1334
|
+
};
|
|
1335
|
+
/**
|
|
1336
|
+
* 数值组件的配置选项
|
|
1337
|
+
*/
|
|
1338
|
+
type NumberOptions = PlaceholderOptions & ReadonlyOptions & NumberBaseOptions;
|
|
1339
|
+
/**
|
|
1340
|
+
* 接口:数值格式化器
|
|
1341
|
+
*/
|
|
1342
|
+
interface INumberFormatter extends Required<Readonly<Pick<NumberBaseOptions, "minValue" | "maxValue" | "precision" | "thousands" | "upper">>> {
|
|
1343
|
+
/**
|
|
1344
|
+
* 格式化输入文本
|
|
1345
|
+
* @param text 输入文本
|
|
1346
|
+
* @param isEnd 是否是输入结束,true时,已经输入结束将进行数值精度处理
|
|
1347
|
+
* @returns 数值格式化结果
|
|
1348
|
+
*/
|
|
1349
|
+
format(text: string, isEnd: boolean): NumberFormatResult;
|
|
1350
|
+
/**
|
|
1351
|
+
* 进行阈值检测,检测是否超过设定的最大值、最小值
|
|
1352
|
+
* @param number 要检测的数值
|
|
1353
|
+
* @returns 检测结果,`number` 新的值,`belowMin`是否低于最小值,`exceedMax`是否超过最大值
|
|
1354
|
+
*/
|
|
1355
|
+
checkThreshold(number: any): {
|
|
1356
|
+
number: number;
|
|
1357
|
+
belowMin: boolean;
|
|
1358
|
+
exceedMax: boolean;
|
|
1359
|
+
};
|
|
1360
|
+
/**
|
|
1361
|
+
* 对数值文本转大写
|
|
1362
|
+
* @param result
|
|
1363
|
+
* @returns 大写文本值
|
|
1364
|
+
*/
|
|
1365
|
+
buildUpper(result: NumberFormatResult): string;
|
|
1366
|
+
/**
|
|
1367
|
+
* 对数值文本进行千分位格式化
|
|
1368
|
+
* @param result
|
|
1369
|
+
* @returns 格式化后的文本值
|
|
1370
|
+
*/
|
|
1371
|
+
buildThousands(result: NumberFormatResult): string;
|
|
1372
|
+
/**
|
|
1373
|
+
* 基于步长计算值
|
|
1374
|
+
* @param number 要重新计算的数值
|
|
1375
|
+
* @param isPlus true为+,false为-
|
|
1376
|
+
* @returns 新的数值
|
|
1377
|
+
*/
|
|
1378
|
+
calcByStep(number: number, isPlus: boolean): number;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* 数值格式化结果
|
|
1382
|
+
*/
|
|
1383
|
+
type NumberFormatResult = {
|
|
1384
|
+
/**
|
|
1385
|
+
* 输入是否是有效输入
|
|
1386
|
+
* - `- 0 1 2 3 4 5 6 7 8 9 0 .`算是合法输入
|
|
1387
|
+
*/
|
|
1388
|
+
readonly valid: boolean;
|
|
1389
|
+
/**
|
|
1390
|
+
* 有效的数值
|
|
1391
|
+
* - undefined时,输入无法转换成有效的数值
|
|
1392
|
+
*/
|
|
1393
|
+
readonly number: number | undefined;
|
|
1394
|
+
/**
|
|
1395
|
+
* 数值的显示文本
|
|
1396
|
+
* - 无千分位等处理的数值显示文本
|
|
1397
|
+
* - 若需要在行内显示 千分位 格式文本,需要单独处理
|
|
1398
|
+
*/
|
|
1399
|
+
readonly text: string;
|
|
1400
|
+
/**
|
|
1401
|
+
* 格式化数值时发生的错误
|
|
1402
|
+
* - 输入数值有效,但是格式化时发生错误了
|
|
1403
|
+
*/
|
|
1404
|
+
readonly error?: string;
|
|
1405
|
+
/**
|
|
1406
|
+
* 是否是负数
|
|
1407
|
+
* - true 时说明以`-`开始;false时为正数
|
|
1408
|
+
* - 若为true,但`integerPart`为undefined,则说明仅输入了`-`
|
|
1409
|
+
*/
|
|
1410
|
+
readonly isNegative?: boolean;
|
|
1411
|
+
/**
|
|
1412
|
+
* 是否是小数
|
|
1413
|
+
* - true 时说明有小数点“.”;false 时为整数
|
|
1414
|
+
* - 若为true,但`decimalPart`为undefined,则说明是以`.`结尾,还没输入具体的小数部分
|
|
1415
|
+
*/
|
|
1416
|
+
readonly isDecimal?: boolean;
|
|
1417
|
+
/**
|
|
1418
|
+
* 数值输入的整数部分
|
|
1419
|
+
* - 取整数部分绝对值,如-1.2,仅为1
|
|
1420
|
+
*/
|
|
1421
|
+
readonly integerPart?: string;
|
|
1422
|
+
/**
|
|
1423
|
+
* 小数部分
|
|
1424
|
+
*/
|
|
1425
|
+
readonly decimalPart?: string;
|
|
1426
|
+
/**
|
|
1427
|
+
* 进行系数放大后的整数部分
|
|
1428
|
+
*/
|
|
1429
|
+
readonly integerPartAfterMultiplier?: string;
|
|
1430
|
+
/**
|
|
1431
|
+
* 进行系数放大后的小数部分
|
|
1432
|
+
*/
|
|
1433
|
+
readonly decimalPartAfterMultiplier?: string;
|
|
1434
|
+
};
|
|
1435
|
+
/**
|
|
1436
|
+
* 数值组件的事件选项
|
|
1437
|
+
*/
|
|
1438
|
+
type NumberEvents = ChangeEvents<number> & {
|
|
1439
|
+
/**
|
|
1440
|
+
* 数值发生错误时
|
|
1441
|
+
* - 若超过最大的精度范围
|
|
1442
|
+
* - 其他未知异常等
|
|
1443
|
+
* @param reason 错误原因
|
|
1444
|
+
*/
|
|
1445
|
+
error: [reason: string];
|
|
1446
|
+
/**
|
|
1447
|
+
* 小于最小值
|
|
1448
|
+
* @param value 当前值
|
|
1449
|
+
* @param minValue 最小值
|
|
1450
|
+
*/
|
|
1451
|
+
belowMin: [value: number, minValue: number];
|
|
1452
|
+
/**
|
|
1453
|
+
* 超过最大值
|
|
1454
|
+
* @param value 当前值
|
|
1455
|
+
* @param maxValue 最大值
|
|
1456
|
+
*/
|
|
1457
|
+
exceedMax: [value: number, maxValue: number];
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1136
1460
|
/**
|
|
1137
1461
|
* 图标配置选项
|
|
1138
1462
|
* - title 作为鼠标移入图标时的提示
|
|
@@ -1421,66 +1745,6 @@ type ButtonOptions = TitleOptions & {
|
|
|
1421
1745
|
type: "primary" | "default" | "link";
|
|
1422
1746
|
};
|
|
1423
1747
|
|
|
1424
|
-
/**
|
|
1425
|
-
* 基础事件实体
|
|
1426
|
-
* 1、把一些常用事件,封装为原子结构,方便复用
|
|
1427
|
-
* 2、不强制必须复用,根据自身情况
|
|
1428
|
-
*/
|
|
1429
|
-
/**
|
|
1430
|
-
* 事件:点击
|
|
1431
|
-
*/
|
|
1432
|
-
type ClickEvents = {
|
|
1433
|
-
/**
|
|
1434
|
-
* 单击事件
|
|
1435
|
-
*/
|
|
1436
|
-
click: [];
|
|
1437
|
-
};
|
|
1438
|
-
/**
|
|
1439
|
-
* 事件:值改变
|
|
1440
|
-
* - 描述值的改变过程,新值是什么,改变前的旧值是什么
|
|
1441
|
-
*/
|
|
1442
|
-
type ChangeEvents<T> = {
|
|
1443
|
-
/**
|
|
1444
|
-
* 值改变;约束新旧值
|
|
1445
|
-
* @param newValue 新值
|
|
1446
|
-
* @param oldValue 旧值
|
|
1447
|
-
*/
|
|
1448
|
-
change: [newValue: T, oldValue?: T];
|
|
1449
|
-
};
|
|
1450
|
-
/**
|
|
1451
|
-
* 事件:移动
|
|
1452
|
-
* - 可描述数据索引位置变化
|
|
1453
|
-
* - 可用于数组元素拖动排序,调整位置等逻辑
|
|
1454
|
-
*/
|
|
1455
|
-
type MoveEvents = {
|
|
1456
|
-
/**
|
|
1457
|
-
* 移动事件
|
|
1458
|
-
* @param fromIndex 从哪个索引位置开始移动
|
|
1459
|
-
* @param toIndex 移动到的索引位置
|
|
1460
|
-
*/
|
|
1461
|
-
move: [fromIndex: number, toIndex: number];
|
|
1462
|
-
};
|
|
1463
|
-
/**
|
|
1464
|
-
* 事件:删除数据
|
|
1465
|
-
* - 描述要删除的具体数据
|
|
1466
|
-
*/
|
|
1467
|
-
type DeleteEvents<T> = {
|
|
1468
|
-
/**
|
|
1469
|
-
* 删除事件
|
|
1470
|
-
* @param value 要删除的数据
|
|
1471
|
-
*/
|
|
1472
|
-
delete: [value?: T];
|
|
1473
|
-
};
|
|
1474
|
-
/**
|
|
1475
|
-
* 事件:关闭
|
|
1476
|
-
*/
|
|
1477
|
-
type CloseEvents = {
|
|
1478
|
-
/**
|
|
1479
|
-
* 关闭事件
|
|
1480
|
-
*/
|
|
1481
|
-
close: [];
|
|
1482
|
-
};
|
|
1483
|
-
|
|
1484
1748
|
/**
|
|
1485
1749
|
* 输入框配置选项
|
|
1486
1750
|
* - title 将作为 输入框标题区域文本;不传入则不展示 标题区域,仅展示输入框
|
|
@@ -1585,6 +1849,61 @@ type SwitchEvents = {
|
|
|
1585
1849
|
change: [value: boolean];
|
|
1586
1850
|
};
|
|
1587
1851
|
|
|
1852
|
+
/**
|
|
1853
|
+
* 多行文本框组件配置选项
|
|
1854
|
+
*/
|
|
1855
|
+
type TextareaOptions = ReadonlyOptions & PlaceholderOptions & {
|
|
1856
|
+
/**
|
|
1857
|
+
* 是否自适应高度
|
|
1858
|
+
* - 传入true时,根据文本框内容,自动调整高度
|
|
1859
|
+
* - 若传入maxRows,则自动高度不会超过maxRows
|
|
1860
|
+
*/
|
|
1861
|
+
autoHeight: boolean;
|
|
1862
|
+
/**
|
|
1863
|
+
* 最小行数
|
|
1864
|
+
* - 作为默认行数
|
|
1865
|
+
* - 不传入则默认4
|
|
1866
|
+
*/
|
|
1867
|
+
minRows?: number;
|
|
1868
|
+
/**
|
|
1869
|
+
* 最大行数
|
|
1870
|
+
* - 不传入则默认10
|
|
1871
|
+
* - `autoHeight`为true时生效;
|
|
1872
|
+
*/
|
|
1873
|
+
maxRows?: number;
|
|
1874
|
+
};
|
|
1875
|
+
/**
|
|
1876
|
+
* 多行文本框组件事件
|
|
1877
|
+
*/
|
|
1878
|
+
type TextareaEvents = {
|
|
1879
|
+
/**
|
|
1880
|
+
* 获取焦点时
|
|
1881
|
+
*/
|
|
1882
|
+
focus: [];
|
|
1883
|
+
/**
|
|
1884
|
+
* 输入时
|
|
1885
|
+
* @param value 输入框内容
|
|
1886
|
+
*/
|
|
1887
|
+
input: [value: string];
|
|
1888
|
+
/**
|
|
1889
|
+
* 失焦时
|
|
1890
|
+
* @param value 输入框内容
|
|
1891
|
+
*/
|
|
1892
|
+
blur: [value: string];
|
|
1893
|
+
/**
|
|
1894
|
+
* 输入框内容发生改变时
|
|
1895
|
+
* @param value 输入框内容
|
|
1896
|
+
*/
|
|
1897
|
+
change: [value: string];
|
|
1898
|
+
};
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* 使用【响应式管理器】
|
|
1902
|
+
* - 请在Vue组件的setup中使用此方法,否则 getCurrentScope 方法无法取到值
|
|
1903
|
+
* @returns 全新的【响应式管理器】+作用域
|
|
1904
|
+
*/
|
|
1905
|
+
declare function useReactive(): IReactiveManager & IScope;
|
|
1906
|
+
|
|
1588
1907
|
/**
|
|
1589
1908
|
* 树的基础组件信息
|
|
1590
1909
|
* 1、组件基础上下文 默认实现
|
|
@@ -1598,13 +1917,6 @@ type SwitchEvents = {
|
|
|
1598
1917
|
*/
|
|
1599
1918
|
declare function useTreeContext<T>(nodes: TreeNode<T, TreeNodeExtend>[], activeNodeRef?: ShallowRef<TreeNode<T, TreeNodeExtend>>): ITreeBaseContext<T> & IScope;
|
|
1600
1919
|
|
|
1601
|
-
/**
|
|
1602
|
-
* 使用【响应式管理器】
|
|
1603
|
-
* - 请在Vue组件的setup中使用此方法,否则 getCurrentScope 方法无法取到值
|
|
1604
|
-
* @returns 全新的【响应式管理器】+作用域
|
|
1605
|
-
*/
|
|
1606
|
-
declare function useReactive(): IReactiveManager & IScope;
|
|
1607
|
-
|
|
1608
1920
|
/**
|
|
1609
1921
|
* Vue App助手类,做一些app实例的辅助性工作
|
|
1610
1922
|
*/
|
|
@@ -1828,6 +2140,15 @@ type ToastOptions = {
|
|
|
1828
2140
|
* 提示消息;支持html格式
|
|
1829
2141
|
*/
|
|
1830
2142
|
message: string;
|
|
2143
|
+
/**
|
|
2144
|
+
* 提示显示时间
|
|
2145
|
+
* - 单位毫秒,默认1500ms
|
|
2146
|
+
*/
|
|
2147
|
+
duration?: number;
|
|
2148
|
+
/**
|
|
2149
|
+
* 关闭按钮是否禁用
|
|
2150
|
+
*/
|
|
2151
|
+
closeDisabled?: boolean;
|
|
1831
2152
|
};
|
|
1832
2153
|
|
|
1833
2154
|
/**
|
|
@@ -2154,6 +2475,44 @@ declare const components: {
|
|
|
2154
2475
|
};
|
|
2155
2476
|
});
|
|
2156
2477
|
Icon: vue.DefineComponent<IconOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<IconOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2478
|
+
Input: vue.DefineComponent<ReadonlyOptions & PlaceholderOptions & TitleOptions & {
|
|
2479
|
+
type?: "text" | "number" | "password";
|
|
2480
|
+
required?: boolean;
|
|
2481
|
+
titleStyle?: snail_view.BaseStyle & snail_view.WidthStyle & snail_view.FlexBoxStyle;
|
|
2482
|
+
} & {
|
|
2483
|
+
modelValue?: string;
|
|
2484
|
+
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
2485
|
+
change: (value: string) => any;
|
|
2486
|
+
click: () => any;
|
|
2487
|
+
"update:modelValue": (value: string) => any;
|
|
2488
|
+
}, string, vue.PublicProps, Readonly<ReadonlyOptions & PlaceholderOptions & TitleOptions & {
|
|
2489
|
+
type?: "text" | "number" | "password";
|
|
2490
|
+
required?: boolean;
|
|
2491
|
+
titleStyle?: snail_view.BaseStyle & snail_view.WidthStyle & snail_view.FlexBoxStyle;
|
|
2492
|
+
} & {
|
|
2493
|
+
modelValue?: string;
|
|
2494
|
+
}> & Readonly<{
|
|
2495
|
+
onChange?: (value: string) => any;
|
|
2496
|
+
onClick?: () => any;
|
|
2497
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
2498
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2499
|
+
Number: vue.DefineComponent<PlaceholderOptions & ReadonlyOptions & NumberBaseOptions & {
|
|
2500
|
+
modelValue?: number;
|
|
2501
|
+
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
2502
|
+
error: (reason: string) => any;
|
|
2503
|
+
change: (newValue: number, oldValue?: number) => any;
|
|
2504
|
+
"update:modelValue": (value: number) => any;
|
|
2505
|
+
belowMin: (value: number, minValue: number) => any;
|
|
2506
|
+
exceedMax: (value: number, maxValue: number) => any;
|
|
2507
|
+
}, string, vue.PublicProps, Readonly<PlaceholderOptions & ReadonlyOptions & NumberBaseOptions & {
|
|
2508
|
+
modelValue?: number;
|
|
2509
|
+
}> & Readonly<{
|
|
2510
|
+
onError?: (reason: string) => any;
|
|
2511
|
+
onChange?: (newValue: number, oldValue?: number) => any;
|
|
2512
|
+
"onUpdate:modelValue"?: (value: number) => any;
|
|
2513
|
+
onBelowMin?: (value: number, minValue: number) => any;
|
|
2514
|
+
onExceedMax?: (value: number, maxValue: number) => any;
|
|
2515
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2157
2516
|
Search: vue.DefineComponent<ReadonlyOptions & PlaceholderOptions & {
|
|
2158
2517
|
autoComplete?: boolean;
|
|
2159
2518
|
} & {
|
|
@@ -2209,6 +2568,31 @@ declare const components: {
|
|
|
2209
2568
|
onChange?: (value: boolean) => any;
|
|
2210
2569
|
"onUpdate:modelValue"?: (value: boolean) => any;
|
|
2211
2570
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2571
|
+
Textarea: vue.DefineComponent<ReadonlyOptions & PlaceholderOptions & {
|
|
2572
|
+
autoHeight: boolean;
|
|
2573
|
+
minRows?: number;
|
|
2574
|
+
maxRows?: number;
|
|
2575
|
+
} & {
|
|
2576
|
+
modelValue?: string;
|
|
2577
|
+
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
2578
|
+
blur: (value: string) => any;
|
|
2579
|
+
change: (value: string) => any;
|
|
2580
|
+
focus: () => any;
|
|
2581
|
+
input: (value: string) => any;
|
|
2582
|
+
"update:modelValue": (value: string) => any;
|
|
2583
|
+
}, string, vue.PublicProps, Readonly<ReadonlyOptions & PlaceholderOptions & {
|
|
2584
|
+
autoHeight: boolean;
|
|
2585
|
+
minRows?: number;
|
|
2586
|
+
maxRows?: number;
|
|
2587
|
+
} & {
|
|
2588
|
+
modelValue?: string;
|
|
2589
|
+
}> & Readonly<{
|
|
2590
|
+
onBlur?: (value: string) => any;
|
|
2591
|
+
onChange?: (value: string) => any;
|
|
2592
|
+
onFocus?: () => any;
|
|
2593
|
+
onInput?: (value: string) => any;
|
|
2594
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
2595
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2212
2596
|
Dynamic: {
|
|
2213
2597
|
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ComponentOptions & Pick<ComponentBindOptions<Record<string, any>>, "props">> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
2214
2598
|
P: {};
|
|
@@ -2371,12 +2755,14 @@ declare const components: {
|
|
|
2371
2755
|
onEnd?: (evt: SortEvent) => any;
|
|
2372
2756
|
onAdd?: (evt: SortEvent) => any;
|
|
2373
2757
|
onStart?: (evt: SortEvent) => any;
|
|
2758
|
+
onMove?: (evt: SortEvent, originalEvent: SortEvent) => any;
|
|
2374
2759
|
onRemove?: (evt: SortEvent) => any;
|
|
2375
2760
|
onUpdate?: (oldIndex: number, newIndex: number) => any;
|
|
2376
2761
|
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
2377
2762
|
end: (evt: SortEvent) => any;
|
|
2378
2763
|
add: (evt: SortEvent) => any;
|
|
2379
2764
|
start: (evt: SortEvent) => any;
|
|
2765
|
+
move: (evt: SortEvent, originalEvent: SortEvent) => any;
|
|
2380
2766
|
remove: (evt: SortEvent) => any;
|
|
2381
2767
|
update: (oldIndex: number, newIndex: number) => any;
|
|
2382
2768
|
}, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
@@ -2401,6 +2787,7 @@ declare const components: {
|
|
|
2401
2787
|
onEnd?: (evt: SortEvent) => any;
|
|
2402
2788
|
onAdd?: (evt: SortEvent) => any;
|
|
2403
2789
|
onStart?: (evt: SortEvent) => any;
|
|
2790
|
+
onMove?: (evt: SortEvent, originalEvent: SortEvent) => any;
|
|
2404
2791
|
onRemove?: (evt: SortEvent) => any;
|
|
2405
2792
|
onUpdate?: (oldIndex: number, newIndex: number) => any;
|
|
2406
2793
|
}>, {}, {}, {}, {}, {}>;
|
|
@@ -2422,12 +2809,14 @@ declare const components: {
|
|
|
2422
2809
|
onEnd?: (evt: SortEvent) => any;
|
|
2423
2810
|
onAdd?: (evt: SortEvent) => any;
|
|
2424
2811
|
onStart?: (evt: SortEvent) => any;
|
|
2812
|
+
onMove?: (evt: SortEvent, originalEvent: SortEvent) => any;
|
|
2425
2813
|
onRemove?: (evt: SortEvent) => any;
|
|
2426
2814
|
onUpdate?: (oldIndex: number, newIndex: number) => any;
|
|
2427
2815
|
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
2428
2816
|
end: (evt: SortEvent) => any;
|
|
2429
2817
|
add: (evt: SortEvent) => any;
|
|
2430
2818
|
start: (evt: SortEvent) => any;
|
|
2819
|
+
move: (evt: SortEvent, originalEvent: SortEvent) => any;
|
|
2431
2820
|
remove: (evt: SortEvent) => any;
|
|
2432
2821
|
update: (oldIndex: number, newIndex: number) => any;
|
|
2433
2822
|
}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
@@ -2490,6 +2879,23 @@ declare const components: {
|
|
|
2490
2879
|
default?: (props: {}) => any;
|
|
2491
2880
|
};
|
|
2492
2881
|
});
|
|
2882
|
+
Transitions: {
|
|
2883
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<TransitionOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
2884
|
+
P: {};
|
|
2885
|
+
B: {};
|
|
2886
|
+
D: {};
|
|
2887
|
+
C: {};
|
|
2888
|
+
M: {};
|
|
2889
|
+
Defaults: {};
|
|
2890
|
+
}, Readonly<TransitionOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
2891
|
+
__isFragment?: never;
|
|
2892
|
+
__isTeleport?: never;
|
|
2893
|
+
__isSuspense?: never;
|
|
2894
|
+
} & vue.ComponentOptionsBase<Readonly<TransitionOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
2895
|
+
$slots: {
|
|
2896
|
+
default?: (props: {}) => any;
|
|
2897
|
+
};
|
|
2898
|
+
});
|
|
2493
2899
|
Tree: {
|
|
2494
2900
|
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
2495
2901
|
nodes: TreeNodeModel<any>[];
|
|
@@ -2581,27 +2987,6 @@ declare const components: {
|
|
|
2581
2987
|
default?: (props: {}) => any;
|
|
2582
2988
|
};
|
|
2583
2989
|
});
|
|
2584
|
-
Input: vue.DefineComponent<ReadonlyOptions & PlaceholderOptions & TitleOptions & {
|
|
2585
|
-
type?: "text" | "number" | "password";
|
|
2586
|
-
required?: boolean;
|
|
2587
|
-
titleStyle?: snail_view.BaseStyle & snail_view.WidthStyle & snail_view.FlexBoxStyle;
|
|
2588
|
-
} & {
|
|
2589
|
-
modelValue?: string;
|
|
2590
|
-
}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
2591
|
-
change: (value: string) => any;
|
|
2592
|
-
click: () => any;
|
|
2593
|
-
"update:modelValue": (value: string) => any;
|
|
2594
|
-
}, string, vue.PublicProps, Readonly<ReadonlyOptions & PlaceholderOptions & TitleOptions & {
|
|
2595
|
-
type?: "text" | "number" | "password";
|
|
2596
|
-
required?: boolean;
|
|
2597
|
-
titleStyle?: snail_view.BaseStyle & snail_view.WidthStyle & snail_view.FlexBoxStyle;
|
|
2598
|
-
} & {
|
|
2599
|
-
modelValue?: string;
|
|
2600
|
-
}> & Readonly<{
|
|
2601
|
-
onChange?: (value: string) => any;
|
|
2602
|
-
onClick?: () => any;
|
|
2603
|
-
"onUpdate:modelValue"?: (value: string) => any;
|
|
2604
|
-
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2605
2990
|
DragVerify: vue.DefineComponent<DragVerifyOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
2606
2991
|
success: () => any;
|
|
2607
2992
|
}, string, vue.PublicProps, Readonly<DragVerifyOptions> & Readonly<{
|
|
@@ -2644,4 +3029,4 @@ declare const components: {
|
|
|
2644
3029
|
};
|
|
2645
3030
|
|
|
2646
3031
|
export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive, useTreeContext };
|
|
2647
|
-
export type { ButtonOptions, ChangeEvents, ChooseEvents, ChooseItem, ChooseOptions, ClickEvents, CloseEvents, ComponentBindOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DatePickerEvents, DatepickerOptions, DeleteEvents, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, EmitterType, EmptyOptions, EventsType, FoldEvents, FoldOptions, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IPopupManager, IReactiveManager, ISelectContext, ITreeBaseContext, IconOptions, IconType, InputEvents, InputOptions, LayoutOptions, LoadingOptions, MessageOptions, MoveEvents, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, PropsType, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollOptions, ScrollStatus, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupEvents, SelectPopupExtend, SelectPopupOptions, SelectSlotOptions, SortEvent, SortEvents, SortGroupOptions, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult, ValueOptions, WrapperEvents, WrapperOptions };
|
|
3032
|
+
export type { ButtonOptions, ChangeEvents, ChooseEvents, ChooseItem, ChooseOptions, ClickEvents, CloseEvents, ComponentBindOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DatePickerEvents, DatepickerOptions, DeleteEvents, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, EmitterType, EmptyOptions, EventsType, FoldEvents, FoldOptions, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, INumberFormatter, IPopupManager, IReactiveManager, ISelectContext, ITreeBaseContext, IconOptions, IconType, InputEvents, InputOptions, LayoutOptions, LoadingOptions, MessageOptions, MoveEvents, NumberBaseOptions, NumberEvents, NumberFormatResult, NumberOptions, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, PropsType, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollOptions, ScrollStatus, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupEvents, SelectPopupExtend, SelectPopupOptions, SelectSlotOptions, SortEvent, SortEvents, SortGroupHook, SortGroupOptions, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TextareaEvents, TextareaOptions, TitleOptions, ToastOptions, TransitionEffectOptions, TransitionOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult, ValueOptions, WrapperEvents, WrapperOptions };
|