|
@@ -1,13 +1,22 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <draggable v-model="uploadList" :move="dragMove" @update="uploadListSort">
|
|
|
|
- <div class="demo-upload-list" v-for="item in uploadList" :key="item">
|
|
|
|
|
|
+ <draggable
|
|
|
|
+ v-model="uploadList"
|
|
|
|
+ :move="dragMove"
|
|
|
|
+ @update="uploadListSort"
|
|
|
|
+ class="upload-images"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ class="demo-upload-list"
|
|
|
|
+ v-for="(item, index) in uploadList"
|
|
|
|
+ :key="item"
|
|
|
|
+ >
|
|
<img :src="item" />
|
|
<img :src="item" />
|
|
<div class="demo-upload-list-cover">
|
|
<div class="demo-upload-list-cover">
|
|
<Icon
|
|
<Icon
|
|
type="ios-eye-outline"
|
|
type="ios-eye-outline"
|
|
size="30"
|
|
size="30"
|
|
- @click.native="handleView(item)"
|
|
|
|
|
|
+ @click.native="handleView('.upload-images', index)"
|
|
></Icon>
|
|
></Icon>
|
|
<Icon
|
|
<Icon
|
|
type="ios-trash-outline"
|
|
type="ios-trash-outline"
|
|
@@ -61,14 +70,23 @@
|
|
</div>
|
|
</div>
|
|
<div v-else>正在获取二维码...</div>
|
|
<div v-else>正在获取二维码...</div>
|
|
|
|
|
|
- <draggable v-model="totalList" @start="drag = true" @end="drag = false">
|
|
|
|
- <div class="demo-upload-list" v-for="item in totalList" :key="item">
|
|
|
|
|
|
+ <draggable
|
|
|
|
+ v-model="totalList"
|
|
|
|
+ @start="drag = true"
|
|
|
|
+ @end="drag = false"
|
|
|
|
+ class="total-images"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ class="demo-upload-list"
|
|
|
|
+ v-for="(item, index) in totalList"
|
|
|
|
+ :key="item"
|
|
|
|
+ >
|
|
<img :src="item" />
|
|
<img :src="item" />
|
|
<div class="demo-upload-list-cover">
|
|
<div class="demo-upload-list-cover">
|
|
<Icon
|
|
<Icon
|
|
type="ios-eye-outline"
|
|
type="ios-eye-outline"
|
|
size="30"
|
|
size="30"
|
|
- @click.native="handleView(item)"
|
|
|
|
|
|
+ @click.native="handleView('.total-images', index)"
|
|
></Icon>
|
|
></Icon>
|
|
<Icon
|
|
<Icon
|
|
type="ios-trash-outline"
|
|
type="ios-trash-outline"
|
|
@@ -124,8 +142,8 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapMutations(["updateUploadModalVisible"]),
|
|
...mapMutations(["updateUploadModalVisible"]),
|
|
- handleView(name) {
|
|
|
|
- const viewer = new Viewer(document.querySelector(`img[src="${name}"]`), {
|
|
|
|
|
|
+ handleView(imagesClass, index) {
|
|
|
|
+ const viewer = new Viewer(document.querySelector(imagesClass), {
|
|
container: "#app",
|
|
container: "#app",
|
|
zIndex: 99999,
|
|
zIndex: 99999,
|
|
title: false,
|
|
title: false,
|
|
@@ -134,19 +152,21 @@ export default {
|
|
zoomOut: 1,
|
|
zoomOut: 1,
|
|
oneToOne: 1,
|
|
oneToOne: 1,
|
|
reset: 1,
|
|
reset: 1,
|
|
- prev: 0,
|
|
|
|
|
|
+ prev: 1,
|
|
play: {
|
|
play: {
|
|
show: 0,
|
|
show: 0,
|
|
size: "large",
|
|
size: "large",
|
|
},
|
|
},
|
|
- next: 0,
|
|
|
|
|
|
+ next: 1,
|
|
rotateLeft: 1,
|
|
rotateLeft: 1,
|
|
rotateRight: 1,
|
|
rotateRight: 1,
|
|
flipHorizontal: 1,
|
|
flipHorizontal: 1,
|
|
flipVertical: 1,
|
|
flipVertical: 1,
|
|
},
|
|
},
|
|
- viewed() {
|
|
|
|
|
|
+ ready() {
|
|
// viewer.zoomTo(1);
|
|
// viewer.zoomTo(1);
|
|
|
|
+ viewer.view(index);
|
|
|
|
+ // console.log("once");
|
|
},
|
|
},
|
|
hidden() {
|
|
hidden() {
|
|
viewer.destroy();
|
|
viewer.destroy();
|