From 09ffe174214dfa552887b8c00e7a10518e4e750b Mon Sep 17 00:00:00 2001 From: jxj_yjl <1490736767@qq.com> Date: Fri, 7 Apr 2023 09:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A4=E7=9F=B3=E4=BA=91=E5=88=86=E5=B1=8F?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectFront/videoManage/ysyNew.vue | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/src/views/projectFront/videoManage/ysyNew.vue b/src/views/projectFront/videoManage/ysyNew.vue index cfb04642..237e2adc 100644 --- a/src/views/projectFront/videoManage/ysyNew.vue +++ b/src/views/projectFront/videoManage/ysyNew.vue @@ -90,7 +90,8 @@ export default { devList: [], demoList: [], indextest: 0, - btnIndex: 0 + btnIndex: 0, + devs:[] } }, created() { }, @@ -110,10 +111,13 @@ export default { this.selectVideoFirst = index + 1 } else { var index = this.devList.findIndex((item) => item.url == a[0].url) - let devs = [] - devs.push(this.devList[index]) - console.log('块的点击事件1:', devs) - this.ysyBtn(devs, this.indextest, this.select) + this.devsob = [] + let ob = JSON.parse(JSON.stringify(this.devList[index])); + this.devsob.push(ob) + // this.devList.push(this.devList[index]) + console.log('块的点击事件1:', this.devList) + this.ysyBtn(this.devsob, this.indextest, this.select) + this.devs.push(this.devsob[0]) } // this.select = 1 @@ -128,7 +132,7 @@ export default { }, select: function (value, b) { this.indextest = 0 - console.log('选择显示video数量 :', this.devList) + console.log('选择显示video数量 :', this.devs) this.select = value this.selectVideoFirst = 1 this.devList.forEach((item, index) => { @@ -151,6 +155,27 @@ export default { ) } }) + + this.devs.forEach((item, index) => { + console.log('item数据', item); + // item.player.stop() + if (value == 1) { + item.player.reSize( + this.$refs.videoBox.offsetWidth, + this.$refs.videoBox.offsetHeight + ) + } else if (value == 2) { + item.player.reSize( + this.$refs.videoBox.offsetWidth / 2, + this.$refs.videoBox.offsetHeight / 2 + ) + } else if (value == 3) { + item.player.reSize( + this.$refs.videoBox.offsetWidth / 3, + this.$refs.videoBox.offsetHeight / 3 + ) + } + }) } // 选择显示video数量 }, @@ -196,6 +221,7 @@ export default { }) item2.player = player }) + console.log('item 完:', item ) } } }