@kengic/vue 0.0.2-beta.59 → 0.0.2-beta.60

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.
@@ -1,4 +1,4 @@
1
1
  export * from './app.util';
2
- export * from './file.util';
2
+ export * from './kg.util';
3
3
  export * from './logger.util';
4
4
  export * from './route.util';
@@ -0,0 +1,38 @@
1
+ /**
2
+ * 通用工具.
3
+ */
4
+ export declare class KgUtil {
5
+ /**
6
+ * 根据'文件大小数值'获取'文件大小文本'.
7
+ * @param size 文件大小数值.
8
+ */
9
+ static getFileSize(size: any): string;
10
+ /**
11
+ * BASE64 转换为 BLOB.
12
+ * @param base64 base64 字符串.
13
+ * @param contentType 文件类型.
14
+ * @param sliceSize 分块大小.
15
+ */
16
+ static base64toBlob(base64: string, contentType: string, sliceSize?: number): Blob;
17
+ /**
18
+ * 下载文件.
19
+ * @param data 文件数据.
20
+ * @param fileName 文件名称, 包含后缀.
21
+ * @param contentType 文件类型.
22
+ */
23
+ static downloadFile(data: string | BlobPart, fileName: string, contentType: string): void;
24
+ /**
25
+ * 解析请求参数.
26
+ * 1. 填充通用参数的值
27
+ * a. 仓库: '{WAREHOUSE}'
28
+ * @param params 请求参数.
29
+ * @param warehouseID 仓库编号.
30
+ */
31
+ static parseParams(params?: Record<string, any> | null, warehouseID?: string | null): any;
32
+ /**
33
+ * 解析请求参数: 解析字符串类型的参数值.
34
+ * @param value 参数的原始值.
35
+ * @param warehouseID 仓库编号.
36
+ */
37
+ private static parseParamFromString;
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.0.2-beta.59",
3
+ "version": "0.0.2-beta.60",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",
@@ -1,19 +0,0 @@
1
- /**
2
- * 根据'文件大小数值'获取'文件大小文本'.
3
- * @param size 文件大小数值.
4
- */
5
- export declare function getFileSize(size: any): string;
6
- /**
7
- * base64 转换为 blob.
8
- * @param base64 base64 字符串.
9
- * @param contentType 文件类型.
10
- * @param sliceSize 分块大小.
11
- */
12
- export declare function base64toBlob(base64: string, contentType: string, sliceSize?: number): Blob;
13
- /**
14
- * 下载文件.
15
- * @param data 文件数据.
16
- * @param fileName 文件名称, 包含后缀.
17
- * @param contentType 文件类型.
18
- */
19
- export declare function downloadFile(data: string | BlobPart, fileName: string, contentType: string): void;