From cf9c82dcbcbfdd77f66242298a8309d2e5926044 Mon Sep 17 00:00:00 2001 From: viarotel Date: Tue, 7 Nov 2023 14:21:26 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E2=99=BB=EF=B8=8F=20Optimize=20mirror?= =?UTF-8?q?=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/exposes/scrcpy/index.js | 2 +- .../Device/components/ControlBar/MirrorGroup/index.vue | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/electron/exposes/scrcpy/index.js b/electron/exposes/scrcpy/index.js index e124baf4..2dbacd5e 100644 --- a/electron/exposes/scrcpy/index.js +++ b/electron/exposes/scrcpy/index.js @@ -171,7 +171,7 @@ const mirrorGroup = async (serial, { open = 1, ...options } = {}) => { exec: true, }).catch((error) => { console.warn( - 'error', + 'mirrorGroup.error', error?.message || error?.cause?.message || `display-id-${displayId}: Open failed`, diff --git a/src/components/Device/components/ControlBar/MirrorGroup/index.vue b/src/components/Device/components/ControlBar/MirrorGroup/index.vue index cf6be0a8..4fbb6a0f 100644 --- a/src/components/Device/components/ControlBar/MirrorGroup/index.vue +++ b/src/components/Device/components/ControlBar/MirrorGroup/index.vue @@ -39,7 +39,7 @@ export default { this.loading = true try { - await this.$scrcpy.mirrorGroup(this.device.id, { + const res = await this.$scrcpy.mirrorGroup(this.device.id, { open, title: ({ displayId }) => `${this.device.$remark ? `${this.device.$remark}-` : ''}${ @@ -47,6 +47,8 @@ export default { }-${this.device.id}-display-${displayId}`, args: this.scrcpyArgs(this.device.id), }) + + console.log('handleMirror.res', res) } catch (error) { console.warn(error.message)