Commit d8d832a7 authored by yaya's avatar yaya

feat:bugfix

parent 93b70673
...@@ -137,9 +137,10 @@ ...@@ -137,9 +137,10 @@
<div style="text-align: end; margin-right: 20px;font-weight: bold; width: 100%">预览</div> <div style="text-align: end; margin-right: 20px;font-weight: bold; width: 100%">预览</div>
<div class="content_preview--image"> <div class="content_preview--image">
<a <a
v-if="compositeImageSrc"
:href="compositeImageSrc" :href="compositeImageSrc"
:style="{'background-image': `url(${compositeImageSrc})`}" :style="{'background-image': `url(${compositeImageSrc})`}"
class="image" /> class="image"/>
</div> </div>
</div> </div>
...@@ -383,10 +384,10 @@ export default { ...@@ -383,10 +384,10 @@ export default {
this.$message.error('请先删除已裁剪图片') this.$message.error('请先删除已裁剪图片')
return return
} }
/* if (!this.goodsParams.images || this.goodsParams.images.length === 0) { if (!this.goodsParams.images || this.goodsParams.images.length === 0) {
this.$message.error('无线上图片选择') this.$message.error('无线上图片选择')
return return
}*/ }
this.dialogVisible = true this.dialogVisible = true
this.selectDialogType = type this.selectDialogType = type
}, },
...@@ -408,9 +409,22 @@ export default { ...@@ -408,9 +409,22 @@ export default {
cutCancel() { cutCancel() {
this.src = '' this.src = ''
}, },
// 删除裁剪后图片 // 删除裁剪后图片
deleteCutImage(type) { deleteCutImage(type) {
event.preventDefault()
if (type === 1 && !this.blob) { // 正面
return
}
if (type === 2 && !this.blobSecond) {
return
}
this.$confirm(
'你确定删除吗?',
'提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (type === 1) { // 正面 if (type === 1) { // 正面
this.blob = '' this.blob = ''
this.base64 = '' this.base64 = ''
...@@ -419,6 +433,7 @@ export default { ...@@ -419,6 +433,7 @@ export default {
this.base64Second = '' this.base64Second = ''
} }
this.compositeImageSrc = '' this.compositeImageSrc = ''
})
}, },
// 选择线上图片后的图片链接 // 选择线上图片后的图片链接
......
...@@ -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.images" :key="pic" :src="pic" class="gallery"> <img :src="props.row.topImage" class="gallery">
</el-form-item> </el-form-item>
<el-form-item label="钱币价格"> <el-form-item label="钱币价格">
<span>{{ props.row.price }}</span> <span>{{ props.row.price }}</span>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,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 :src="scope.row.images[0]" width="100%"> <img :src="scope.row.topImage" width="100%">
</template> </template>
</el-table-column> </el-table-column>
......
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