mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #4103 - Update lifecycle names in Base* files
This commit is contained in:
parent
2572561902
commit
63b5b8be8e
6 changed files with 71 additions and 33 deletions
35
components/lib/basedirective/BaseDirective.d.ts
vendored
35
components/lib/basedirective/BaseDirective.d.ts
vendored
|
@ -1,6 +1,37 @@
|
|||
import { ObjectDirective } from 'vue';
|
||||
import { DirectiveBinding, VNode } from 'vue';
|
||||
|
||||
export interface DirectiveHooks extends Omit<ObjectDirective, 'getSSRProps' | 'deep'> {}
|
||||
export interface DirectiveInstance<T = any, V = any> {
|
||||
$name: string | undefined;
|
||||
$host: T;
|
||||
$binding: DirectiveBinding<V>;
|
||||
$el: HTMLElement | undefined;
|
||||
$css?: {
|
||||
classes?: undefined;
|
||||
inlineStyles?: undefined;
|
||||
loadStyle?: () => void;
|
||||
};
|
||||
defaultPT: any;
|
||||
isUnstyled: boolean;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/* All parameters passed by the directive of Vue.js */
|
||||
export interface DirectiveOptions<T = any, Prev = VNode<any, T> | null, V = any> {
|
||||
el: T;
|
||||
binding: DirectiveBinding<V>;
|
||||
vnode: VNode<any, T>;
|
||||
prevVNode: Prev;
|
||||
}
|
||||
|
||||
export interface DirectiveHooks<T = any, V = any> {
|
||||
onCreated?: (instance: DirectiveInstance<T, V> | undefined, options: DirectiveOptions<T, null, V>) => void;
|
||||
onBeforeMount?: (instance: DirectiveInstance<T, V> | undefined, options: DirectiveOptions<T, null, V>) => void;
|
||||
onMounted?: (instance: DirectiveInstance<T, V> | undefined, options: DirectiveOptions<T, null, V>) => void;
|
||||
onBeforeUpdate?: (instance: DirectiveInstance<T, V> | undefined, options: DirectiveOptions<T, VNode<any, T>, V>) => void;
|
||||
onUpdated?: (instance: DirectiveInstance<T, V> | undefined, options: DirectiveOptions<T, VNode<any, T>, V>) => void;
|
||||
onBeforeUnmount?: (instance: DirectiveInstance<T, V> | undefined, options: DirectiveOptions<T, null, V>) => void;
|
||||
onUnmounted?: (instance: DirectiveInstance<T, V> | undefined, options: DirectiveOptions<T, null, V>) => void;
|
||||
}
|
||||
|
||||
export interface BaseDirectivePassThroughOptions {
|
||||
hooks?: DirectiveHooks;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue