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

[Dialog] 命令行调用方法的Dialog不会销毁 #1148

Closed
LoopZhou opened this issue Nov 6, 2023 · 2 comments · Fixed by #1149
Closed

[Dialog] 命令行调用方法的Dialog不会销毁 #1148

LoopZhou opened this issue Nov 6, 2023 · 2 comments · Fixed by #1149
Labels
bug Something isn't working

Comments

@LoopZhou
Copy link
Collaborator

LoopZhou commented Nov 6, 2023

tdesign-mobile-vue 版本

1.0.6

重现链接

https://stackblitz.com/edit/hnyrgs-macvbr?file=src%2Fpages%2Fdemo.vue

重现步骤

命令行调用方法的Dialog不会销毁

  1. 示例点击到demo页面,不断的点击命令行操作按钮,每次都会创建一下新的dom,不会销毁

  2. 示例点击跳转home和跳转demo的页面跳转中,通过命令行创建的按钮的dom都不会销毁。

  3. 在确定弹窗打开的情况下,通过手机端的返回键或浏览器返回时,对话框不会消失。

image

期望结果

  1. 优化命令行调用方法的Dialog的销毁
  2. 在弹窗打开的情况下,页面跳转时是否可自动销毁对话框,或提供销毁方法

实际结果

  1. 每次创建都不会自动销毁弹窗的dom。
  2. 弹窗打开的情况下,路由跳转,对话框不会消失。

框架版本

Vue(3.2.0)

浏览器版本

Chrome(117.0.5938.149)

系统版本

MacOS

Node版本

16.17.0

补充说明

No response

Copy link
Contributor

github-actions bot commented Nov 6, 2023

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

@fennghuang
Copy link
Collaborator

感谢反馈
销毁可以使用 destroyOnClose: true,但这个属性没有透传过去,我调整一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants