Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

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

Open
suncheng333 opened this issue Nov 11, 2021 · 2 comments
Open

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

suncheng333 opened this issue Nov 11, 2021 · 2 comments

Comments

@suncheng333
Copy link

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.
  • Node version: 16.5
  • NPM version:7.19.1
  • vue-cli version: (if necessary) vue3 & vue-cli-plugin-electron-builder 2.1.1
  • Operating System: win10

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

@geeklibin
Copy link

是不是路由上加了keep-alive

@dingteddy
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants