y-design-ssr
Version:
SSR component library of YUI with Vue3
30 lines (29 loc) • 1.19 kB
TypeScript
import { App, ComponentPublicInstance, DirectiveBinding, Slot } from 'vue';
import { LoadingPropsType } from './loading';
type CustomElement = HTMLElement & {
instance: ComponentPublicInstance;
customProps: Partial<LoadingPropsType>;
customSlots: Record<string, Slot>;
};
/**
* @description: LoadingDirective对象
*/
declare const loadingDirective: {
install: (app: App) => void;
};
declare const directive: {
getSSRProps: (binding: DirectiveBinding) => Record<string, unknown>;
mounted: (el: CustomElement, binding: DirectiveBinding) => void;
updated: (el: CustomElement, binding: DirectiveBinding) => void;
unmounted: (el: CustomElement) => void;
};
declare const directiveProps: {
getSSRProps: (binding: DirectiveBinding) => Record<string, unknown>;
beforeMount: (el: CustomElement, binding: DirectiveBinding<Partial<LoadingPropsType>>) => void;
};
declare const directiveSlots: {
getSSRProps: (binding: DirectiveBinding) => Record<string, unknown>;
beforeMount: (el: CustomElement, binding: DirectiveBinding<Record<string, Slot>>) => void;
};
export default loadingDirective;
export { directive, directiveProps, directiveSlots };