vue-devui
Version:
DevUI components based on Vite and Vue3
39 lines (38 loc) • 1.37 kB
TypeScript
interface ElementRef {
nativeElement?: any;
}
export declare class Utils {
/**
* Polyfill for element.matches.
* See: https://developer.mozilla.org/en/docs/Web/API/Element/matches#Polyfill
* element
*/
static matches(element: any, selectorName: string): boolean;
/**
* Applies the specified css class on nativeElement
* elementRef
* className
*/
static addClass(elementRef: ElementRef | any, className: string): void;
/**
* Removes the specified class from nativeElement
* elementRef
* className
*/
static removeClass(elementRef: ElementRef | any, className: string): void;
/**
* Gets element with valid classList
*
* elementRef
* @returns ElementRef | null
*/
private static getElementWithValidClassList;
static slice<T>(args: T[], slice?: number, sliceEnd?: number): T[];
static addElStyles(el: any, styles: any): void;
static dispatchEventToUnderElement(event: DragEvent, target?: HTMLElement, eventType?: string): DragEvent;
}
import { InjectionKey } from 'vue';
export declare function injectFromContext<T>(token: InjectionKey<T> | string, context: any): T | undefined;
export declare function getContext(): any;
export declare function provideToContext<T>(token: InjectionKey<T> | string, value: T, context: any): void;
export {};