2 Commitit c2ec7fde0b ... babe906f25

Tekijä SHA1 Viesti Päivämäärä
  Lita-Tako babe906f25 Merge branch 'refs/heads/dev-2.19.0' into dev 4 kuukautta sitten
  Lita-Tako 46e269afff 视频相关 4 kuukautta sitten
1 muutettua tiedostoa jossa 18 lisäystä ja 2 poistoa
  1. 18 2
      src/components/video/Live.vue

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

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