This commit is contained in:
faiz 2024-07-31 10:24:19 +08:00
parent 1092c313ca
commit c14215cf85
1 changed files with 44 additions and 42 deletions

View File

@ -189,8 +189,8 @@
alt="" alt=""
/> />
</div> </div>
<i class="el-icon-plus avatar-uploader-icon" />
</div> </div>
<i class="el-icon-plus avatar-uploader-icon" />
</el-upload> </el-upload>
<!-- <span>{{ anchors.img_zip }}</span> --> <!-- <span>{{ anchors.img_zip }}</span> -->
<div style="color: red">(请上传zip格式的文件图片)</div> <div style="color: red">(请上传zip格式的文件图片)</div>
@ -220,8 +220,8 @@
alt="" alt=""
/> />
</div> </div>
<i class="el-icon-plus avatar-uploader-icon" />
</div> </div>
<i class="el-icon-plus avatar-uploader-icon" />
</el-upload> </el-upload>
<!-- <span>{{ item }}</span> --> <!-- <span>{{ item }}</span> -->
<span style="color: red">(本行程请上传,ppt,word,pdf格式的文件)</span> <span style="color: red">(本行程请上传,ppt,word,pdf格式的文件)</span>
@ -313,26 +313,21 @@
: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 v-if="!checkIfUrlContainsImage(item)" class="el-icon-folder" />
<i <img
v-if="!checkIfUrlContainsImage(item)" v-else
class="el-icon-folder" style="width: 100px; height: 100px"
/> :src="item"
<img class="avatar"
v-else alt=""
style="width: 100px; height: 100px" />
:src="item"
class="avatar"
alt=""
/>
</div>
<i class="el-icon-plus avatar-uploader-icon" />
</div> </div>
<i class="el-icon-plus avatar-uploader-icon" />
</el-upload> </el-upload>
<!-- <span>{{ anchors.img_zip }}</span> --> <!-- <span>{{ anchors.img_zip }}</span> -->
<div style="color: red">(请上传zip格式的文件图片)</div> <div style="color: red">(请上传zip格式的文件图片)</div>
@ -344,26 +339,21 @@
: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 v-if="!checkIfUrlContainsImage(item)" class="el-icon-folder" />
<i <img
v-if="!checkIfUrlContainsImage(item)" v-else
class="el-icon-folder" style="width: 100px; height: 100px"
/> :src="item"
<img class="avatar"
v-else alt=""
style="width: 100px; height: 100px" />
:src="item"
class="avatar"
alt=""
/>
</div>
<i class="el-icon-plus avatar-uploader-icon" />
</div> </div>
<i class="el-icon-plus avatar-uploader-icon" />
</el-upload> </el-upload>
<!-- <span>{{ item }}</span> --> <!-- <span>{{ item }}</span> -->
<span style="color: red">(本行程请上传,ppt,word,pdf格式的文件)</span> <span style="color: red">(本行程请上传,ppt,word,pdf格式的文件)</span>
@ -431,6 +421,7 @@ export default {
".svg", ".svg",
".webp", ".webp",
]; ];
console.log(url);
console.log( console.log(
"========fffff====" + "========fffff====" +
imageExtensions.some((extension) => imageExtensions.some((extension) =>
@ -522,8 +513,12 @@ export default {
} else { } else {
this.anchors = { ...item }; this.anchors = { ...item };
} }
this.anchors.img_zip = item.img_zip; this.anchors.img_zip = img_zip;
this.anchors.trip_zip = item.trip_zip; this.anchors.trip_zip = trip_zip;
// this.anchors.img_zip =
// typeof item.img_zip == "string" ? [item.img_zip] : item.img_zip;
// this.anchors.trip_zip =
// typeof item.trip_zip == "string" ? [item.trip_zip] : item.trip_zip;
this.dialogEdit = true; this.dialogEdit = true;
}, },
onSave() { onSave() {
@ -598,6 +593,13 @@ export default {
margin-left: 10px; margin-left: 10px;
} }
} }
::v-deep.el-upload {
display: flex;
}
.el-icon-plus {
// display: inline-block;
margin-left: 10px;
}
.el-icon-folder { .el-icon-folder {
color: #409eff !important; color: #409eff !important;
font-size: 100px; font-size: 100px;