Просмотр исходного кода

Merge branch 'refs/heads/dev-2.19.0' into dev

Lita-Tako месяцев назад: 4
Родитель
Сommit
f8ed8d66d3
1 измененных файлов с 17 добавлено и 6 удалено
  1. 17 6
      src/components/video/Live.vue

+ 17 - 6
src/components/video/Live.vue

@@ -212,6 +212,13 @@
212 212
 		}
213 213
 	}
214 214
 
215
+	const doControl1 = (command) => {
216
+		doControl(command, 0)
217
+		setTimeout(() => {
218
+			doControl(command, 1)
219
+		}, 2000)
220
+	}
221
+
215 222
 	const startTrack = () => {
216 223
 		doControl('START_TRACK', 0)
217 224
 	}
@@ -366,10 +373,14 @@
366 373
 							>
367 374
 								<div class="control-row">
368 375
 									<template v-for="item in list">
369
-										<a-button v-if="item.code !== 'GOTO_PRESET'" :key="item.code" class="small-btn"
376
+										<a-button
377
+											v-if="item.code !== 'GOTO_PRESET'"
378
+											:key="item.code"
379
+											class="small-btn"
380
+											@click="doControl1(item.code)"
370 381
 											>{{ item.label }}
371 382
 										</a-button>
372
-										<a-button v-else class="small-btn">
383
+										<a-button v-else class="small-btn" @click="doControl(item.code)">
373 384
 											<template #icon>
374 385
 												<UndoOutlined />
375 386
 											</template>
@@ -380,12 +391,12 @@
380 391
 						</div>
381 392
 					</div>
382 393
 					<div class="row">
383
-						<a-button type="primary" class="mr-5 btn"> + 聚焦 </a-button>
384
-						<a-button type="primary" class="btn">- 聚焦</a-button>
394
+						<a-button type="primary" class="mr-5 btn" @click="doControl1('FOCUS_NEAR')"> + 聚焦 </a-button>
395
+						<a-button type="primary" class="btn" @click="doControl1('FOCUS_FAR')">- 聚焦</a-button>
385 396
 					</div>
386 397
 					<div class="row">
387
-						<a-button type="primary" class="mr-5 btn"> + 调焦 </a-button>
388
-						<a-button type="primary" class="btn">- 调焦</a-button>
398
+						<a-button type="primary" class="mr-5 btn" @click="doControl1('ZOOM_IN')"> + 调焦 </a-button>
399
+						<a-button type="primary" class="btn" @click="doControl1('ZOOM_OUT')">- 调焦</a-button>
389 400
 					</div>
390 401
 					<!--					<div class="row">-->
391 402
 					<!--						<a-button type="primary" class="mr-5 btn"> 录像开始 </a-button>-->