feat: 添加 useDialogRef 函数,优化对话框引用管理,更新对话框组件逻辑
Some checks failed
/ build-and-deploy-to-vercel (push) Failing after 34s
/ depcheck (push) Has been cancelled
/ playwright (push) Has been cancelled

This commit is contained in:
严浩
2024-12-14 21:54:51 +08:00
parent b9ad180d4c
commit 553d3be256
3 changed files with 16 additions and 6 deletions

View File

@ -68,6 +68,7 @@ export const DialogService: DialogServiceMethods = {
},
};
declare global {
type DynamicDialogOptions = import('primevue/dynamicdialogoptions').DynamicDialogOptions;
export function useDialogRef() {
type DialogRef = ComputedRef<import('primevue/dynamicdialogoptions').DynamicDialogInstance>;
return inject<DialogRef>('dialogRef');
}