xframelib 0.6.4 → 0.6.8
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 +4 -0
- package/dist/assets/output-7c052984.css +305 -0
- package/dist/assets/output-915eebd6.css +305 -0
- package/dist/controls/collapsepanel/VCollapsiblePanel.vue.d.ts +1 -1
- package/dist/controls/collapsepanel/VCollapsiblePanelGroup.vue.d.ts +1 -1
- package/dist/controls/layoutcontainer/layout.vue.d.ts +10 -0
- package/dist/controls/vuewindow/draggable_helper.d.ts +1 -1
- package/dist/controls/vuewindow/style.d.ts +1 -1
- package/dist/controls/vuewindow/window/Button.vue.d.ts +1 -1
- package/dist/controls/vuewindow/window/index.vue.d.ts +1 -1
- package/dist/index.cjs +8 -13
- package/dist/index.css +99 -99
- package/dist/index.js +5 -10
- package/dist/mitt/index.d.ts +6 -6
- package/dist/permission/filter.d.ts +1 -1
- package/dist/permission/register.d.ts +1 -1
- package/dist/utils/AxiosHelper.d.ts +1 -1
- package/dist/utils/BigFileDownload.d.ts +1 -1
- package/dist/utils/FileUpload.d.ts +2 -2
- package/dist/utils/H5Tool.d.ts +15 -2
- package/dist/utils/IsTool.d.ts +1 -1
- package/dist/utils/Time.d.ts +11 -1
- package/dist/utils/URLTool.d.ts +4 -4
- package/dist/utils/index.d.ts +2 -2
- package/package.json +20 -19
package/dist/mitt/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export type EventType = string | symbol;
|
|
2
|
+
export type Handler<T = any> = (event?: T) => void;
|
|
3
|
+
export type WildcardHandler = (type: EventType, event?: any) => void;
|
|
4
|
+
export type EventHandlerList = Array<Handler>;
|
|
5
|
+
export type WildCardEventHandlerList = Array<WildcardHandler>;
|
|
6
|
+
export type EventHandlerMap = Map<EventType, EventHandlerList | WildCardEventHandlerList>;
|
|
7
7
|
export interface Emitter {
|
|
8
8
|
all: EventHandlerMap;
|
|
9
9
|
on<T = any>(type: EventType, handler: Handler<T>): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RouteRecordRaw } from 'vue-router';
|
|
2
2
|
import { ISysRoleRight, IRoleFunction } from '../model/IRole';
|
|
3
3
|
import { IWidgetConfig } from '../model/Layout';
|
|
4
|
-
|
|
4
|
+
type IWidgetMenu = any;
|
|
5
5
|
interface IPackage {
|
|
6
6
|
name: string;
|
|
7
7
|
version: string;
|
|
@@ -11,7 +11,7 @@ export interface IFileMeta {
|
|
|
11
11
|
/**
|
|
12
12
|
* 文件下载事件
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type FileDownloadEvent = 'init' | 'info' | 'error' | 'downloadProgress' | 'saveProgress' | 'success';
|
|
15
15
|
/**
|
|
16
16
|
* 大文件分片/断点续传下载
|
|
17
17
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { XhrHeaders } from 'xhr';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type FileEventName = 'attempt' | 'attemptFailure' | 'chunkSuccess' | 'error' | 'offline' | 'online' | 'progress' | 'success';
|
|
3
|
+
export type AllowedMethods = 'PUT' | 'POST' | 'PATCH';
|
|
4
4
|
/**
|
|
5
5
|
* 文件上传配置
|
|
6
6
|
*/
|
package/dist/utils/H5Tool.d.ts
CHANGED
|
@@ -100,10 +100,23 @@ export default class H5Tool {
|
|
|
100
100
|
*/
|
|
101
101
|
static MD5(content: string, needRawHash?: boolean): string;
|
|
102
102
|
/**
|
|
103
|
-
* 复制文本
|
|
103
|
+
* 复制文本 old
|
|
104
104
|
* @param text
|
|
105
105
|
*/
|
|
106
|
-
static
|
|
106
|
+
static copyTextByCommand(text: string): Promise<unknown>;
|
|
107
|
+
/**
|
|
108
|
+
* 复制文本,默认使用clipboard
|
|
109
|
+
* @param textContent
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
static copyText: (textContent: string) => Promise<unknown>;
|
|
113
|
+
static copyElementTextByCommand(id: string): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* 根据元素ID,复制元素里的内容,默认使用Clipboard
|
|
116
|
+
* @param elementID HTML元素ID
|
|
117
|
+
* @returns
|
|
118
|
+
*/
|
|
119
|
+
static copyElementText(elementID: string): boolean | Promise<boolean>;
|
|
107
120
|
/**
|
|
108
121
|
* 设置是否开启网站灰模式
|
|
109
122
|
* @param isGray 是否暗灰模式
|
package/dist/utils/IsTool.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare function isNullOrUnDef(val: unknown): val is null | undefined;
|
|
|
17
17
|
/**
|
|
18
18
|
* @description: 是否为对象
|
|
19
19
|
*/
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const isObjectX: (val: any) => val is Record<any, any>;
|
|
21
21
|
/**
|
|
22
22
|
* @description: 是否为时间
|
|
23
23
|
*/
|
package/dist/utils/Time.d.ts
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 阻塞方式等待多少毫秒
|
|
3
|
+
* @param milliseconds
|
|
4
|
+
*/
|
|
5
|
+
export declare function sleep(milliseconds: number): void;
|
|
6
|
+
/**
|
|
7
|
+
* 异步等待多少毫秒
|
|
8
|
+
* @param milliseconds
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function delay(milliseconds: number): Promise<unknown>;
|
package/dist/utils/URLTool.d.ts
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function ObjToUrlParams(baseUrl: string, obj: object): string;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
* @param src
|
|
15
|
-
* @param target
|
|
16
|
-
* @returns
|
|
13
|
+
* 深入拷贝对象, 将target合并到src里
|
|
14
|
+
* @param src 原始对象
|
|
15
|
+
* @param target 要合并的对象
|
|
16
|
+
* @returns 更新后的原始对象
|
|
17
17
|
*/
|
|
18
18
|
export declare function deepMerge<T = any>(src?: any, target?: any): T;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import uuid, { newGuid } from './uuid';
|
|
|
5
5
|
export * from './Color';
|
|
6
6
|
export * from './FileDownload';
|
|
7
7
|
export * from './Time';
|
|
8
|
-
export { H5Tool, StringUtils, StorageHelper as Storage, storage, uuid, newGuid };
|
|
9
8
|
export * from './AxiosHelper';
|
|
10
9
|
export * from './TokenHelper';
|
|
11
10
|
export * from './FileUpload';
|
|
@@ -15,4 +14,5 @@ export * from './BigFileDownload';
|
|
|
15
14
|
export * from './IsTool';
|
|
16
15
|
export * from './URLTool';
|
|
17
16
|
export * from './CodeHelper';
|
|
18
|
-
|
|
17
|
+
import XXTEA from './XXTEA';
|
|
18
|
+
export { XXTEA, H5Tool, StringUtils, StorageHelper as Storage, storage, uuid, newGuid };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xframelib",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "积累的前端开发基础库",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"common": "dist/index.cjs",
|
|
@@ -26,34 +26,35 @@
|
|
|
26
26
|
"@hprose/io": "^3.0.10",
|
|
27
27
|
"@hprose/rpc-core": "^3.0.10",
|
|
28
28
|
"@hprose/rpc-html5": "^3.0.10",
|
|
29
|
-
"axios": "^
|
|
29
|
+
"axios": "^1.2.1",
|
|
30
30
|
"localforage": "^1.10.0",
|
|
31
|
+
"qs": "^6.11.0",
|
|
31
32
|
"spark-md5": "^3.0.2",
|
|
32
33
|
"streamsaver": "^2.0.6",
|
|
33
34
|
"xhr": "^2.6.0"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
|
-
"@rollup/plugin-alias": "^
|
|
37
|
-
"@rollup/plugin-commonjs": "^
|
|
38
|
-
"@rollup/plugin-json": "^
|
|
39
|
-
"@rollup/plugin-node-resolve": "^
|
|
40
|
-
"@rollup/plugin-typescript": "^
|
|
37
|
+
"@rollup/plugin-alias": "^4.0.2",
|
|
38
|
+
"@rollup/plugin-commonjs": "^23.0.4",
|
|
39
|
+
"@rollup/plugin-json": "^5.0.2",
|
|
40
|
+
"@rollup/plugin-node-resolve": "^14.1.0",
|
|
41
|
+
"@rollup/plugin-typescript": "^10.0.1",
|
|
41
42
|
"@types/streamsaver": "^2.0.1",
|
|
42
|
-
"@vitejs/plugin-vue": "^
|
|
43
|
-
"@vue/compiler-sfc": "^3.2.
|
|
44
|
-
"esbuild": "^0.
|
|
43
|
+
"@vitejs/plugin-vue": "^4.0.0",
|
|
44
|
+
"@vue/compiler-sfc": "^3.2.45",
|
|
45
|
+
"esbuild": "^0.16.4",
|
|
45
46
|
"rimraf": "^3.0.2",
|
|
46
47
|
"rollup-plugin-copy": "^3.4.0",
|
|
47
|
-
"rollup-plugin-esbuild": "^
|
|
48
|
-
"rollup-plugin-scss": "^
|
|
48
|
+
"rollup-plugin-esbuild": "^5.0.0",
|
|
49
|
+
"rollup-plugin-scss": "^4.0.0",
|
|
49
50
|
"rollup-plugin-terser": "^7.0.2",
|
|
50
|
-
"rollup-plugin-typescript2": "^0.
|
|
51
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
51
52
|
"rollup-plugin-vue": "^6.0.0",
|
|
52
|
-
"sass": "^1.
|
|
53
|
-
"typescript": "^4.
|
|
54
|
-
"vite": "^
|
|
55
|
-
"vue": "^3.2.
|
|
56
|
-
"vue-router": "^4.1.
|
|
57
|
-
"vue-tsc": "^0.
|
|
53
|
+
"sass": "^1.56.2",
|
|
54
|
+
"typescript": "^4.9.4",
|
|
55
|
+
"vite": "^4.0.1",
|
|
56
|
+
"vue": "^3.2.45",
|
|
57
|
+
"vue-router": "^4.1.6",
|
|
58
|
+
"vue-tsc": "^1.0.13"
|
|
58
59
|
}
|
|
59
60
|
}
|