@tmagic/utils 1.0.0-beta.3 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MNode } from '@tmagic/schema';
|
|
2
|
+
export declare const sleep: (ms: number) => Promise<void>;
|
|
3
|
+
export declare const datetimeFormatter: (v: string | Date, defaultValue?: string, f?: string) => string | number;
|
|
4
|
+
export declare const asyncLoadJs: (url: string, crossOrigin?: string | undefined, document?: Document) => any;
|
|
5
|
+
export declare const asyncLoadCss: (url: string) => Promise<unknown>;
|
|
6
|
+
export declare const toLine: (name?: string) => string;
|
|
7
|
+
export declare const toHump: (name?: string) => string;
|
|
8
|
+
export declare const emptyFn: () => any;
|
|
9
|
+
/**
|
|
10
|
+
* 通过id获取组件在应用的子孙路径
|
|
11
|
+
* @param {number | string} id 组件id
|
|
12
|
+
* @param {Array} data 要查找的根容器节点
|
|
13
|
+
* @return {Array} 组件在data中的子孙路径
|
|
14
|
+
*/
|
|
15
|
+
export declare const getNodePath: (id: number | string, data?: MNode[]) => MNode[];
|
|
16
|
+
export declare const filterXSS: (str: string) => string;
|
|
17
|
+
export declare const getUrlParam: (param: string, url?: string | undefined) => string;
|
|
18
|
+
export declare const isPop: (node: MNode) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
package/package.json
CHANGED