@dcloudio/uni-app-x 0.7.43 → 0.7.45

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.
@@ -33,11 +33,99 @@ export interface IPreviewImageError extends IUniError {
33
33
  export type PreviewImageSuccess = {
34
34
  /**
35
35
  * 调用API的名称
36
- */
36
+ * @uniPlatform {
37
+ * "mp": {
38
+ * "weixin": {
39
+ * "hostVer": "√",
40
+ * "uniVer": "√",
41
+ * "unixVer": "4.41"
42
+ * },
43
+ * "alipay": {
44
+ * "hostVer": "-",
45
+ * "uniVer": "-",
46
+ * "unixVer": "-"
47
+ * },
48
+ * "baidu": {
49
+ * "hostVer": "-",
50
+ * "uniVer": "-",
51
+ * "unixVer": "-"
52
+ * },
53
+ * "toutiao": {
54
+ * "hostVer": "-",
55
+ * "uniVer": "-",
56
+ * "unixVer": "-"
57
+ * },
58
+ * "lark": {
59
+ * "hostVer": "-",
60
+ * "uniVer": "-",
61
+ * "unixVer": "-"
62
+ * },
63
+ * "qq": {
64
+ * "hostVer": "-",
65
+ * "uniVer": "-",
66
+ * "unixVer": "-"
67
+ * },
68
+ * "kuaishou": {
69
+ * "hostVer": "-",
70
+ * "uniVer": "-",
71
+ * "unixVer": "-"
72
+ * },
73
+ * "jd": {
74
+ * "hostVer": "-",
75
+ * "uniVer": "-",
76
+ * "unixVer": "-"
77
+ * }
78
+ * }
79
+ * }
80
+ */
37
81
  errSubject : string,
38
82
  /**
39
83
  * 描述信息
40
- */
84
+ * @uniPlatform {
85
+ * "mp": {
86
+ * "weixin": {
87
+ * "hostVer": "√",
88
+ * "uniVer": "√",
89
+ * "unixVer": "4.41"
90
+ * },
91
+ * "alipay": {
92
+ * "hostVer": "-",
93
+ * "uniVer": "-",
94
+ * "unixVer": "-"
95
+ * },
96
+ * "baidu": {
97
+ * "hostVer": "-",
98
+ * "uniVer": "-",
99
+ * "unixVer": "-"
100
+ * },
101
+ * "toutiao": {
102
+ * "hostVer": "-",
103
+ * "uniVer": "-",
104
+ * "unixVer": "-"
105
+ * },
106
+ * "lark": {
107
+ * "hostVer": "-",
108
+ * "uniVer": "-",
109
+ * "unixVer": "-"
110
+ * },
111
+ * "qq": {
112
+ * "hostVer": "-",
113
+ * "uniVer": "-",
114
+ * "unixVer": "-"
115
+ * },
116
+ * "kuaishou": {
117
+ * "hostVer": "-",
118
+ * "uniVer": "-",
119
+ * "unixVer": "-"
120
+ * },
121
+ * "jd": {
122
+ * "hostVer": "-",
123
+ * "uniVer": "-",
124
+ * "unixVer": "-"
125
+ * }
126
+ * }
127
+ * }
128
+ */
41
129
  errMsg : string
42
130
  }
43
131
  export type PreviewImageFail = IPreviewImageError;
@@ -81,20 +169,199 @@ export type LongPressActionsOptions = {
81
169
  };
82
170
 
83
171
  export type PreviewImageOptions = {
84
-
85
172
  /**
86
173
  * current 为当前显示图片的链接/索引值,不填或填写的值无效则为 urls 的第一张。APP平台仅支持索引值。
87
174
  * @type string | number
88
- */
175
+ * @uniPlatform {
176
+ * "mp": {
177
+ * "weixin": {
178
+ * "hostVer": "√",
179
+ * "uniVer": "√",
180
+ * "unixVer": "4.41"
181
+ * },
182
+ * "alipay": {
183
+ * "hostVer": "-",
184
+ * "uniVer": "-",
185
+ * "unixVer": "-"
186
+ * },
187
+ * "baidu": {
188
+ * "hostVer": "-",
189
+ * "uniVer": "-",
190
+ * "unixVer": "-"
191
+ * },
192
+ * "toutiao": {
193
+ * "hostVer": "-",
194
+ * "uniVer": "-",
195
+ * "unixVer": "-"
196
+ * },
197
+ * "lark": {
198
+ * "hostVer": "-",
199
+ * "uniVer": "-",
200
+ * "unixVer": "-"
201
+ * },
202
+ * "qq": {
203
+ * "hostVer": "-",
204
+ * "uniVer": "-",
205
+ * "unixVer": "-"
206
+ * },
207
+ * "kuaishou": {
208
+ * "hostVer": "-",
209
+ * "uniVer": "-",
210
+ * "unixVer": "-"
211
+ * },
212
+ * "jd": {
213
+ * "hostVer": "-",
214
+ * "uniVer": "-",
215
+ * "unixVer": "-"
216
+ * }
217
+ * }
218
+ * }
219
+ */
89
220
  current ?: any | null,
90
221
  /**
91
222
  * 需要预览的图片链接列表
92
- */
223
+ * @uniPlatform {
224
+ * "mp": {
225
+ * "weixin": {
226
+ * "hostVer": "√",
227
+ * "uniVer": "√",
228
+ * "unixVer": "4.41"
229
+ * },
230
+ * "alipay": {
231
+ * "hostVer": "-",
232
+ * "uniVer": "-",
233
+ * "unixVer": "-"
234
+ * },
235
+ * "baidu": {
236
+ * "hostVer": "-",
237
+ * "uniVer": "-",
238
+ * "unixVer": "-"
239
+ * },
240
+ * "toutiao": {
241
+ * "hostVer": "-",
242
+ * "uniVer": "-",
243
+ * "unixVer": "-"
244
+ * },
245
+ * "lark": {
246
+ * "hostVer": "-",
247
+ * "uniVer": "-",
248
+ * "unixVer": "-"
249
+ * },
250
+ * "qq": {
251
+ * "hostVer": "-",
252
+ * "uniVer": "-",
253
+ * "unixVer": "-"
254
+ * },
255
+ * "kuaishou": {
256
+ * "hostVer": "-",
257
+ * "uniVer": "-",
258
+ * "unixVer": "-"
259
+ * },
260
+ * "jd": {
261
+ * "hostVer": "-",
262
+ * "uniVer": "-",
263
+ * "unixVer": "-"
264
+ * }
265
+ * }
266
+ * }
267
+ */
93
268
  urls : Array<string.ImageURIString>,
269
+ /**
270
+ * 是否显示长按菜单
271
+ *
272
+ * @uniPlatform {
273
+ * "app": {
274
+ * "android": {
275
+ * "osVer": "5.0",
276
+ * "uniVer": "√",
277
+ * "unixVer": "x"
278
+ * },
279
+ * "ios": {
280
+ * "osVer": "10.0",
281
+ * "uniVer": "√",
282
+ * "unixVer": "x"
283
+ * },
284
+ * "harmony": {
285
+ * "osVer": "3.0",
286
+ * "uniVer": "4.23",
287
+ * "unixVer": "x"
288
+ * }
289
+ * },
290
+ * "mp": {
291
+ * "weixin": {
292
+ * "hostVer": "√",
293
+ * "uniVer": "√",
294
+ * "unixVer": "4.41"
295
+ * },
296
+ * "alipay": {
297
+ * "hostVer": "√",
298
+ * "uniVer": "√",
299
+ * "unixVer": "x"
300
+ * },
301
+ * "baidu": {
302
+ * "hostVer": "√",
303
+ * "uniVer": "√",
304
+ * "unixVer": "x"
305
+ * },
306
+ * "toutiao": {
307
+ * "hostVer": "√",
308
+ * "uniVer": "√",
309
+ * "unixVer": "x"
310
+ * },
311
+ * "lark": {
312
+ * "hostVer": "√",
313
+ * "uniVer": "√",
314
+ * "unixVer": "x"
315
+ * },
316
+ * "qq": {
317
+ * "hostVer": "√",
318
+ * "uniVer": "√",
319
+ * "unixVer": "x"
320
+ * },
321
+ * "kuaishou": {
322
+ * "hostVer": "√",
323
+ * "uniVer": "√",
324
+ * "unixVer": "x"
325
+ * },
326
+ * "jd": {
327
+ * "hostVer": "√",
328
+ * "uniVer": "√",
329
+ * "unixVer": "x"
330
+ * }
331
+ * },
332
+ * "web": {
333
+ * "uniVer": "√",
334
+ * "unixVer": "x"
335
+ * }
336
+ * }
337
+ */
338
+ showmenu ?: boolean | null,
94
339
  /**
95
340
  * 图片指示器样式
96
- * @default number
97
341
  *
342
+ * @uniPlatform {
343
+ * "app": {
344
+ * "android": {
345
+ * "osVer": "5.0",
346
+ * "uniVer": "√",
347
+ * "unixVer": "3.9"
348
+ * },
349
+ * "ios": {
350
+ * "osVer": "10.0",
351
+ * "uniVer": "√",
352
+ * "unixVer": "4.11"
353
+ * },
354
+ * "harmony": {
355
+ * "osVer": "x",
356
+ * "uniVer": "x",
357
+ * "unixVer": "x"
358
+ * }
359
+ * },
360
+ * "web": {
361
+ * "uniVer": "√",
362
+ * "unixVer": "x"
363
+ * }
364
+ * }
98
365
  */
99
366
  indicator ?:
100
367
  /**
@@ -113,25 +380,296 @@ export type PreviewImageOptions = {
113
380
  /**
114
381
  * 是否可循环预览
115
382
  * @type boolean
116
- * @default true
383
+ * @uniPlatform {
384
+ * "app": {
385
+ * "android": {
386
+ * "osVer": "5.0",
387
+ * "uniVer": "√",
388
+ * "unixVer": "3.9"
389
+ * },
390
+ * "ios": {
391
+ * "osVer": "10.0",
392
+ * "uniVer": "√",
393
+ * "unixVer": "4.11"
394
+ * },
395
+ * "harmony": {
396
+ * "osVer": "x",
397
+ * "uniVer": "x",
398
+ * "unixVer": "x"
399
+ * }
400
+ * },
401
+ * "web": {
402
+ * "uniVer": "√",
403
+ * "unixVer": "x"
404
+ * }
405
+ * }
117
406
  */
118
407
  loop ?: boolean | null,
119
408
  /**
120
- * 长按图片显示操作菜单,如不填默认为保存相册。
409
+ * 长按图片显示操作菜单。
410
+ * @uniPlatform {
411
+ * "app": {
412
+ * "android": {
413
+ * "osVer": "5.0",
414
+ * "uniVer": "√",
415
+ * "unixVer": "4.51"
416
+ * },
417
+ * "ios": {
418
+ * "osVer": "5.0",
419
+ * "uniVer": "√",
420
+ * "unixVer": "4.51"
421
+ * },
422
+ * "harmony": {
423
+ * "osVer": "x",
424
+ * "uniVer": "x",
425
+ * "unixVer": "x"
426
+ * }
427
+ * },
428
+ * "web": {
429
+ * "osVer": "x",
430
+ * "uniVer": "x",
431
+ * "unixVer": "x"
432
+ * },
433
+ * "mp": {
434
+ * "weixin": {
435
+ * "hostVer": "√",
436
+ * "uniVer": "√",
437
+ * "unixVer": "4.41"
438
+ * },
439
+ * "alipay": {
440
+ * "hostVer": "√",
441
+ * "uniVer": "√",
442
+ * "unixVer": "x"
443
+ * },
444
+ * "baidu": {
445
+ * "hostVer": "√",
446
+ * "uniVer": "√",
447
+ * "unixVer": "x"
448
+ * },
449
+ * "toutiao": {
450
+ * "hostVer": "√",
451
+ * "uniVer": "√",
452
+ * "unixVer": "x"
453
+ * },
454
+ * "lark": {
455
+ * "hostVer": "√",
456
+ * "uniVer": "√",
457
+ * "unixVer": "x"
458
+ * },
459
+ * "qq": {
460
+ * "hostVer": "√",
461
+ * "uniVer": "√",
462
+ * "unixVer": "x"
463
+ * },
464
+ * "kuaishou": {
465
+ * "hostVer": "√",
466
+ * "uniVer": "√",
467
+ * "unixVer": "x"
468
+ * },
469
+ * "jd": {
470
+ * "hostVer": "√",
471
+ * "uniVer": "√",
472
+ * "unixVer": "x"
473
+ * }
474
+ * }
475
+ * }
121
476
  */
122
477
  longPressActions ?: LongPressActionsOptions | null,
123
478
  /**
124
479
  * 接口调用成功的回调函数
125
- */
480
+ * @uniPlatform {
481
+ * "mp": {
482
+ * "weixin": {
483
+ * "hostVer": "√",
484
+ * "uniVer": "√",
485
+ * "unixVer": "4.41"
486
+ * },
487
+ * "alipay": {
488
+ * "hostVer": "-",
489
+ * "uniVer": "-",
490
+ * "unixVer": "-"
491
+ * },
492
+ * "baidu": {
493
+ * "hostVer": "-",
494
+ * "uniVer": "-",
495
+ * "unixVer": "-"
496
+ * },
497
+ * "toutiao": {
498
+ * "hostVer": "-",
499
+ * "uniVer": "-",
500
+ * "unixVer": "-"
501
+ * },
502
+ * "lark": {
503
+ * "hostVer": "-",
504
+ * "uniVer": "-",
505
+ * "unixVer": "-"
506
+ * },
507
+ * "qq": {
508
+ * "hostVer": "-",
509
+ * "uniVer": "-",
510
+ * "unixVer": "-"
511
+ * },
512
+ * "kuaishou": {
513
+ * "hostVer": "-",
514
+ * "uniVer": "-",
515
+ * "unixVer": "-"
516
+ * },
517
+ * "jd": {
518
+ * "hostVer": "-",
519
+ * "uniVer": "-",
520
+ * "unixVer": "-"
521
+ * }
522
+ * }
523
+ * }
524
+ */
126
525
  success ?: (PreviewImageSuccessCallback) | null,
127
526
  /**
128
527
  * 接口调用失败的回调函数
129
- */
528
+ * @uniPlatform {
529
+ * "mp": {
530
+ * "weixin": {
531
+ * "hostVer": "√",
532
+ * "uniVer": "√",
533
+ * "unixVer": "4.41"
534
+ * },
535
+ * "alipay": {
536
+ * "hostVer": "-",
537
+ * "uniVer": "-",
538
+ * "unixVer": "-"
539
+ * },
540
+ * "baidu": {
541
+ * "hostVer": "-",
542
+ * "uniVer": "-",
543
+ * "unixVer": "-"
544
+ * },
545
+ * "toutiao": {
546
+ * "hostVer": "-",
547
+ * "uniVer": "-",
548
+ * "unixVer": "-"
549
+ * },
550
+ * "lark": {
551
+ * "hostVer": "-",
552
+ * "uniVer": "-",
553
+ * "unixVer": "-"
554
+ * },
555
+ * "qq": {
556
+ * "hostVer": "-",
557
+ * "uniVer": "-",
558
+ * "unixVer": "-"
559
+ * },
560
+ * "kuaishou": {
561
+ * "hostVer": "-",
562
+ * "uniVer": "-",
563
+ * "unixVer": "-"
564
+ * },
565
+ * "jd": {
566
+ * "hostVer": "-",
567
+ * "uniVer": "-",
568
+ * "unixVer": "-"
569
+ * }
570
+ * }
571
+ * }
572
+ */
130
573
  fail ?: (PreviewImageFailCallback) | null,
131
574
  /**
132
575
  * 接口调用结束的回调函数(调用成功、失败都会执行)
133
- */
576
+ * @uniPlatform {
577
+ * "mp": {
578
+ * "weixin": {
579
+ * "hostVer": "√",
580
+ * "uniVer": "√",
581
+ * "unixVer": "4.41"
582
+ * },
583
+ * "alipay": {
584
+ * "hostVer": "-",
585
+ * "uniVer": "-",
586
+ * "unixVer": "-"
587
+ * },
588
+ * "baidu": {
589
+ * "hostVer": "-",
590
+ * "uniVer": "-",
591
+ * "unixVer": "-"
592
+ * },
593
+ * "toutiao": {
594
+ * "hostVer": "-",
595
+ * "uniVer": "-",
596
+ * "unixVer": "-"
597
+ * },
598
+ * "lark": {
599
+ * "hostVer": "-",
600
+ * "uniVer": "-",
601
+ * "unixVer": "-"
602
+ * },
603
+ * "qq": {
604
+ * "hostVer": "-",
605
+ * "uniVer": "-",
606
+ * "unixVer": "-"
607
+ * },
608
+ * "kuaishou": {
609
+ * "hostVer": "-",
610
+ * "uniVer": "-",
611
+ * "unixVer": "-"
612
+ * },
613
+ * "jd": {
614
+ * "hostVer": "-",
615
+ * "uniVer": "-",
616
+ * "unixVer": "-"
617
+ * }
618
+ * }
619
+ * }
620
+ */
134
621
  complete ?: (PreviewImageCompleteCallback) | null
622
+ /**
623
+ * 需要基础库: `2.13.0`
624
+ *
625
+ * `origin`: 发送完整的referrer; `no-referrer`: 不发送。格式固定为 `https://servicewechat.com/{appid}/{version}/page-frame.html`,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
626
+ *
627
+ * @uniPlatform {
628
+ * "mp": {
629
+ * "weixin": {
630
+ * "hostVer": "2.13.0",
631
+ * "uniVer": "√",
632
+ * "unixVer": "4.41"
633
+ * },
634
+ * "alipay": {
635
+ * "hostVer": "-",
636
+ * "uniVer": "-",
637
+ * "unixVer": "-"
638
+ * },
639
+ * "baidu": {
640
+ * "hostVer": "-",
641
+ * "uniVer": "-",
642
+ * "unixVer": "-"
643
+ * },
644
+ * "toutiao": {
645
+ * "hostVer": "-",
646
+ * "uniVer": "-",
647
+ * "unixVer": "-"
648
+ * },
649
+ * "lark": {
650
+ * "hostVer": "-",
651
+ * "uniVer": "-",
652
+ * "unixVer": "-"
653
+ * },
654
+ * "qq": {
655
+ * "hostVer": "-",
656
+ * "uniVer": "-",
657
+ * "unixVer": "-"
658
+ * },
659
+ * "kuaishou": {
660
+ * "hostVer": "-",
661
+ * "uniVer": "-",
662
+ * "unixVer": "-"
663
+ * },
664
+ * "jd": {
665
+ * "hostVer": "-",
666
+ * "uniVer": "-",
667
+ * "unixVer": "-"
668
+ * }
669
+ * }
670
+ * }
671
+ */
672
+ referrerPolicy?: string | null;
135
673
  };
136
674
 
137
675
  export type PreviewImage = (options : PreviewImageOptions) => void;
@@ -169,70 +707,70 @@ export interface Uni {
169
707
  * 预览图片
170
708
  * @description 预览图片
171
709
  * @uniPlatform {
172
- * "app": {
173
- * "android": {
174
- * "osVer": "5.0",
175
- * "uniVer": "√",
176
- * "unixVer": "3.9+"
177
- * },
178
- * "ios": {
179
- * "osVer": "12.0",
180
- * "uniVer": "√",
181
- * "unixVer": "4.11"
182
- * },
183
- * "harmony": {
184
- * "osVer": "3.0",
185
- * "uniVer": "4.23",
186
- * "unixVer": "x"
187
- * }
188
- * },
189
- * "web": {
190
- * "uniVer": "√",
191
- * "unixVer": "4.0"
192
- * },
193
- * "mp": {
194
- * "weixin": {
195
- * "hostVer": "",
196
- * "uniVer": "√",
197
- * "unixVer": "4.41"
198
- * },
199
- * "alipay": {
200
- * "hostVer": "√",
201
- * "uniVer": "√",
202
- * "unixVer": "x"
203
- * },
204
- * "baidu": {
205
- * "hostVer": "√",
206
- * "uniVer": "√",
207
- * "unixVer": "x"
208
- * },
209
- * "toutiao": {
210
- * "hostVer": "√",
211
- * "uniVer": "√",
212
- * "unixVer": "x"
213
- * },
214
- * "lark": {
215
- * "hostVer": "√",
216
- * "uniVer": "√",
217
- * "unixVer": "x"
218
- * },
219
- * "qq": {
220
- * "hostVer": "√",
221
- * "uniVer": "√",
222
- * "unixVer": "x"
223
- * },
224
- * "kuaishou": {
225
- * "hostVer": "√",
226
- * "uniVer": "√",
227
- * "unixVer": "x"
228
- * },
229
- * "jd": {
230
- * "hostVer": "x",
231
- * "uniVer": "x",
232
- * "unixVer": "x"
233
- * }
234
- * }
235
- * }
710
+ * "app": {
711
+ * "android": {
712
+ * "osVer": "5.0",
713
+ * "uniVer": "√",
714
+ * "unixVer": "3.9+"
715
+ * },
716
+ * "ios": {
717
+ * "osVer": "12.0",
718
+ * "uniVer": "√",
719
+ * "unixVer": "4.11"
720
+ * },
721
+ * "harmony": {
722
+ * "osVer": "3.0",
723
+ * "uniVer": "4.23",
724
+ * "unixVer": "x"
725
+ * }
726
+ * },
727
+ * "web": {
728
+ * "uniVer": "√",
729
+ * "unixVer": "4.0"
730
+ * },
731
+ * "mp": {
732
+ * "weixin": {
733
+ * "hostVer": "1.9.6",
734
+ * "uniVer": "√",
735
+ * "unixVer": "4.41"
736
+ * },
737
+ * "alipay": {
738
+ * "hostVer": "√",
739
+ * "uniVer": "√",
740
+ * "unixVer": "x"
741
+ * },
742
+ * "baidu": {
743
+ * "hostVer": "√",
744
+ * "uniVer": "√",
745
+ * "unixVer": "x"
746
+ * },
747
+ * "toutiao": {
748
+ * "hostVer": "√",
749
+ * "uniVer": "√",
750
+ * "unixVer": "x"
751
+ * },
752
+ * "lark": {
753
+ * "hostVer": "√",
754
+ * "uniVer": "√",
755
+ * "unixVer": "x"
756
+ * },
757
+ * "qq": {
758
+ * "hostVer": "√",
759
+ * "uniVer": "√",
760
+ * "unixVer": "x"
761
+ * },
762
+ * "kuaishou": {
763
+ * "hostVer": "√",
764
+ * "uniVer": "√",
765
+ * "unixVer": "x"
766
+ * },
767
+ * "jd": {
768
+ * "hostVer": "x",
769
+ * "uniVer": "x",
770
+ * "unixVer": "x"
771
+ * }
772
+ * }
773
+ * }
236
774
  * @uniVueVersion 2,3
237
775
  * @example
238
776
  * ```typescript
@@ -249,7 +787,8 @@ export interface Uni {
249
787
  * @autotest {
250
788
  generated:false
251
789
  }
252
- */
790
+ * @tutorial_weixin https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.previewImage.html
791
+ */
253
792
  previewImage(options : PreviewImageOptions) : void;
254
793
  /**
255
794
  * 关闭图片预览