fix: 🐛 Repair floating action bar start application error

This commit is contained in:
viarotel 2024-11-06 19:12:33 +08:00
parent b2bb0aeb72
commit 487e7e2ec4
3 changed files with 8 additions and 4 deletions

View File

@ -10,7 +10,7 @@ export default function (controlWindow) {
return {
label: item.label,
click() {
controlWindow.webContents.send(channel, item.value)
controlWindow.webContents.send(channel, item.value, item)
},
}
})

View File

@ -25,6 +25,9 @@
</template>
<script>
import { openFloatControl } from '$/utils/device/index.js'
import { toRaw } from 'vue'
export default {
props: {
device: {
@ -80,8 +83,8 @@ export default {
window.electron.ipcRenderer.once(
channel,
(event, data) => {
this.handleCommand(data)
(event, value, item) => {
this.handleCommand(item)
},
)
@ -103,6 +106,8 @@ export default {
await window.scrcpy.startApp(this.device.id, { title, commands, packageName: value })
openFloatControl(toRaw(this.device))
this.loading = false
},
},

View File

@ -72,7 +72,6 @@ export default {
window.electron.ipcRenderer.once(
channel,
(event, data) => {
console.log('data')
this.handleCommand(data)
},
)