swiper-next
Version:
Vue3 的 Swiper 组件
45 lines (43 loc) • 2.41 kB
TypeScript
import { ComponentInternalInstance, RendererNode } from 'vue';
interface HTMLElementWithDataset extends HTMLElement {
__uniDataset?: Record<string, any>;
}
export declare function normalizeTarget(el: HTMLElement): {
id: string;
dataset: DOMStringMap & Record<string, any>;
offsetTop: number;
offsetLeft: number;
};
export declare function getCustomDataset(el: HTMLElement | HTMLElementWithDataset): DOMStringMap & Record<string, any>;
export declare function cache<T>(fn: (str: string) => T): (str: string) => T;
export declare function cacheStringFunction(fn: (string: string) => string): (str: string) => string;
export declare function getLen(str?: string): number;
export declare function addLeadingSlash(str: string): string;
export declare function removeLeadingSlash(str: string): string;
export declare const invokeArrayFns: (fns: Function[], arg?: any) => any;
export declare function updateElementStyle(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): void;
export declare function once<T extends (...args: any[]) => any>(fn: T, ctx?: unknown): T;
export declare const sanitise: (val: unknown) => any;
export declare function formatDateTime({ date, mode }: {
date?: Date | undefined;
mode?: string | undefined;
}): string;
interface Options {
success?: (res: any) => void;
fail?: (res: any) => void;
complete?: (res: any) => void;
}
export declare function callOptions(options: Options, errMsg: string): void;
export declare function callOptions(options: Options, data: {
[key: string]: any;
errMsg: string;
}): void;
export declare function getValueByDataPath(obj: any, path: string): unknown;
export declare function sortObject<T extends Object>(obj: T): T;
export declare const ON_WXS_INVOKE_CALL_METHOD = "onWxsInvokeCallMethod";
export declare function resolveOwnerEl(instance: ComponentInternalInstance, multi: true): RendererNode[];
export declare function resolveOwnerEl(instance: ComponentInternalInstance): RendererNode | null;
export declare function isBuiltInComponent(tag: string): boolean;
export declare function resolveOwnerVm(vm: ComponentInternalInstance): import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import('vue').ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined;
export declare function upx2px(num: number): number;
export {};