摘要: 1. 在src下新建文件夹utils,里面新建文件canvas-nest.js,将代码复制进去。(可以自己定义存放路径) !function() { function n(n, e, t) { return n.getAttribute(e) || t } function e(n) { retur 阅读全文
posted @ 2020-03-21 20:59 zwnsyw 阅读(1298) 评论(0) 推荐(0) 编辑
摘要: methods: { // 视频时长更新 timeupdate(e){ console.log(e) let duration = e.detail.duration let currentTime = e.detail.currentTime console.log(duration) conso 阅读全文
posted @ 2020-03-21 00:52 zwnsyw 阅读(3552) 评论(1) 推荐(0) 编辑
摘要: 原理:1.点击当前视频,先判断是否有视频正在播放,如果没有,立即播放,如果有,则暂停其他视频,再播放当前视频 data: { indexCurrent: null, }, methods: { // 只播放一个视频,其他视频暂停 video_play(e) { var curIdx = e.curr 阅读全文
posted @ 2020-03-21 00:48 zwnsyw 阅读(1493) 评论(0) 推荐(0) 编辑