// new Yox({
// el: '#app',
// template: '#template',
// methods: {
// play: function () {
// this.$refs.video.play()
// }
// }
// })
const vm = new Vue({
el:'#app',
data(){
return {
a:1
}
},
created(){
console.log(this.a)
}
})
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.min.js">
<div id="app"></div>
<script id="template" type="text/plain">
<div>
<button on-click="play()">
Play
</button>
<video ref="video" controls>
<source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
</video>
</div>
</script>