1.0.4 • Published 12 months ago

h5-common-utils v1.0.4

Weekly downloads
-
License
-
Repository
github
Last release
12 months ago
// Generated by dts-bundle v0.7.3

declare module 'h5-common-utils' {
    import * as WebGL from 'h5-common-utils/webGL';
    import * as UrlSearch from 'h5-common-utils/urlSearch';
    import * as UiTool from 'h5-common-utils/uiTool';
    import * as Price from 'h5-common-utils/price';
    export { WebGL, UrlSearch, UiTool, Price, };
}

declare module 'h5-common-utils/webGL' {
    /**
      * @description: 判断是否支持WebGL
      * @param {*}
      * @return {boolean}
      */
    export const detectWebGLContext: () => boolean;
}

declare module 'h5-common-utils/urlSearch' {
    /**
        * @description: 获取url参数
        * @param {
     *       param: string
     *       }
     * @return {string | undefined}
     */
    export const getQueryParams: (param: string) => string | undefined;
    /**
        * @description: 替换更新url参数
        * @param {
     *      uri: string, key: string, value: string
     *       }
     * @return {string}
     */
    export const updateQueryStringParameter: (uri: string, key: string, value: string) => string;
}

declare module 'h5-common-utils/uiTool' {
    /**
     * @description: 获得滚动最大ScrollTop
     * @param {
     *         element?: HTMLElement
     *       }
     * @return {number}
     */
    export const getScrollTop: (element?: HTMLElement | undefined) => number;
    /**
        * @description: 获得滚动最大ScrollHeight
        * @param {
     *         element?: HTMLElement
     *       }
     * @return {number}
     */
    export const getScrollHeight: (element?: HTMLElement | undefined) => number;
    /**
        * @description: 禁止滚动
        * @param {
     *         element?: HTMLElement
     *       }
     * @return {void}
     */
    export const preventScroll: (element?: HTMLElement) => void;
    /**
        * @description: 允许滚动
     */
    export const allowScroll: (element?: HTMLElement) => void;
    /**
        * @description: 瀑布流行列转化
        * @param {
     *          columns: T[]
     *       }
     * @return { left: T[],right: T[]}
     */
    export function columnToRow<T>(columns: T[]): {
            left: T[];
            right: T[];
    };
}

declare module 'h5-common-utils/price' {
    /**
      * @description: 标准价格展示
      * @param {
      *          price: string | number
      *       }
      * @return {string}
      */
    export const standardPrice: (price: string | number) => string;
}
`