<template :append-to-body="true">
|
<div class="box_item_list_row_l">
|
<div class="desc_data_list_item" v-for="(item, index) in list" :key="index">
|
<div class="desc_data_list_item_img" v-if="item.type === 0">
|
<el-image
|
style="width: 100%; height: 100%;"
|
:src="item.fileurlFull"
|
:preview-teleported="true"
|
:append-to-body="true"
|
:preview-src-list="[item.fileurlFull]">
|
</el-image>
|
</div>
|
<div class="desc_data_list_item_img" v-if="item.type === 1">
|
<video controls :src="item.fileurlFull" />
|
</div>
|
<div class="desc_data_list_item_img" v-if="item.type === 2" @click="openFile(item.fileurlFull)">
|
<i class="el-icon-folder-opened"></i>
|
</div>
|
<!-- <div class="desc_data_list_item_info">-->
|
<!-- <span>{{ item.name }}</span>-->
|
<!-- </div>-->
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: "previewArea",
|
props: {
|
list: {
|
type: Array,
|
default: ()=> []
|
}
|
},
|
methods: {
|
openFile(url) {
|
window.open(url)
|
}
|
}
|
}
|
</script>
|
<style>
|
.el-image-viewer__wrapper{
|
z-index: 9999 !important;
|
}
|
</style>
|
<style lang="scss" scoped>
|
|
.box_item_list_row_l {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
flex-wrap: wrap;
|
.desc_data_list_item {
|
width: 100px;
|
height: 100px;
|
cursor: pointer;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
justify-content: center;
|
position: relative;
|
margin-bottom: 10px;
|
margin-left: 10px;
|
&:first-child {
|
margin-left: 0 !important;
|
}
|
.desc_data_list_item_upload {
|
flex: 1;
|
height: 80px;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
.desc_data_list_item_img {
|
flex-shrink: 0;
|
width: 100%;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
overflow: hidden;
|
margin-right: 10px;
|
.el-icon-folder-opened {
|
font-size: 40px;
|
color: #666666;
|
}
|
.el-icon-plus {
|
font-size: 26px;
|
color: #ffffff;
|
}
|
img {
|
width: 100%;
|
}
|
video {
|
width: 100%;
|
}
|
}
|
.desc_data_list_item_info {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
justify-content: space-between;
|
word-break: break-all;
|
span {
|
width: 100%;
|
white-space: nowrap;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
font-size: 14px;
|
color: black;
|
}
|
}
|
}
|
}
|
</style>
|