uview-plus 3.3.37 → 3.3.38
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/changelog.md +5 -0
- package/components/u-album/album.js +2 -1
- package/components/u-album/props.js +5 -0
- package/components/u-album/u-album.vue +2 -0
- package/components/u-upload/u-upload.vue +45 -28
- package/libs/util/gcanvas/bridge/bridge-weex.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
- package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
- package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
- package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
- package/libs/util/gcanvas/context-webgl/Program.js +0 -0
- package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
- package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
- package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
- package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
- package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
- package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
- package/libs/util/gcanvas/env/canvas.js +0 -0
- package/libs/util/gcanvas/env/image.js +0 -0
- package/libs/util/gcanvas/env/tool.js +0 -0
- package/libs/util/gcanvas/index.js +0 -0
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:src="item.thumb || item.url"
|
|
13
13
|
:mode="imageMode"
|
|
14
14
|
class="u-upload__wrap__preview__image"
|
|
15
|
-
@tap="onPreviewImage(item)"
|
|
15
|
+
@tap="onPreviewImage(item, index)"
|
|
16
16
|
:style="[{
|
|
17
17
|
width: addUnit(width),
|
|
18
18
|
height: addUnit(height)
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<view
|
|
22
22
|
v-else
|
|
23
23
|
class="u-upload__wrap__preview__other"
|
|
24
|
-
@tap="onClickPreview(
|
|
24
|
+
@tap="onClickPreview(item, index)"
|
|
25
25
|
>
|
|
26
26
|
<u-icon
|
|
27
27
|
color="#80CBF9"
|
|
@@ -334,50 +334,67 @@
|
|
|
334
334
|
);
|
|
335
335
|
},
|
|
336
336
|
// 预览图片
|
|
337
|
-
onPreviewImage(
|
|
338
|
-
if (!
|
|
337
|
+
onPreviewImage(previewItem, index) {
|
|
338
|
+
if (!previewItem.isImage || !this.previewFullImage) return
|
|
339
|
+
let current = 0;
|
|
340
|
+
const urls = [];
|
|
341
|
+
let imageIndex = 0;
|
|
342
|
+
for (var i = 0; i < this.lists.length; i++) {
|
|
343
|
+
const item = this.lists[i];
|
|
344
|
+
if (item.isImage || (item.type && item.type === 'image')) {
|
|
345
|
+
urls.push(item.url || item.thumb);
|
|
346
|
+
if (i === index) {
|
|
347
|
+
current = imageIndex;
|
|
348
|
+
}
|
|
349
|
+
imageIndex += 1;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
if (urls.length < 1) {
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
339
355
|
uni.previewImage({
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
current: item.url || item.thumb,
|
|
356
|
+
urls: urls,
|
|
357
|
+
current: current,
|
|
343
358
|
fail() {
|
|
344
359
|
toast('预览图片失败')
|
|
345
360
|
},
|
|
346
361
|
});
|
|
347
362
|
},
|
|
348
|
-
onPreviewVideo(
|
|
363
|
+
onPreviewVideo(index) {
|
|
349
364
|
if (!this.previewFullImage) return;
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
365
|
+
let current = 0;
|
|
366
|
+
const sources = [];
|
|
367
|
+
let videoIndex = 0;
|
|
368
|
+
for (var i = 0; i < this.lists.length; i++) {
|
|
369
|
+
const item = this.lists[i];
|
|
370
|
+
if (item.isVideo || (item.type && item.type === 'video')) {
|
|
371
|
+
sources.push(Object.assign(Object.assign({}, item), {
|
|
372
|
+
type: 'video'
|
|
373
|
+
}));
|
|
374
|
+
if (i === index) {
|
|
375
|
+
current = videoIndex;
|
|
376
|
+
}
|
|
377
|
+
videoIndex += 1;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (sources.length < 1) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
356
383
|
// #ifdef MP-WEIXIN
|
|
357
384
|
wx.previewMedia({
|
|
358
|
-
sources:
|
|
359
|
-
|
|
360
|
-
.map((item) =>
|
|
361
|
-
Object.assign(Object.assign({}, item), {
|
|
362
|
-
type: 'video'
|
|
363
|
-
})
|
|
364
|
-
),
|
|
365
|
-
current: index,
|
|
385
|
+
sources: sources,
|
|
386
|
+
current: current,
|
|
366
387
|
fail() {
|
|
367
388
|
toast('预览视频失败')
|
|
368
389
|
},
|
|
369
390
|
});
|
|
370
391
|
// #endif
|
|
371
392
|
},
|
|
372
|
-
onClickPreview(
|
|
373
|
-
const {
|
|
374
|
-
index
|
|
375
|
-
} = event.currentTarget.dataset;
|
|
376
|
-
const item = this.data.lists[index];
|
|
393
|
+
onClickPreview(item, index) {
|
|
377
394
|
if (!this.previewFullImage) return;
|
|
378
395
|
switch (item.type) {
|
|
379
396
|
case 'video':
|
|
380
|
-
this.onPreviewVideo(
|
|
397
|
+
this.onPreviewVideo(index);
|
|
381
398
|
break;
|
|
382
399
|
default:
|
|
383
400
|
break;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|