Commit 54160015 by 张立顺

fix bug

1 parent 2180530e
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</el-form-item> </el-form-item>
<el-form-item label="" class="imgItem"> <el-form-item label="" class="imgItem">
<img class="img" v-for="(item, index) in infoForm.constructionImgList" @click=" <img class="img" v-for="(item, index) in infoForm.constructionImgList" @click="
handleEnlargeImg(infoForm.constructionImgList, 'customerPhoto') handleEnlargeImg(infoForm.constructionImgList, 'customerPhoto', index)
" :key="index" :src="item" alt=""> " :key="index" :src="item" alt="">
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -74,10 +74,11 @@ export default { ...@@ -74,10 +74,11 @@ export default {
closeImgViewer() { closeImgViewer() {
this.imgVisible = false this.imgVisible = false
}, },
handleEnlargeImg(url, name) { handleEnlargeImg(url, name, index) {
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
// this.imgList = url // this.imgList = url
console.log("url", url) console.log("url", url)
this.initialIndex = index
this.imgList = url this.imgList = url
this.imgUrlName = name this.imgUrlName = name
}, },
......
...@@ -265,24 +265,6 @@ ...@@ -265,24 +265,6 @@
</p> </p>
</div> </div>
<!-- <el-dialog :visible="imgVisible"
:before-close="handleEnlargeImg">
<el-carousel :autoplay="false"
arrow="always"
trigger="click"
height="695px"
:initial-index="index"
ref="carousel">
<el-carousel-item v-for="(item, index) in imgList"
:key="index"
class="carousel">
<img :src="item[imgUrlName]"
alt=""
class="carousel-img">
</el-carousel-item>
</el-carousel>
</el-dialog> -->
<el-image-viewer v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" /> <el-image-viewer v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
<!-- 标记退款 --> <!-- 标记退款 -->
...@@ -429,7 +411,8 @@ export default { ...@@ -429,7 +411,8 @@ export default {
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
// this.imgList = url // this.imgList = url
console.log("url", url) console.log("url", url)
this.imgList = url.map((item) => item[name]) // this.imgList = url.map((item) => item[name])
this.imgList = url
this.imgUrlName = name this.imgUrlName = name
}, },
handleEnlargeFile(url) { handleEnlargeFile(url) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!