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

[popup] popup 是否可以支持组件关闭时销毁节点 #1831

Closed
CahierX opened this issue Mar 23, 2023 · 6 comments · Fixed by #1864
Closed

[popup] popup 是否可以支持组件关闭时销毁节点 #1831

CahierX opened this issue Mar 23, 2023 · 6 comments · Fixed by #1864
Labels
IssueShoot middle middle level of difficulties

Comments

@CahierX
Copy link

CahierX commented Mar 23, 2023

这个功能解决了什么问题

popup 组件在未开启时,内部节点已经开始渲染,如果用户没有打开的意愿,浪费资源,再次打开不会触发页面重新加载,导致数据还是旧的,希望关闭时销毁节点

你建议的方案是什么

关闭时销毁节点

IssueShoot

  • 预估时长: 3
  • 期望完成时间: 2023-03-31 00:00:00 +0000 UTC
  • 开发难度: 中
  • 参与人数: 1
  • 验收标准: 实现期望改造效果,提 PR 并通过验收无误
  • 备注: 最终激励以实际提交 pull request 并合并为准
@github-actions
Copy link
Contributor

👋 @CahierX,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

♥️ 有劳 @deantian @gnauhca 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @CahierX

@LeeJim LeeJim added IssueShoot middle middle level of difficulties labels Mar 24, 2023
@jarmywang
Copy link
Collaborator

@CahierX 请问是否方便提供CodePen、CodeSandbox 或 GitHub 仓库的相关示例代码

@CahierX
Copy link
Author

CahierX commented Mar 30, 2023

popup 组件bin并未提供 destroyOnClose 参数
image
但是 Drawer 组件提供了destroyOnClose参数,看源码,Drawer 组件内部是调用的 Popup 组件,所以 Drawer 组件的destroyOnClose的功能也无效
image

image

使用的 tdesign 版本为 1.0.0-rc.2

@CahierX
Copy link
Author

CahierX commented Mar 30, 2023

popup 组件bin并未提供 destroyOnClose 参数 image 但是 Drawer 组件提供了destroyOnClose参数,看源码,Drawer 组件内部是调用的 Popup 组件,所以 Drawer 组件的destroyOnClose的功能也无效 image

image

使用的 tdesign 版本为 1.0.0-rc.2

升级了最新版 1.1.0 也存在此问题

@jarmywang
Copy link
Collaborator

@CahierX 收到,感谢反馈,我看下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IssueShoot middle middle level of difficulties
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants