xframelib 0.8.9 → 0.9.0
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.
- package/README.md +6 -2
- package/dist/controls/layoutcontainer/layout.vue.d.ts +1 -0
- package/dist/index.cjs +12 -7
- package/dist/index.js +15 -10
- package/dist/utils/ZipTool.d.ts +23 -5
- package/dist/utils/index.d.ts +2 -1
- package/package.json +2 -1
package/dist/utils/ZipTool.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Unzipped
|
|
1
|
+
import { Unzipped } from "fflate";
|
|
2
2
|
export interface IZipFile {
|
|
3
3
|
filename: string;
|
|
4
4
|
content: Uint8Array | string | ArrayBuffer;
|
|
@@ -8,12 +8,30 @@ export interface IZipFile {
|
|
|
8
8
|
*/
|
|
9
9
|
export default class ZipTool {
|
|
10
10
|
static runningInBrowser(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 解决文件名乱码问题
|
|
13
|
+
* @param str 乱码字符串
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
static encodeGBK(str: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* 直接从文件列表数组,进行压缩文件
|
|
19
|
+
* @param zipfileName
|
|
20
|
+
* @param files
|
|
21
|
+
*/
|
|
22
|
+
static saveZipFromFiles(zipfileName: string, files: Array<File>): Promise<void>;
|
|
11
23
|
/**
|
|
12
24
|
* 保存文件到本地
|
|
13
25
|
* @param zipfileName zip文件名
|
|
14
26
|
* @param files 压缩文件数组
|
|
15
27
|
*/
|
|
16
28
|
static saveZipFile(zipfileName: string, files: Array<IZipFile>): void;
|
|
29
|
+
/**
|
|
30
|
+
* 同步方式压缩文件
|
|
31
|
+
* @param zipfileName
|
|
32
|
+
* @param files
|
|
33
|
+
*/
|
|
34
|
+
static saveZipFileSync(zipfileName: string, files: Array<IZipFile>): boolean;
|
|
17
35
|
/**
|
|
18
36
|
* 同步解压压缩包
|
|
19
37
|
* @param input
|
|
@@ -46,13 +64,13 @@ export default class ZipTool {
|
|
|
46
64
|
* @param files
|
|
47
65
|
* @returns
|
|
48
66
|
*/
|
|
49
|
-
static zipSync
|
|
67
|
+
private static zipSync;
|
|
50
68
|
/**
|
|
51
|
-
*
|
|
69
|
+
* 异步压缩,回调返回:Uint8Array
|
|
52
70
|
* @param files
|
|
53
|
-
* @param cb
|
|
71
|
+
* @param cb 回调返回:Uint8Array
|
|
54
72
|
*/
|
|
55
|
-
static zipAsync
|
|
73
|
+
private static zipAsync;
|
|
56
74
|
private static fflateFilter;
|
|
57
75
|
private static fflatePostprocess;
|
|
58
76
|
private static isImportableZipPath;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -20,5 +20,6 @@ export * from './ValidateTool';
|
|
|
20
20
|
import XXTEA from './XXTEA';
|
|
21
21
|
import WaterMark from './WaterMark';
|
|
22
22
|
import { GetSignalRClient } from './SignalrClient';
|
|
23
|
+
import iconv from 'iconv-lite';
|
|
23
24
|
export * from './FilenameUtils';
|
|
24
|
-
export { GetSignalRClient, WaterMark, XXTEA, H5Tool, StringUtils, StorageHelper as Storage, storage, uuid, newGuid, ZipTool, GzipTool };
|
|
25
|
+
export { iconv, GetSignalRClient, WaterMark, XXTEA, H5Tool, StringUtils, StorageHelper as Storage, storage, uuid, newGuid, ZipTool, GzipTool };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xframelib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "积累的前端开发基础库",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"common": "dist/index.cjs",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@microsoft/signalr": "^8.0.7",
|
|
36
36
|
"axios": "^1.7.9",
|
|
37
37
|
"fflate": "^0.8.2",
|
|
38
|
+
"iconv-lite": "^0.6.3",
|
|
38
39
|
"localforage": "^1.10.0",
|
|
39
40
|
"loglevel": "^1.9.2",
|
|
40
41
|
"qs": "^6.13.1",
|