由于vue.js2.0不支持import方式,所以用webpack对lv_vue.js打包,生成bundle.js.import myVideo from 'vue-video';export default { data () { return { video: { sources: [{ src: 'http://covteam.u.qiniudn.com/oceans.mp4', type: 'video/mp4' }], options: { autoplay: true, volume: 0.6, poster: 'http://covteam.u.qiniudn.com/poster.png' } } } }, components: { myVideo }}在index.html中调用bundle.js<script> var myvideo = require('../public/bundle.js');</script>myvideo的值为空,是什么原因呢?
添加回答
举报
0/150
提交
取消