2 Commits c2ec7fde0b ... babe906f25

Author SHA1 Message Date
  Lita-Tako babe906f25 Merge branch 'refs/heads/dev-2.19.0' into dev 4 months ago
  Lita-Tako 46e269afff 视频相关 4 months ago
1 changed files with 18 additions and 2 deletions
  1. 18 2
      src/components/video/Live.vue

+ 18 - 2
src/components/video/Live.vue

@@ -21,6 +21,7 @@
21
 	let videoMap = {}
21
 	let videoMap = {}
22
 	let currentWindowIndex = 0
22
 	let currentWindowIndex = 0
23
 	const mode = 0 // 0 普通模式  1 高级模式
23
 	const mode = 0 // 0 普通模式  1 高级模式
24
+	const isActive = ref(false)
24
 
25
 
25
 	const init = () => {
26
 	const init = () => {
26
 		window.addEventListener('resize', () => {
27
 		window.addEventListener('resize', () => {
@@ -214,6 +215,15 @@
214
 		}
215
 		}
215
 	}
216
 	}
216
 
217
 
218
+	const circle = () => {
219
+		if (isActive.value) {
220
+			doControl('LEFT', 0)
221
+		} else {
222
+			doControl('LEFT', 1)
223
+		}
224
+		isActive.value = !isActive.value
225
+	}
226
+
217
 	const doControl1 = (command) => {
227
 	const doControl1 = (command) => {
218
 		console.log('do control 1', command)
228
 		console.log('do control 1', command)
219
 		doControl(command, 0)
229
 		doControl(command, 0)
@@ -380,10 +390,11 @@
380
 											v-if="item.code !== 'GOTO_PRESET'"
390
 											v-if="item.code !== 'GOTO_PRESET'"
381
 											:key="item.code"
391
 											:key="item.code"
382
 											class="small-btn"
392
 											class="small-btn"
383
-											@click="doControl1(item.code)"
393
+											@mousedown="doControl(item.code, 0)"
394
+											@mouseup="doControl(item.code, 1)"
384
 											>{{ item.label }}
395
 											>{{ item.label }}
385
 										</a-button>
396
 										</a-button>
386
-										<a-button v-else class="small-btn" @click="doControl(item.code)">
397
+										<a-button v-else class="small-btn" :class="{ 'active-button': isActive }" @click="circle()">
387
 											<template #icon>
398
 											<template #icon>
388
 												<UndoOutlined />
399
 												<UndoOutlined />
389
 											</template>
400
 											</template>
@@ -441,4 +452,9 @@
441
 			margin-top: 5px;
452
 			margin-top: 5px;
442
 		}
453
 		}
443
 	}
454
 	}
455
+
456
+	.active-button {
457
+		background-color: #1890ff;
458
+		color: white;
459
+	}
444
 </style>
460
 </style>