40 lines
		
	
	
		
			750 B
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			750 B
		
	
	
	
		
			Plaintext
		
	
	
<template>
 | 
						|
  <div>
 | 
						|
    <el-button plain @click="open">上传视频文件</el-button>
 | 
						|
    <el-dialog title="上传视频" :close-on-click-modal="false" :visible.sync="IsOpen" width="450px" append-to-body>
 | 
						|
      <my-videos @uploadOver="uploadOver" />
 | 
						|
    </el-dialog>
 | 
						|
  </div>
 | 
						|
</template>
 | 
						|
 | 
						|
<script>
 | 
						|
import MyVideos from '@/components/videos'
 | 
						|
 | 
						|
export default {
 | 
						|
  components: { MyVideos },
 | 
						|
  data() {
 | 
						|
    return {
 | 
						|
      IsOpen: false,
 | 
						|
      videoUrl: null,
 | 
						|
      videoName: null
 | 
						|
    }
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    open() {
 | 
						|
      this.IsOpen = true
 | 
						|
    },
 | 
						|
    uploadOver(isSuccess, res) {
 | 
						|
      if (isSuccess) {
 | 
						|
        this.IsOpen = false
 | 
						|
        this.videoUrl = res.url
 | 
						|
        this.videoName = res.name
 | 
						|
      }
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
</script>
 | 
						|
 | 
						|
<style scoped>
 | 
						|
 | 
						|
</style>
 |