Commit a42bcdbf authored by 赵啸非's avatar 赵啸非

修改部门新增

parent e12953c8
......@@ -31,6 +31,13 @@
<div v-if="isImage">
<img :src="form.filePath" alt="图片描述">
</div>
<div v-else-if="isVideo">
<video id="myVideo" controls>
<source :src="form.filePath" type="video/mp4">
</video>
</div>
<div v-else>
<el-link type="primary" :href="form.filePath" >{{form.fileName}}</el-link>
</div>
......@@ -55,7 +62,10 @@
const extension = this.form.fileName.split('.').pop().toLowerCase();
if (['jpg', 'jpeg', 'png', 'gif'].indexOf(extension) !== -1) {
this.isImage = true;
} else {
}else if (['mp4'].indexOf(extension) !== -1) {
this.isVideo=true
}
else {
this.isImage = false;
}
},
......@@ -63,6 +73,7 @@
data() {
return {
isImage: false,
isVideo: false,
size:"small",
column:2,
toString:[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment