vue-apps/com.actionsoft.apps.coe.pal.modelconvert/lib/awsui.es/utils/tools.d.ts

230 lines
6.5 KiB
TypeScript
Raw Normal View History

2022-09-30 16:40:01 +08:00
import type { App } from "vue";
declare const tools: {
/**
* const变量
* @name
* @defaultValue
*
*/
getConstByName<T = any>(name: string, defaultValue: T): T;
/**
* 36ID字符串
*/
uuid(): string;
/**
* 1
* @param type 1
*/
getCountIndex(type?: string | undefined): number;
/**
* undefined
*/
isNotNull(str: string): boolean;
/**
* undefined
*/
isNull(str: string): boolean;
/**
* Object对象是否为空Boolean
*/
isNotNullObject(obj: any): boolean;
/**
* Object对象在Array中的索引值
*/
queryObjectInArrayIndex(arr: string[], objKey: any, filed: string): number;
/**
* offsetJquery的offset方法
* @param elem DOM对象
*
*/
getOffset: (elem: HTMLElement) => {
top: number;
left: number;
height: number;
width: number;
};
/**
* dom的样式
* @param toDom DOM对象
* @param cls
*
*/
addCls: (toDom: HTMLElement, cls: string) => void;
/**
* dom的样式
* @param toDom DOM对象
* @param cls
*
*/
removeCls: (toDom: HTMLElement, cls: string) => void;
_buildIndex(baseId: string, ...args: any[]): string;
/**
*
* @params date
* @params fmt
*/
formatDate(date: Date, fmt: string): string;
/**
* Idchildren~
* @param item
* @param baseId ID进行生成
* @param number
*
*/
generMenuId(item: any, baseId: string, i?: number | null | undefined): void;
/**
*
*/
getBrowser(): {
isStrict: boolean;
isOpera: boolean;
isSafari: boolean;
isIE: boolean;
isIE6: boolean;
isIE7: boolean;
isIE8: boolean;
isIE9: boolean;
isIE10: boolean;
isIE11: boolean;
isGecko: boolean;
isFirefox: boolean;
isChrome: boolean;
isBorderBox: boolean;
isWindows: boolean;
isMac: boolean;
isAir: boolean;
isLinux: boolean;
isSecure: boolean;
isIPhone: boolean;
isIPhoneX: boolean;
isIPad: boolean;
isAWSMobilePortalApp: boolean;
isAndroid: boolean;
isDingtalk: boolean;
isWechat: boolean;
isWxWork: boolean;
isFeishu: boolean;
isWeLink: boolean;
isMobile: boolean;
};
};
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
awsuiTools: typeof tools;
}
}
export { tools };
declare const _default: {
tools: {
/**
* const变量
* @name
* @defaultValue
*
*/
getConstByName<T = any>(name: string, defaultValue: T): T;
/**
* 36ID字符串
*/
uuid(): string;
/**
* 1
* @param type 1
*/
getCountIndex(type?: string | undefined): number;
/**
* undefined
*/
isNotNull(str: string): boolean;
/**
* undefined
*/
isNull(str: string): boolean;
/**
* Object对象是否为空Boolean
*/
isNotNullObject(obj: any): boolean;
/**
* Object对象在Array中的索引值
*/
queryObjectInArrayIndex(arr: string[], objKey: any, filed: string): number;
/**
* offsetJquery的offset方法
* @param elem DOM对象
*
*/
getOffset: (elem: HTMLElement) => {
top: number;
left: number;
height: number;
width: number;
};
/**
* dom的样式
* @param toDom DOM对象
* @param cls
*
*/
addCls: (toDom: HTMLElement, cls: string) => void;
/**
* dom的样式
* @param toDom DOM对象
* @param cls
*
*/
removeCls: (toDom: HTMLElement, cls: string) => void;
_buildIndex(baseId: string, ...args: any[]): string;
/**
*
* @params date
* @params fmt
*/
formatDate(date: Date, fmt: string): string;
/**
* Idchildren~
* @param item
* @param baseId ID进行生成
* @param number
*
*/
generMenuId(item: any, baseId: string, i?: number | null | undefined): void;
/**
*
*/
getBrowser(): {
isStrict: boolean;
isOpera: boolean;
isSafari: boolean;
isIE: boolean;
isIE6: boolean;
isIE7: boolean;
isIE8: boolean;
isIE9: boolean;
isIE10: boolean;
isIE11: boolean;
isGecko: boolean;
isFirefox: boolean;
isChrome: boolean;
isBorderBox: boolean;
isWindows: boolean;
isMac: boolean;
isAir: boolean;
isLinux: boolean;
isSecure: boolean;
isIPhone: boolean;
isIPhoneX: boolean;
isIPad: boolean;
isAWSMobilePortalApp: boolean;
isAndroid: boolean;
isDingtalk: boolean;
isWechat: boolean;
isWxWork: boolean;
isFeishu: boolean;
isWeLink: boolean;
isMobile: boolean;
};
};
install(app: App): void;
};
export default _default;