xframelib 0.3.7 → 0.4.2
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 +5 -0
- package/dist/api/Token.d.ts +20 -0
- package/dist/api/User.d.ts +45 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/controls/collapsepanel/VCollapsiblePanel.vue.d.ts +26 -0
- package/dist/controls/collapsepanel/VCollapsiblePanelGroup.vue.d.ts +30 -0
- package/dist/controls/collapsepanel/color.util.d.ts +1 -0
- package/dist/controls/collapsepanel/composables/store.d.ts +7 -0
- package/dist/controls/collapsepanel/constant.d.ts +1 -0
- package/dist/controls/collapsepanel/index.d.ts +3 -0
- package/dist/controls/layoutcontainer/LayoutManager.d.ts +107 -0
- package/dist/controls/layoutcontainer/index.d.ts +3 -0
- package/dist/controls/layoutcontainer/layout.vue.d.ts +37 -0
- package/dist/controls/splitpanes/index.d.ts +3 -0
- package/dist/controls/vuewindow/SinglePointerEvent.d.ts +23 -0
- package/dist/controls/vuewindow/dom.d.ts +16 -0
- package/dist/controls/vuewindow/draggable_helper.d.ts +20 -0
- package/dist/controls/vuewindow/index.d.ts +6 -0
- package/dist/controls/vuewindow/resizable_helper.d.ts +16 -0
- package/dist/controls/vuewindow/style.d.ts +77 -0
- package/dist/controls/vuewindow/window/Button.vue.d.ts +26 -0
- package/dist/controls/vuewindow/window/index.vue.d.ts +160 -0
- package/dist/controls/vuewindow/window/utils.d.ts +17 -0
- package/dist/controls/vuewindow/z_element.d.ts +11 -0
- package/dist/core/Global.d.ts +26 -0
- package/dist/core/IModel.d.ts +34 -0
- package/dist/core/MsgHelper.d.ts +12 -0
- package/dist/core/SysEvents.d.ts +16 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/hprose/HproseClient.d.ts +20 -0
- package/dist/hprose/ProxyClient.d.ts +22 -0
- package/dist/hprose/index.d.ts +11 -0
- package/dist/index.cjs +17 -1
- package/dist/index.css +146 -76
- package/dist/index.d.ts +10 -813
- package/dist/index.js +17 -1
- package/dist/mitt/index.d.ts +25 -0
- package/dist/model/Config.d.ts +94 -0
- package/dist/model/Constants.d.ts +15 -0
- package/dist/model/Layout.d.ts +36 -0
- package/dist/model/Token.d.ts +66 -0
- package/dist/model/index.d.ts +4 -0
- package/dist/utils/AxiosHelper.d.ts +51 -0
- package/dist/utils/BigFileDownload.d.ts +106 -0
- package/dist/utils/Color.d.ts +74 -0
- package/dist/utils/FileDownload.d.ts +36 -0
- package/dist/utils/FileUpload.d.ts +90 -0
- package/dist/utils/H5Tool.d.ts +98 -0
- package/dist/utils/IsTool.d.ts +101 -0
- package/dist/utils/JQuery.d.ts +35 -0
- package/dist/utils/LockHelper.d.ts +17 -0
- package/dist/utils/Storage.d.ts +57 -0
- package/dist/utils/StringUtils.d.ts +15 -0
- package/dist/utils/Time.d.ts +1 -0
- package/dist/utils/TokenHelper.d.ts +18 -0
- package/dist/utils/URLTool.d.ts +18 -0
- package/dist/utils/index.d.ts +16 -0
- package/dist/utils/uuid.d.ts +3 -0
- package/package.json +21 -17
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 模仿JQuery相关方法
|
|
3
|
+
*/
|
|
4
|
+
declare class JQuery {
|
|
5
|
+
/**
|
|
6
|
+
* 是否有Style类名
|
|
7
|
+
* @param ele HTML元素
|
|
8
|
+
* @param className 类名
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
hasClass(ele: HTMLElement, className: string): RegExpMatchArray | null;
|
|
12
|
+
/**
|
|
13
|
+
* 为元素添加Style类名
|
|
14
|
+
* @param ele HTML元素
|
|
15
|
+
* @param className 类名
|
|
16
|
+
*/
|
|
17
|
+
addClass(ele: HTMLElement, className: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* 移除元素的Style类名
|
|
20
|
+
* @param ele HTML元素
|
|
21
|
+
* @param className 类名
|
|
22
|
+
*/
|
|
23
|
+
removeClass(ele: HTMLElement, className: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* 切换Style类名
|
|
26
|
+
* @param ele HTML元素
|
|
27
|
+
* @param className 类名
|
|
28
|
+
*/
|
|
29
|
+
toggleClass(ele: HTMLElement, className: string): void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* jquery对象
|
|
33
|
+
*/
|
|
34
|
+
export declare const jquery: JQuery;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ILockState {
|
|
2
|
+
isLock: boolean;
|
|
3
|
+
lockTime: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 获取当前Lock状态
|
|
7
|
+
* @returns 是否Locked
|
|
8
|
+
*/
|
|
9
|
+
export declare function getLockState(): any;
|
|
10
|
+
/**
|
|
11
|
+
* 全局监听Lock
|
|
12
|
+
*/
|
|
13
|
+
export declare function onLockListener(): void;
|
|
14
|
+
/**
|
|
15
|
+
* 取消全局监听Lock
|
|
16
|
+
*/
|
|
17
|
+
export declare function unLockListener(): void;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 创建本地缓存对象
|
|
3
|
+
*/
|
|
4
|
+
declare class StorageHelper {
|
|
5
|
+
private prefixKey;
|
|
6
|
+
private storage;
|
|
7
|
+
constructor(prefixKey?: string, storage?: Storage);
|
|
8
|
+
private getKey;
|
|
9
|
+
/**
|
|
10
|
+
* @description 设置缓存
|
|
11
|
+
* @param {string} key 缓存键
|
|
12
|
+
* @param {*} value 缓存值
|
|
13
|
+
* @param expire
|
|
14
|
+
*/
|
|
15
|
+
set(key: string, value: any, expire?: number | null): void;
|
|
16
|
+
/**
|
|
17
|
+
* 读取缓存
|
|
18
|
+
* @param {string} key 缓存键
|
|
19
|
+
* @param {*=} def 默认值
|
|
20
|
+
*/
|
|
21
|
+
get(key: string, def?: any): any;
|
|
22
|
+
/**
|
|
23
|
+
* 从缓存删除某项
|
|
24
|
+
* @param {string} key
|
|
25
|
+
*/
|
|
26
|
+
remove(key: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* 清空所有缓存
|
|
29
|
+
* @memberOf Cache
|
|
30
|
+
*/
|
|
31
|
+
clear(): void;
|
|
32
|
+
/**
|
|
33
|
+
* 设置cookie
|
|
34
|
+
* @param {string} name cookie 名称
|
|
35
|
+
* @param {*} value cookie 值
|
|
36
|
+
* @param {number=} expire 过期时间
|
|
37
|
+
* 如果过期时间为设置,默认关闭浏览器自动删除
|
|
38
|
+
* @example
|
|
39
|
+
*/
|
|
40
|
+
setCookie(name: string, value: any, expire?: number | null): void;
|
|
41
|
+
/**
|
|
42
|
+
* 根据名字获取cookie值
|
|
43
|
+
* @param name
|
|
44
|
+
*/
|
|
45
|
+
getCookie(name: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* 根据名字删除指定的cookie
|
|
48
|
+
* @param {string} key
|
|
49
|
+
*/
|
|
50
|
+
removeCookie(key: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* 清空cookie,使所有cookie失效
|
|
53
|
+
*/
|
|
54
|
+
clearCookie(): void;
|
|
55
|
+
}
|
|
56
|
+
export declare const storage: StorageHelper;
|
|
57
|
+
export default StorageHelper;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare class StringUtils {
|
|
2
|
+
/**
|
|
3
|
+
* 判断字符串是否为空或undefined,不判断为0,不判断为false
|
|
4
|
+
* @param str
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
static isNullOrEmpty: (str: any) => boolean;
|
|
8
|
+
static isNotEmpty: (str: any) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* / _ - 转换成驼峰并将view替换成空字符串
|
|
11
|
+
* @param {*} name name
|
|
12
|
+
*/
|
|
13
|
+
static toHump(name: any): any;
|
|
14
|
+
}
|
|
15
|
+
export default StringUtils;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sleep(delay: any): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ITokenInfo } from '../model/Token';
|
|
2
|
+
import StorageHelper from '../utils/Storage';
|
|
3
|
+
export declare const storageHelper: StorageHelper;
|
|
4
|
+
/**
|
|
5
|
+
* 获取token中的授权Key
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
declare function getLocalToken(): ITokenInfo;
|
|
9
|
+
/**
|
|
10
|
+
* 清除本地Token
|
|
11
|
+
*/
|
|
12
|
+
declare function clearLocalToken(): void;
|
|
13
|
+
/**
|
|
14
|
+
* 获得RefreshToken
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
declare function getRefreshToken(): string;
|
|
18
|
+
export { getLocalToken, getRefreshToken, clearLocalToken };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 将对象添加当作参数拼接到URL上面
|
|
3
|
+
* @param baseUrl 需要拼接的url
|
|
4
|
+
* @param obj 参数对象
|
|
5
|
+
* @returns {string} 拼接后的对象
|
|
6
|
+
* 例子:
|
|
7
|
+
* let obj = {a: '3', b: '4'}
|
|
8
|
+
* setObjToUrlParams('www.baidu.com', obj)
|
|
9
|
+
* ==>www.baidu.com?a=3&b=4
|
|
10
|
+
*/
|
|
11
|
+
export declare function ObjToUrlParams(baseUrl: string, obj: object): string;
|
|
12
|
+
/**
|
|
13
|
+
* 深入拷贝对象
|
|
14
|
+
* @param src
|
|
15
|
+
* @param target
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare function deepMerge<T = any>(src?: any, target?: any): T;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import H5Tool from './H5Tool';
|
|
2
|
+
import StringUtils from './StringUtils';
|
|
3
|
+
import StorageHelper, { storage } from './Storage';
|
|
4
|
+
import uuid, { newGuid } from './uuid';
|
|
5
|
+
export * from './Color';
|
|
6
|
+
export * from './FileDownload';
|
|
7
|
+
export * from './Time';
|
|
8
|
+
export { H5Tool, StringUtils, StorageHelper as Storage, storage, uuid, newGuid };
|
|
9
|
+
export * from './AxiosHelper';
|
|
10
|
+
export * from './TokenHelper';
|
|
11
|
+
export * from './FileUpload';
|
|
12
|
+
export * from './JQuery';
|
|
13
|
+
export * from './LockHelper';
|
|
14
|
+
export * from './BigFileDownload';
|
|
15
|
+
export * from './IsTool';
|
|
16
|
+
export * from './URLTool';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xframelib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "积累的前端开发基础库",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"common": "dist/index.cjs",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "vite",
|
|
10
10
|
"build": "vite build",
|
|
11
|
-
"lib": "rollup -c",
|
|
11
|
+
"lib": "rollup -c ",
|
|
12
12
|
"serve": "vite preview"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
@@ -25,29 +25,33 @@
|
|
|
25
25
|
"@hprose/io": "^3.0.10",
|
|
26
26
|
"@hprose/rpc-core": "^3.0.10",
|
|
27
27
|
"@hprose/rpc-html5": "^3.0.10",
|
|
28
|
-
"
|
|
28
|
+
"localforage": "^1.10.0",
|
|
29
|
+
"spark-md5": "^3.0.2",
|
|
30
|
+
"streamsaver": "^2.0.5",
|
|
29
31
|
"xhr": "^2.6.0"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
32
|
-
"@rollup/plugin-alias": "^3.1.
|
|
33
|
-
"@rollup/plugin-commonjs": "^
|
|
34
|
+
"@rollup/plugin-alias": "^3.1.8",
|
|
35
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
34
36
|
"@rollup/plugin-json": "^4.1.0",
|
|
35
|
-
"@rollup/plugin-node-resolve": "^13.0.
|
|
36
|
-
"@rollup/plugin-typescript": "^8.
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
37
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
38
|
+
"@rollup/plugin-typescript": "^8.3.0",
|
|
39
|
+
"@types/streamsaver": "^2.0.1",
|
|
40
|
+
"@vitejs/plugin-vue": "^1.9.3",
|
|
41
|
+
"@vue/compiler-sfc": "^3.2.20",
|
|
42
|
+
"axios": "^0.23.0",
|
|
43
|
+
"esbuild": "^0.13.9",
|
|
40
44
|
"node-sass": "^6.0.1",
|
|
41
|
-
"rollup-plugin-
|
|
42
|
-
"rollup-plugin-esbuild": "^4.5.0",
|
|
45
|
+
"rollup-plugin-esbuild": "^4.6.0",
|
|
43
46
|
"rollup-plugin-scss": "^3.0.0",
|
|
44
47
|
"rollup-plugin-terser": "^7.0.2",
|
|
48
|
+
"rollup-plugin-typescript2": "^0.31.1",
|
|
45
49
|
"rollup-plugin-vue": "^6.0.0",
|
|
46
|
-
"sass": "^1.
|
|
47
|
-
"typescript": "^4.
|
|
48
|
-
"vite": "^2.
|
|
49
|
-
"vue": "^3.
|
|
50
|
+
"sass": "^1.43.3",
|
|
51
|
+
"typescript": "^4.4.4",
|
|
52
|
+
"vite": "^2.6.10",
|
|
53
|
+
"vue": "^3.2.20",
|
|
50
54
|
"vue-router": "^4.0.10",
|
|
51
|
-
"vue-tsc": "^0.
|
|
55
|
+
"vue-tsc": "^0.28.8"
|
|
52
56
|
}
|
|
53
57
|
}
|