فهرست منبع

mod:编辑 关闭 摄像头

panqiuyao 7 ماه پیش
والد
کامیت
ca4e4492bd
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      frontend/src/views/Photography/check.vue

+ 3 - 2
frontend/src/views/Photography/check.vue

@@ -87,9 +87,11 @@ const socketStore = socket(); // WebSocket状态管理实例
 const emit = defineEmits([ 'confirm','onClose']);
 
 const confirm = ()=>{
+  hideVideo()
   emit('confirm')
 }
 const onClose = ()=>{
+  hideVideo()
   emit('onClose')
 }
 // 定义 props
@@ -248,11 +250,10 @@ onMounted(()=>{
  * 页面卸载时移除所有事件监听器。
  */
 onBeforeUnmount(() => {
+  hideVideo()
   clientStore.ipc.removeAllListeners(icpList.camera.takePictures);
   clientStore.ipc.removeAllListeners(icpList.camera.PreviewHide);
   clientStore.ipc.removeAllListeners(icpList.camera.PreviewShow);
-
-
 })
 </script>
 <style scoped lang="scss">