This commit is contained in:
2026-07-23 18:30:30 +08:00
parent 86ab0142da
commit 785b9a4b80
57 changed files with 1795 additions and 340 deletions
@@ -35,8 +35,9 @@
:accept="fileAccept"
:multiple="true"
list-type="picture-card"
:class="{ 'image-upload-entry-hidden': !showImageUploadEntry }"
>
<i class="el-icon-plus"></i>
<i v-if="showImageUploadEntry" class="el-icon-plus"></i>
<!-- <div class="el-upload__tip" v-if="fileList.length < upload_number">-->
<!-- <div style="margin-top: 8px">{{ upload_text }}</div>-->
<!-- </div>-->
@@ -208,6 +209,10 @@ module.exports = {
const number = Number(this.upload_number)
return Number.isFinite(number) && number > 0 ? number : 1
},
// 单图上传完成后隐藏上传入口;删除图片后 fileList 清空,入口会自动恢复。
showImageUploadEntry() {
return this.uploadLimitNumber !== 1 || this.fileList.length < this.uploadLimitNumber
},
upload_tips() {
const uploadNumber = this.uploadLimitNumber
const fileAccept = this.fileAccept
@@ -655,4 +660,10 @@ module.exports = {
height: var(--upload-height, 148px);
}
/* 单图已上传时只隐藏图片卡片上传入口,保留图片预览列表与删除按钮。 */
.image-upload-entry-hidden.el-upload--picture-card,
.image-upload-entry-hidden .el-upload--picture-card {
display: none !important;
}
</style>