Commit 842aefe8 authored by yaya's avatar yaya

feat:添加查看大图

parent f3f7a256
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<template slot-scope="props"> <template slot-scope="props">
<el-form label-position="left" class="table-expand"> <el-form label-position="left" class="table-expand">
<el-form-item label="钱币图片"> <el-form-item label="钱币图片">
<img v-for="pic in props.row.imageList" :src="pic" :key="pic" class="gallery"> <img v-for="pic in props.row.imageList" :src="pic" :key="pic" class="gallery" @click="handleShowLargeDialog(pic)">
</el-form-item> </el-form-item>
<el-form-item label="钱币价格"> <el-form-item label="钱币价格">
<span>{{ props.row.price }}</span> <span>{{ props.row.price }}</span>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<el-table-column align="center" property="iconUrl" label="图片"> <el-table-column align="center" property="iconUrl" label="图片">
<template slot-scope="scope"> <template slot-scope="scope">
<img v-if="scope.row.topImage" :src="scope.row.topImage" width="100%"> <img v-if="scope.row.topImage" :src="scope.row.topImage" width="100%" @click="handleShowLargeDialog(scope.row.topImage)">
</template> </template>
</el-table-column> </el-table-column>
...@@ -79,6 +79,11 @@ ...@@ -79,6 +79,11 @@
<el-tooltip placement="top" content="返回顶部"> <el-tooltip placement="top" content="返回顶部">
<back-to-top :visibility-height="100" /> <back-to-top :visibility-height="100" />
</el-tooltip> </el-tooltip>
<CheckLargeImageDialog
:show-large-dialog="showLargeDialog"
:image-url="imageUrl"
@closeLargeDialog="showLargeDialog = false"
/>
</div> </div>
</template> </template>
...@@ -110,10 +115,11 @@ import { listGoods, deleteGoods } from '@/api/business/goods' ...@@ -110,10 +115,11 @@ import { listGoods, deleteGoods } from '@/api/business/goods'
import BackToTop from '@/components/BackToTop' import BackToTop from '@/components/BackToTop'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import Line2Hidden from '@/components/line2Hidden' import Line2Hidden from '@/components/line2Hidden'
import CheckLargeImageDialog from './components/CheckLargeImageDialog'
export default { export default {
name: 'GoodsList', name: 'GoodsList',
components: { BackToTop, Pagination, Line2Hidden }, components: { CheckLargeImageDialog, BackToTop, Pagination, Line2Hidden },
data() { data() {
return { return {
list: [], list: [],
...@@ -128,13 +134,19 @@ export default { ...@@ -128,13 +134,19 @@ export default {
}, },
goodsDetail: '', goodsDetail: '',
detailDialogVisible: false, detailDialogVisible: false,
downloadLoading: false downloadLoading: false,
imageUrl: '',
showLargeDialog: false
} }
}, },
created() { created() {
this.getList() this.getList()
}, },
methods: { methods: {
handleShowLargeDialog(imageUrl) {
this.imageUrl = imageUrl
this.showLargeDialog = true
},
getList() { getList() {
this.listLoading = true this.listLoading = true
listGoods(this.listQuery).then(response => { listGoods(this.listQuery).then(response => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment