Skip to content

模态框 Modal 开启拖拽后,会内存泄漏 #7341

@experience9091

Description

@experience9091

描述错误

模态框 Modal 开启拖拽后,会内存泄漏,我用官方的界面做演示,检查源码发现cleanUp有问题

复现步骤

1.打开模态框之前检查dom node

Image

2.打开后检查dom node

Image

3.关闭后再检查

Image

4.重复n次后再检查

Image

5.最后进行源码检查

Image

这里应该是解绑,而不是绑定新的。不然会不停的产生内存泄漏。

最小复现链接

https://www.naiveui.com/zh-CN/os-theme/components/modal

系统信息

浏览器

使用的包管理器

pnpm

验证

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood reproduction ✨This issue provides a good reproduction

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions