perf: ♻️ Optimize mirror group

This commit is contained in:
viarotel 2023-11-07 14:21:26 +08:00
parent 0c9d36fddb
commit cf9c82dcbc
2 changed files with 4 additions and 2 deletions

View File

@ -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`,

View File

@ -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)