我是用webpack构建的,在vue.js中想操作dom,按照网上的说法,我在mounted中用了this.$nextTick,在这个里面操作dom,但是却在this.$nextTick这里报错了,各位大神帮忙看一下啊
<script>
export default {
data () {
return {
videoIsShow: false
}
},
methods: {
startPlay: function () {
this.videoIsShow = true
}
},
mounted: {
this.$nextTick( function () {
var video = docuement.getElementsByTagName("video")[0]
console.log(video)
})
}
}
</script>
![图片描述][1]
mounted是个钩子函数