uni-shared.d.ts 2.1 KB
Newer Older
fxy060608's avatar
fxy060608 已提交
1 2 3 4 5

export declare const BUILT_IN_TAGS: string[];

export declare const COMPONENT_NAME_PREFIX = "VUni";

fxy060608's avatar
fxy060608 已提交
6 7 8
export declare const COMPONENT_PREFIX: string;

export declare const COMPONENT_SELECTOR_PREFIX = "uni-";
fxy060608's avatar
fxy060608 已提交
9 10 11 12 13 14

export declare function debounce(fn: Function, delay: number): {
    (this: any): void;
    cancel(): void;
};

fxy060608's avatar
fxy060608 已提交
15 16 17 18 19 20 21 22 23 24 25
/**
 * Decode text using `decodeURIComponent`. Returns the original text if it
 * fails.
 *
 * @param text - string to decode
 * @returns decoded string
 */
export declare function decode(text: string | number): string;

export declare function decodedQuery(query?: Record<string, any>): Record<string, string>;

fxy060608's avatar
fxy060608 已提交
26 27
export declare function getLen(str?: string): number;

fxy060608's avatar
fxy060608 已提交
28 29
export declare const invokeArrayFns: (fns: Function[], arg?: any) => any;

fxy060608's avatar
fxy060608 已提交
30 31 32 33 34 35 36 37
export declare function isBuiltInComponent(tag: string): boolean;

export declare function isCustomElement(tag: string): boolean;

export declare function isNativeTag(tag: string): boolean;

export declare const NAVBAR_HEIGHT = 44;

fxy060608's avatar
fxy060608 已提交
38 39
export declare function normalizeDataset(el: Element): any;

fxy060608's avatar
fxy060608 已提交
40 41
export declare function once(fn: (...args: any[]) => any, ctx?: unknown): (...args: any[]) => any;

fxy060608's avatar
fxy060608 已提交
42 43 44 45 46 47 48 49 50
/**
 * https://github.com/vuejs/vue-router-next/blob/master/src/query.ts
 * @internal
 *
 * @param search - search string to parse
 * @returns a query object
 */
export declare function parseQuery(search: string): Record<string, any>;

fxy060608's avatar
fxy060608 已提交
51 52 53 54
export declare function passive(passive: boolean): {
    passive: boolean;
};

fxy060608's avatar
fxy060608 已提交
55 56
export declare const PLUS_RE: RegExp;

fxy060608's avatar
fxy060608 已提交
57 58
export declare function plusReady(callback: () => void): void;

fxy060608's avatar
fxy060608 已提交
59 60
export declare const PRIMARY_COLOR = "#007aff";

fxy060608's avatar
fxy060608 已提交
61 62
export declare function removeLeadingSlash(str: string): string;

fxy060608's avatar
fxy060608 已提交
63 64
export declare const RESPONSIVE_MIN_WIDTH = 768;

fxy060608's avatar
fxy060608 已提交
65 66 67 68 69 70
export declare function stringifyQuery(obj?: Record<string, any>, encodeStr?: typeof encodeURIComponent): string;

export declare const TABBAR_HEIGHT = 50;

export declare const TAGS: string[];

fxy060608's avatar
fxy060608 已提交
71 72
export declare function updateElementStyle(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): void;

fxy060608's avatar
fxy060608 已提交
73
export { }