Commit 910ed931 authored by yaya's avatar yaya

feat:添加预览图片功能

parent 3571d643
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<el-table-column align="center" label="封面图" prop="itemImg"> <el-table-column align="center" label="封面图" prop="itemImg">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <img v-if="scope.row.images" :src="scope.row.images.split(';')[0]" width="60px" height="60px" @click="handleShowPreview(scope.row.images)">--> <!-- <img v-if="scope.row.images" :src="scope.row.images.split(';')[0]" width="60px" height="60px" @click="handleShowPreview(scope.row.images)">-->
<div class="image_preivew"> <div class="image_preview">
<el-image <el-image
:preview-src-list="scope.row.images.split(';')" :preview-src-list="scope.row.images.split(';')"
:src="scope.row.images.split(';')[0]" :src="scope.row.images.split(';')[0]"
...@@ -307,7 +307,7 @@ export default { ...@@ -307,7 +307,7 @@ export default {
.page_consignList { .page_consignList {
padding: 20px; padding: 20px;
.image_preivew { .image_preview {
width: 60px; width: 60px;
height: 60px; height: 60px;
align-content: center; align-content: center;
......
...@@ -28,7 +28,13 @@ ...@@ -28,7 +28,13 @@
<el-table-column align="center" min-width="100px" prop="id" label="商品ID" /> <el-table-column align="center" min-width="100px" prop="id" label="商品ID" />
<el-table-column align="center" label="封面图" prop="itemImg"> <el-table-column align="center" label="封面图" prop="itemImg">
<template slot-scope="scope"> <template slot-scope="scope">
<img v-if="scope.row.images" :src="scope.row.images.split(';')[0]" width="60px" height="60px"> <div class="image_preview">
<el-image
:preview-src-list="scope.row.images.split(';')"
:src="scope.row.images.split(';')[0]"
class="table-td-thumb"
/>
</div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -245,6 +251,12 @@ export default { ...@@ -245,6 +251,12 @@ export default {
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
} }
.image_preview {
width: 60px;
height: 60px;
align-content: center;
justify-content: center;
}
} }
</style> </style>
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