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

Bug: modal、drawer 还没有open,就会执行抽离组件的生命周期 #5164

Closed
5 tasks done
xiaosifeng opened this issue Dec 17, 2024 · 3 comments
Closed
5 tasks done

Comments

@xiaosifeng
Copy link

Version

Vben Admin V5

Describe the bug?

modal、drawer 还没有open,就会执行抽离组件的生命周期,
这样就会导致里面声明的变量、生命周期逻辑有问题,
能不能提供一个完全销毁的属性

Reproduction

System Info

Relevant log output

No response

Validations

@mynetfan
Copy link
Collaborator

mynetfan commented Dec 17, 2024

connectedComponent传入的是抽离组件定义,不是抽离组件的实例。open和close你可以理解为显示和隐藏,不是创建和销毁

@xiaosifeng
Copy link
Author

connectedComponent传入的是抽离组件定义,不是抽离组件的实例。open和close你可以理解为显示和隐藏,不是创建和销毁

明白,比如说详情页、表单页面要请求接口只能写在打开的回调里?或者说需要 index -> model -> 再嵌套一个form组件,

@mynetfan
Copy link
Collaborator

可以写在打开的回调里,也可以打开的时候直接传入数据。弹窗演示页面 https://www.vben.pro/#/examples/modal 有个内外数据共享示例可以参考一下

@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants