编辑商品-商品推荐回显、商品相册同名删除问题 #24

Merged
zhangyouji merged 1 commits from zyj into master 7 months ago
  1. 14
      src/views/product/productAdd/components/CustomUpload.vue
  2. 3263
      src/views/product/productAdd/newIndex.vue

@ -5,7 +5,7 @@
list-type="picture-card"> list-type="picture-card">
<i slot="default" class="el-icon-plus"></i> <i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}"> <div slot="file" slot-scope="{file}">
<img class="el-upload-list__item-thumbnail" :src="file.url" alt=""> <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
<span class="el-upload-list__item-actions"> <span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)"> <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
<i class="el-icon-zoom-in"></i> <i class="el-icon-zoom-in"></i>
@ -16,9 +16,9 @@
<slot :file="file" name="imgButton"> <slot :file="file" name="imgButton">
</slot> </slot>
</span> </span>
</div> </div>
</el-upload> </el-upload>
<!-- <div style="width: 100%;display: flex;justify-content: center;"> <!-- <div style="width: 100%;display: flex;justify-content: center;">
<slot name="footer"> <slot name="footer">
@ -31,7 +31,7 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
limit: { limit: {
@ -57,7 +57,7 @@ export default {
this.fileList.push(Object.assign(file, { url })); this.fileList.push(Object.assign(file, { url }));
}, },
handleRemove(file) { handleRemove(file) {
this.fileList = this.fileList.filter(item => item.name !== file.name) this.fileList = this.fileList.filter(item => item !== file)
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
this.dialogImageUrl = file.url; this.dialogImageUrl = file.url;
@ -68,7 +68,7 @@ export default {
} }
} }
} }
</script> </script>
<style scoped lang="scss"> ::v-deep .hiedd .el-upload--picture-card { <style scoped lang="scss"> ::v-deep .hiedd .el-upload--picture-card {
display: none !important; display: none !important;
/* 上传按钮隐藏 */ /* 上传按钮隐藏 */
@ -79,4 +79,4 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
</style> </style>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save