Skip to content

[Dialog] 命令式调用,destroyOnClose不会移除创建的根元素 #2356

Open

Description

@Jesse205

tdesign-mobile-vue 版本

1.17.0-beta

重现链接

https://stackblitz.com/edit/rpyyrvs5-ouy7njus?file=src%2Fdemo.vue

重现步骤

路径1

  1. 命令式打开对话框,并传入 destroyOnClose
  2. 关闭对话框

期望结果

关闭对话框后,没有任何元素残留

实际结果

关闭对话框后,仍然残留<div data-v-app=""></div>
Image

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

对话框不会销毁的问题曾经在 #1148 修复过,但当时的移除元素是发生在onClose中。后来,#1513 修正了 onClose 的行为,但是没有在 onClosed 中补充移除元素的代码。

Activity

  1. github-actions commented on Oct 8, 2026

    @github-actions
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions