-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Version
Vben Admin V5
Describe the bug?
抽离的内部组件是Tab标签切换表单, 关闭时观察到窗口已销毁, 但实际内部组件依旧是有状态的, 这不符合预期
Reproduction
// 外部调用
const [Modal, modalApi] = useVbenModal({
// 连接抽离的组件
connectedComponent: SubUpdateModal,
destroyOnClose: true,
});// SubUpdateModal
const [Modal, modalApi] = useVbenModal({
class: 'w-[710px]',
footer: false,
onClosed() {
// 目前只能在关闭时手动重置内部组件数据
},
onOpenChange(isOpen) {
if (isOpen) {
// do something
}
},
});<template>
<Modal :title="getTitleText()">
<Card
class="m-3"
:active-tab-key="activeKey"
:tab-list="tabOptions"
@tab-change="tabChange"
>
// sub component
</Card>
</Modal>
</template>System Info
System:
OS: macOS 15.4
CPU: (12) arm64 Apple M2 Pro
Memory: 84.50 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.18.1 - ~/.nvm/versions/node/v20.18.1/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.1/bin/npm
pnpm: 10.8.0 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 135.0.7049.86
Safari: 18.4Relevant log output
Validations
- Read the docs
- Ensure the code is up to date. (Some issues have been fixed in the latest version)
- I have searched the existing issues and checked that my issue does not duplicate any existing issues.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working