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

Drawer组件添加一个lazy属性,指定是否懒挂载 #5830

Open
3 tasks done
songjiachao opened this issue Apr 1, 2024 · 2 comments
Open
3 tasks done

Drawer组件添加一个lazy属性,指定是否懒挂载 #5830

songjiachao opened this issue Apr 1, 2024 · 2 comments
Labels
feature request New feature or request

Comments

@songjiachao
Copy link

Clear and concise description of the problem

需要在Drawer show为true之前,获取Drawer实例DOM。但是现在Drawer是懒挂载的,需要show改为true后,才能生成实例DOM

Suggested solution

Expected API (期望的 API)
Drawer组件添加一个lazy属性,默认为true,懒挂载。设为false时,初始化时立马挂载。

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@songjiachao songjiachao added the feature request New feature or request label Apr 1, 2024
@songjiachao
Copy link
Author

类似 ant design 中的forceRender

https://ant-design.antgroup.com/components/drawer-cn

@NHZEX
Copy link

NHZEX commented Jun 17, 2024

Modal也需要这个懒挂载这个特性。

display-directive的组件建议都推广show:lazy参数。

ref: Tabs增加懒加载功能(lazy-load for tabs) · Issue #1374 · tusen-ai/naive-ui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants