Browse Source
fix: 修复 useVbenModal useVbenDrawer 传入参数失效的问题 (#7964)
- 把provide的key值修改为与inject一致的options
pull/7971/head
boisduval
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
2 additions and
2 deletions
-
packages/@core/ui-kit/popup-ui/src/drawer/use-drawer.ts
-
packages/@core/ui-kit/popup-ui/src/modal/use-modal.ts
|
|
@ -55,7 +55,7 @@ export function useVbenDrawer< |
|
|
// 不能用 Object.assign,会丢失 api 的原型函数
|
|
|
// 不能用 Object.assign,会丢失 api 的原型函数
|
|
|
Object.setPrototypeOf(extendedApi, api); |
|
|
Object.setPrototypeOf(extendedApi, api); |
|
|
}, |
|
|
}, |
|
|
defaultOptions, |
|
|
options: defaultOptions, |
|
|
async reCreateDrawer() { |
|
|
async reCreateDrawer() { |
|
|
isDrawerReady.value = false; |
|
|
isDrawerReady.value = false; |
|
|
await nextTick(); |
|
|
await nextTick(); |
|
|
|
|
|
@ -51,7 +51,7 @@ export function useVbenModal<TParentModalProps extends ModalProps = ModalProps>( |
|
|
Object.setPrototypeOf(extendedApi, api); |
|
|
Object.setPrototypeOf(extendedApi, api); |
|
|
}, |
|
|
}, |
|
|
consumed: false, |
|
|
consumed: false, |
|
|
defaultOptions, |
|
|
options: defaultOptions, |
|
|
async reCreateModal() { |
|
|
async reCreateModal() { |
|
|
isModalReady.value = false; |
|
|
isModalReady.value = false; |
|
|
await nextTick(); |
|
|
await nextTick(); |
|
|
|