SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.45k stars 1.54k forks source link

electron中vue路由切换,不销毁前一个页面的问题 #1116

Open suncheng333 opened 2 years ago

suncheng333 commented 2 years ago

Found an issue or bug with electron-vue? Tell me all about it!

Questions regarding how to use electron or vue are likely to be closed as they are not direct issues with this boilerplate. Please seek solutions from official documentation or their respective communities.

Describe the issue / bug.

# electron进程中采用vue-router的路由切换,我从页面A 切换到 页面B 我希望页面A 销毁,但是实际上页面A没有销毁,没有进入vue的生命周期destroy,我频繁切换页面A 和 B(页面A和B的进程叠加残留,导致其他electron进程向该进程通讯,明明其他electron只发送一条,而页面A和B的所在electron进程却接收到多条数据),请问该问题该如何处理(虽然我将页面A和B拆分成两个electron进程可以解决问题,是electron内多页面的路由切换有问题吗)

How can I reproduce this problem?

# www

If visual, provide a screenshot.

# www

Tell me about your development environment.

If you are looking to suggest an enhancement or feature, then feel free to remove everything above.

geeklibin commented 2 years ago

是不是路由上加了keep-alive

dingteddy commented 1 year ago

请问解决了么,碰到同样的问题 @suncheng333