fix: global vue type augmentation
Augment vue types instead of 'vue/types/vue' and '@vue/runtime-core' to fix incompatibility with other libraries caused by the current augmentation behaviorpull/6380/head
parent
2fa7e77121
commit
327532fc4d
|
@ -358,16 +358,7 @@ export declare function usePrimeVue(): {
|
|||
declare const plugin: Plugin;
|
||||
export default plugin;
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$primevue: {
|
||||
config: PrimeVueConfiguration;
|
||||
changeTheme: PrimeVueChangeTheme;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
$primevue: {
|
||||
config: PrimeVueConfiguration;
|
||||
|
|
|
@ -27,13 +27,7 @@ export interface ConfirmationServiceMethods {
|
|||
close(): void;
|
||||
}
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$confirm: ConfirmationServiceMethods;
|
||||
}
|
||||
}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
$confirm: ConfirmationServiceMethods;
|
||||
}
|
||||
|
|
|
@ -25,13 +25,7 @@ export interface DialogServiceMethods {
|
|||
open(content: any, options?: DynamicDialogOptions): DynamicDialogInstance;
|
||||
}
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$dialog: DialogServiceMethods;
|
||||
}
|
||||
}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
$dialog: DialogServiceMethods;
|
||||
}
|
||||
|
|
|
@ -39,13 +39,7 @@ export interface ToastServiceMethods {
|
|||
removeAllGroups(): void;
|
||||
}
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$toast: ToastServiceMethods;
|
||||
}
|
||||
}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
$toast: ToastServiceMethods;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue