This commit is contained in:
faiz 2024-07-31 10:41:29 +08:00
parent 3d3116a40a
commit 58f53970a7
1 changed files with 38 additions and 40 deletions

View File

@ -171,28 +171,23 @@
:show-file-list="false"
:on-success="handleAvatarSuccess"
>
<div v-if="anchors.img_zip.length">
<div v-for="(item, index) in anchors.img_zip" class="img-box">
<i
@click.stop="handleClose('img_zip', index)"
class="close el-icon-close"
/>
<i
v-if="!checkIfUrlContainsImage(item)"
class="el-icon-folder"
/>
<img
v-else
style="width: 100px; height: 100px"
:src="item"
class="avatar"
alt=""
/>
</div>
<div v-for="(item, index) in anchors.img_zip" class="img-box">
<i
@click.stop="handleClose('img_zip', index)"
class="close el-icon-close"
/>
<i v-if="!checkIfUrlContainsImage(item)" class="el-icon-folder" />
<img
v-else
style="width: 100px; height: 100px"
:src="item"
class="avatar"
alt=""
/>
<div class="desc">{{ item }}</div>
</div>
<i class="el-icon-plus avatar-uploader-icon" />
</el-upload>
<!-- <span>{{ anchors.img_zip }}</span> -->
<div style="color: red">(请上传zip格式的文件图片)</div>
</el-form-item>
<el-form-item label="上传行程">
@ -202,28 +197,23 @@
:show-file-list="false"
:on-success="handleSuccess"
>
<div v-if="anchors.trip_zip.length">
<div v-for="(item, index) in anchors.trip_zip" class="img-box">
<i
@click.stop="handleClose('trip_zip', index)"
class="close el-icon-close"
/>
<i
v-if="!checkIfUrlContainsImage(item)"
class="el-icon-folder"
/>
<img
v-else
style="width: 100px; height: 100px"
:src="item"
class="avatar"
alt=""
/>
</div>
<div v-for="(item, index) in anchors.trip_zip" class="img-box">
<i
@click.stop="handleClose('trip_zip', index)"
class="close el-icon-close"
/>
<i v-if="!checkIfUrlContainsImage(item)" class="el-icon-folder" />
<img
v-else
style="width: 100px; height: 100px"
:src="item"
class="avatar"
alt=""
/>
<div class="desc">{{ item }}</div>
</div>
<i class="el-icon-plus avatar-uploader-icon" />
</el-upload>
<!-- <span>{{ item }}</span> -->
<span style="color: red">(本行程请上传,ppt,word,pdf格式的文件)</span>
</el-form-item>
</el-form>
@ -326,10 +316,10 @@
class="avatar"
alt=""
/>
<div class="desc">{{ item }}</div>
</div>
<i class="el-icon-plus avatar-uploader-icon" />
</el-upload>
<!-- <span>{{ anchors.img_zip }}</span> -->
<div style="color: red">(请上传zip格式的文件图片)</div>
</el-form-item>
<el-form-item label="上传行程">
@ -352,10 +342,10 @@
class="avatar"
alt=""
/>
<div class="desc">{{ item }}</div>
</div>
<i class="el-icon-plus avatar-uploader-icon" />
</el-upload>
<!-- <span>{{ item }}</span> -->
<span style="color: red">(本行程请上传,ppt,word,pdf格式的文件)</span>
</el-form-item>
</el-form>
@ -589,9 +579,17 @@ export default {
.img-box {
position: relative;
display: inline-block;
width: 100px;
margin-bottom: 10px;
& + .img-box {
margin-left: 10px;
}
.desc {
line-height: 16px;
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 隐藏溢出 */
text-overflow: ellipsis; /* 显示省略号 */
}
}
.avatar-uploader ::v-deep.el-upload {
display: flex;