fix: 修复 useVbenModal useVbenDrawer 传入参数失效的问题 (#7964)

- 把provide的key值修改为与inject一致的options
pull/355/head^2
boisduval 2026-05-28 12:49:23 +08:00 committed by GitHub
parent acf289381e
commit f7540c119b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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();