@asd20/ui 3.2.555 → 3.2.556
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/package.json
CHANGED
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
}"
|
|
25
25
|
></span>
|
|
26
26
|
</div>
|
|
27
|
+
<div class="asd20-swipe__download">
|
|
28
|
+
<button @click.stop.prevent="download" name="Download">
|
|
29
|
+
<span><b>↓ Download</b></span>
|
|
30
|
+
</button>
|
|
31
|
+
</div>
|
|
27
32
|
</slot>
|
|
28
33
|
</div>
|
|
29
34
|
<div v-if="showArrows && childLen > 1" class="asd20-swipe__arrows">
|
|
@@ -77,6 +82,10 @@ export default {
|
|
|
77
82
|
type: Number,
|
|
78
83
|
default: 0,
|
|
79
84
|
},
|
|
85
|
+
imageThumbnails: {
|
|
86
|
+
type: Array,
|
|
87
|
+
default: () => [],
|
|
88
|
+
},
|
|
80
89
|
},
|
|
81
90
|
data() {
|
|
82
91
|
return {
|
|
@@ -324,6 +333,9 @@ export default {
|
|
|
324
333
|
this.diff = -this.wrapWidth * this.cur
|
|
325
334
|
}
|
|
326
335
|
},
|
|
336
|
+
download() {
|
|
337
|
+
window.open(this.imageThumbnails[this.index].url, '_blank')
|
|
338
|
+
},
|
|
327
339
|
},
|
|
328
340
|
}
|
|
329
341
|
</script>
|
|
@@ -341,11 +353,14 @@ export default {
|
|
|
341
353
|
}
|
|
342
354
|
&__indicator {
|
|
343
355
|
position: absolute;
|
|
356
|
+
display: flex;
|
|
357
|
+
flex-direction: column;
|
|
358
|
+
justify-content: center;
|
|
359
|
+
flex-shrink: 1;
|
|
344
360
|
bottom: 0;
|
|
345
361
|
left: 0;
|
|
346
362
|
right: 0;
|
|
347
|
-
|
|
348
|
-
justify-content: center;
|
|
363
|
+
align-items: center;
|
|
349
364
|
&__list {
|
|
350
365
|
display: flex;
|
|
351
366
|
justify-content: center;
|
|
@@ -353,6 +368,8 @@ export default {
|
|
|
353
368
|
width: auto;
|
|
354
369
|
background: rgba(255, 255, 255, 0.6);
|
|
355
370
|
border-radius: 1rem;
|
|
371
|
+
width: min-content;
|
|
372
|
+
margin-bottom: 0.25rem;
|
|
356
373
|
}
|
|
357
374
|
&__item {
|
|
358
375
|
display: inline-block;
|
|
@@ -362,6 +379,24 @@ export default {
|
|
|
362
379
|
border-radius: 50%;
|
|
363
380
|
}
|
|
364
381
|
}
|
|
382
|
+
&__download {
|
|
383
|
+
z-index: 20000;
|
|
384
|
+
margin-bottom: 0.25rem;
|
|
385
|
+
:hover {
|
|
386
|
+
background: rgba(255, 255, 255, 0.8);
|
|
387
|
+
}
|
|
388
|
+
button {
|
|
389
|
+
border-radius: 0.75rem;
|
|
390
|
+
background: rgba(255, 255, 255, 0.6);
|
|
391
|
+
height: 1.5rem;
|
|
392
|
+
width: 6rem;
|
|
393
|
+
border: none;
|
|
394
|
+
padding: 0.25rem;
|
|
395
|
+
:hover {
|
|
396
|
+
background: rgba(255, 255, 255, 0);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
365
400
|
&__arrows {
|
|
366
401
|
position: absolute;
|
|
367
402
|
left: 0;
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
@click.native="showSlideshow = false"
|
|
36
36
|
@keyup.esc.native="showSlideshow = false"
|
|
37
37
|
:change-index="selectedIndex"
|
|
38
|
+
:imageThumbnails="imageThumbnails"
|
|
38
39
|
>
|
|
39
40
|
<asd20-swipe-item
|
|
40
41
|
v-for="(image, index) in imageThumbnails"
|
|
@@ -202,7 +203,7 @@ export default {
|
|
|
202
203
|
.text-overlay {
|
|
203
204
|
position: absolute;
|
|
204
205
|
display: block;
|
|
205
|
-
bottom: space(2.
|
|
206
|
+
bottom: space(2.5);
|
|
206
207
|
color: #fff;
|
|
207
208
|
background: rgba(50, 50, 50, 0.7);
|
|
208
209
|
padding: space(0.5);
|
|
@@ -219,7 +219,12 @@ export default {
|
|
|
219
219
|
methods: {
|
|
220
220
|
goBack() {
|
|
221
221
|
if (typeof window === 'undefined') return
|
|
222
|
-
|
|
222
|
+
if (document.referrer === undefined) {
|
|
223
|
+
const currentURL = new URL(window.location.href)
|
|
224
|
+
this.returnURL = currentURL.origin
|
|
225
|
+
} else {
|
|
226
|
+
this.returnURL = document.referrer
|
|
227
|
+
}
|
|
223
228
|
// window.history.back()
|
|
224
229
|
// const url = window.location.href
|
|
225
230
|
// return url.slice(0, url.lastIndexOf('/'))
|