mkl_power_box/components/background_video.js

37 lines
729 B
JavaScript

/**
* 顶部header
*/
Vue.component("background-video", {
template: `
<div class="background_video">
<video muted autoplay="autoplay" loop="loop" id="video">
<source :src="videoUrl">
</video>
</div>
`,
props: {
url:{
type:String
}
},
data() {
return {
videoUrl:'https://fileimg.makalu.cc/WEB_A7BD66B1CF0746A4930F645C0ECA3EF0.mp4',
}
},
mounted(){
this.init()
},
methods: {
init(){
if(this.url){
this.videoUrl = 'https://fileimg.makalu.cc/WEB_28C6A3A0ABA040288002B87B55951655.mp4'
}
}
},
watch:{
}
})