Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

内存泄漏,键盘监听事件未清除 #2927

Closed
wzrove opened this issue Dec 12, 2022 · 2 comments · Fixed by halo-dev/console#767
Closed

内存泄漏,键盘监听事件未清除 #2927

wzrove opened this issue Dec 12, 2022 · 2 comments · Fixed by halo-dev/console#767
Assignees
Labels
area/console Issues or PRs related to the Halo Console kind/bug Categorizes issue or PR as related to a bug.

Comments

@wzrove
Copy link
Member

wzrove commented Dec 12, 2022

是什么版本出现了此问题?

2.0

使用的什么数据库?

H2

使用的哪种方式部署?

Docker

在线站点地址

https://demo.halo.run/console/#/menus?group=&menu=menu-UsvJQ

发生了什么?

https://github.com/halo-dev/console/blob/7e0daaedac5ba11535ec7820659414dc54fd6eb8/src/layouts/BasicLayout.vue#L84

组件卸载未清除监听事件。

onUnmounted(() => {
  document.addEventListener("keydown", handleGlobalSearchKeybinding);
});

相关日志输出

No response

附加信息

@wzrove wzrove changed the title 内存泄漏,表单监听事件未清楚 内存泄漏,键盘监听事件未清除 Dec 12, 2022
@wzrove
Copy link
Member Author

wzrove commented Dec 12, 2022

/kind bug
/area console

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. area/console Issues or PRs related to the Halo Console labels Dec 12, 2022
@ruibaby
Copy link
Member

ruibaby commented Dec 13, 2022

/assign @wzrove

f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this issue Dec 13, 2022
…nt is unmounted (#767)

#### What type of PR is this?
/kind bug

#### What this PR does / why we need it:


![image](https://user-images.githubusercontent.com/88016243/207133131-aa2404b1-c9d3-49fc-a1a7-949dd557e30c.png)

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#2927

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
None
```
JohnNiang pushed a commit to JohnNiang/halo that referenced this issue Mar 2, 2023
…nt is unmounted (halo-dev/console#767)

#### What type of PR is this?
/kind bug

#### What this PR does / why we need it:


![image](https://user-images.githubusercontent.com/88016243/207133131-aa2404b1-c9d3-49fc-a1a7-949dd557e30c.png)

#### Which issue(s) this PR fixes:

Fixes halo-dev#2927

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
None
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console Issues or PRs related to the Halo Console kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants