mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-08 21:38:13 -05:00
Added: ipcRenderer remore listener
This commit is contained in:
parent
13c63ba66d
commit
c149211def
@ -120,7 +120,10 @@ export default {
|
|||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.$electron.ipcRenderer.on('pluginList', (evt, list) => {
|
this.$electron.ipcRenderer.on('pluginList', (evt, list) => {
|
||||||
this.pluginList = list.map(item => item)
|
this.pluginList = list.map(item => {
|
||||||
|
item.reload = false
|
||||||
|
return item
|
||||||
|
})
|
||||||
this.pluginNameList = list.map(item => item.name)
|
this.pluginNameList = list.map(item => item.name)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
@ -255,6 +258,11 @@ export default {
|
|||||||
reload: false
|
reload: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy () {
|
||||||
|
this.$electron.ipcRenderer.removeAllListeners('pluginList')
|
||||||
|
this.$electron.ipcRenderer.removeAllListeners('installSuccess')
|
||||||
|
this.$electron.ipcRenderer.removeAllListeners('uninstallSuccess')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user