Browse Source

banner视频样式修改

feature/syp_points
songyunpeng 5 years ago
parent
commit
8a60d32faf
  1. 13
      src/views/modules/news/banner-add-or-update.vue

13
src/views/modules/news/banner-add-or-update.vue

@ -104,7 +104,7 @@
</el-upload>
</el-form-item>
<el-form-item label="banner视频"
v-loading="loading"
v-loading="videoLoading"
prop="videoUrl">
<el-upload class="avatar-uploader"
:action="this.uploadUrl"
@ -113,7 +113,7 @@
:on-error="handelError"
:before-upload="beforeVideoUpload">
<video class="video" v-if="dataForm.videoUrl"
:src="dataForm.videoUrl" controls="controls"></video>
:src="dataForm.videoUrl" controls="controls" height="178px" width="378px"></video>
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
@ -157,7 +157,8 @@ export default {
options: [],
uploadUrl: '',
positionList: [],
loading: false
loading: false,
videoLoading: false
}
},
computed: {
@ -256,20 +257,20 @@ export default {
},
handleVideoSuccess (res, file) {
this.dataForm.videoUrl = res.data.url
this.loading = false
this.videoLoading = false
},
beforeAvatarUpload (file) {
this.loading = true
},
beforeVideoUpload (file) {
console.log(file)
if (file.size > 52428800) {
return this.$message.error('文件大小不能超过50M')
}
this.loading = true
this.videoLoading = true
},
handelError () {
this.loading = false
this.videoLoading = false
},
getListFromDict (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {

Loading…
Cancel
Save