Commit d8d832a7 authored by yaya's avatar yaya

feat:bugfix

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