Commit 79da9020 by 宋珺琪

视频调整、选项图片添加

parent fd831586
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
accept="video/*" accept="video/*"
:on-change="handlePhotoChange" :on-change="handlePhotoChange"
:limit="1" :limit="1"
ref="uploadRef"
:show-file-list="false"> :show-file-list="false">
<el-button slot="trigger" type="primary" style="margin-left: 10px;" title="只能上传视频文件">上传视频</el-button> <el-button slot="trigger" type="primary" style="margin-left: 10px;" title="只能上传视频文件">上传视频</el-button>
</el-upload> </el-upload>
...@@ -160,6 +161,7 @@ ...@@ -160,6 +161,7 @@
this.videoName = file.name this.videoName = file.name
this.fileList.push(file.raw); this.fileList.push(file.raw);
this.submitForm(); this.submitForm();
}, },
//移除 //移除
handleRemove(file) { handleRemove(file) {
...@@ -195,7 +197,9 @@ ...@@ -195,7 +197,9 @@
this.fileList = [] this.fileList = []
this.video = '' this.video = ''
this.$message.success('添加成功'); this.$message.success('添加成功');
this.videoList() this.videoList();
// 重置上传组件
this.$refs.uploadRef.clearFiles();
} }
}) })
}, },
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<source v-for="(item, index) in vUrl" <source v-for="(item, index) in vUrl"
:key="index" :key="index"
:src="item" :src="item"
:type="`${getUrlType(item)}`"> type="video/mp4">
Your browser does not support the video element. Your browser does not support the video element.
</video> </video>
</template> </template>
......
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