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