perf: ♻️ optimize mirror group tips

This commit is contained in:
viarotel 2023-11-07 14:29:57 +08:00
parent cf9c82dcbc
commit 46defbf680
2 changed files with 7 additions and 8 deletions

View File

@ -169,13 +169,6 @@ const mirrorGroup = async (serial, { open = 1, ...options } = {}) => {
title, title,
args, args,
exec: true, exec: true,
}).catch((error) => {
console.warn(
'mirrorGroup.error',
error?.message
|| error?.cause?.message
|| `display-id-${displayId}: Open failed`,
)
}) })
results.push(promise) results.push(promise)

View File

@ -49,9 +49,15 @@ export default {
}) })
console.log('handleMirror.res', res) console.log('handleMirror.res', res)
res.forEach((item) => {
if (item.status === 'rejected') {
throw item.reason || item
}
})
} }
catch (error) { catch (error) {
console.warn(error.message) console.warn('error.message', error.message)
if (error?.message || error?.cause?.message) { if (error?.message || error?.cause?.message) {
this.$message.warning(error?.message || error?.cause?.message) this.$message.warning(error?.message || error?.cause?.message)
} }