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

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

@suncheng333

Description

@suncheng333

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions