xframelib 0.4.9 → 0.5.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.
@@ -6,6 +6,10 @@ export interface IUIObject {
6
6
  * 网站标题
7
7
  */
8
8
  SiteTitle: string;
9
+ /**
10
+ * 系统的所属组名
11
+ */
12
+ Group?: string;
9
13
  /**
10
14
  * 版权
11
15
  */
@@ -18,6 +22,10 @@ export interface IUIObject {
18
22
  * 超时锁屏时间(单位:秒s)
19
23
  */
20
24
  LockTime?: number;
25
+ /**
26
+ * 是否是能访问互联网,还是内网部署应用
27
+ * */
28
+ IsInternet?: boolean;
21
29
  /**
22
30
  * 其他扩展的属性
23
31
  */
@@ -77,7 +85,7 @@ export interface ISystemConfig {
77
85
  /**
78
86
  * 用户界面配置
79
87
  */
80
- UI?: IUIObject;
88
+ UI: IUIObject;
81
89
  /**
82
90
  * 服务URL
83
91
  */
@@ -0,0 +1,76 @@
1
+ /**
2
+ * 路由权限对象
3
+ */
4
+ export interface IRoleRoute {
5
+ path: string;
6
+ name: string;
7
+ type: number;
8
+ title?: string;
9
+ index?: number;
10
+ children?: IRoleRoute[];
11
+ }
12
+ /**
13
+ * Widget菜单控制
14
+ */
15
+ export interface IRoleWidgetMenu {
16
+ name: string;
17
+ index?: number;
18
+ path?: string;
19
+ type?: number;
20
+ children?: Array<IRoleWidgetMenu>;
21
+ }
22
+ /**
23
+ * Widget组件权限控制
24
+ */
25
+ export interface IRoleWidget {
26
+ /**
27
+ * 唯一ID,与组件名一致
28
+ */
29
+ id: string;
30
+ /**
31
+ * 标题或说明
32
+ */
33
+ label?: string;
34
+ /**
35
+ * 所属容器,top/bottom/left/right等
36
+ */
37
+ container: number;
38
+ /**
39
+ * 是否初始化时,预加载
40
+ */
41
+ preload?: boolean;
42
+ /**
43
+ * 前置容器ID,一般也就是bindid
44
+ */
45
+ afterid?: string;
46
+ /**
47
+ * 绑定依赖容器ID,不一定有afterid
48
+ */
49
+ bindid?: string;
50
+ /**
51
+ * 所属组,用于业务分类
52
+ */
53
+ group?: string;
54
+ }
55
+ /**
56
+ * 功能点列表,用于功能点上报和权限过滤
57
+ */
58
+ export interface IRoleFunction {
59
+ id: string;
60
+ name: string;
61
+ children?: Array<IRoleFunction>;
62
+ }
63
+ /**
64
+ * 系统权限路由菜单-总对象
65
+ */
66
+ export interface ISysRoleRight {
67
+ id: string;
68
+ name: string;
69
+ group?: string;
70
+ product: string;
71
+ version: string;
72
+ routes?: IRoleRoute[];
73
+ widgetMenu?: IRoleWidgetMenu[];
74
+ widgets?: IRoleWidget[];
75
+ functions?: IRoleFunction[];
76
+ }
@@ -0,0 +1,38 @@
1
+ import { RouteRecordRaw } from 'vue-router';
2
+ import { IRoleFunction, ISysRoleRight } from '../model/IRole';
3
+ import { IWidgetConfig } from '../model/Layout';
4
+ declare type IWidgetMenu = any;
5
+ /**
6
+ * 获得当前系统的授权信息
7
+ * @returns
8
+ */
9
+ export declare function getCurrentSystemRight(): ISysRoleRight | undefined;
10
+ /**
11
+ * 获取用户角色权限菜单
12
+ * @param sysID 系统ID
13
+ * @param roleAPI 获取系统角色权限的API
14
+ * @param fullSysRights 默认全部,调试开发使用
15
+ * @returns
16
+ */
17
+ export declare function getSystemRoleRight(sysID: string, roleAPI: string, baseLoginURL?: string, fullSysRights?: ISysRoleRight): Promise<ISysRoleRight | undefined>;
18
+ /**
19
+ * 获取授权的Route 集合
20
+ * @returns
21
+ */
22
+ export declare function getRoutes(bussinessRoutes: Array<RouteRecordRaw>): Array<RouteRecordRaw> | undefined;
23
+ /**
24
+ * 获取授权的Widget Menu集合
25
+ * @returns
26
+ */
27
+ export declare function getWidgetMenus(widgetMenuConfig: Array<IWidgetMenu>): Array<IWidgetMenu> | undefined;
28
+ /**
29
+ * 获取授权的 widget配置对象集合
30
+ * @returns
31
+ */
32
+ export declare function getWidgetConfig(widgetConfig?: Array<IWidgetConfig>): Array<IWidgetConfig> | undefined;
33
+ /**
34
+ * 获取授权的功能点集合
35
+ * @returns
36
+ */
37
+ export declare function getFunctions(functionList?: Array<IRoleFunction>): IRoleFunction[] | undefined;
38
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './register';
2
+ export * from './filter';
3
+ export * from './right';
@@ -0,0 +1,24 @@
1
+ import { RouteRecordRaw } from 'vue-router';
2
+ import { ISysRoleRight, IRoleFunction } from '../model/IRole';
3
+ import { IWidgetConfig } from '../model/Layout';
4
+ declare type IWidgetMenu = any;
5
+ interface IPackage {
6
+ name: string;
7
+ version: string;
8
+ }
9
+ /**
10
+ * 系统权限参数对象
11
+ */
12
+ export interface ISysRightOptions {
13
+ bussinessRoutes?: Array<RouteRecordRaw>;
14
+ widgetMenuConfig?: Array<IWidgetMenu>;
15
+ functionList?: Array<IRoleFunction>;
16
+ widgetConfig?: Array<IWidgetConfig>;
17
+ pkgObject: IPackage;
18
+ }
19
+ /**
20
+ * 导出系统权限路由菜单
21
+ * @returns 系统权限路由菜单
22
+ */
23
+ export declare function exportSystemRights(options: ISysRightOptions): ISysRoleRight;
24
+ export {};
@@ -0,0 +1,15 @@
1
+ import { ISysRoleRight } from '../model/IRole';
2
+ /**
3
+ * 获取 系统角色权限 对象
4
+ * @returns
5
+ */
6
+ export declare function getRight(): ISysRoleRight | undefined;
7
+ /**
8
+ * 设置 系统角色权限 对象
9
+ * @param sysRoleRight 系统角色权限对象
10
+ */
11
+ export declare function setRight(sysRoleRight: ISysRoleRight): void;
12
+ /**
13
+ * 清除
14
+ */
15
+ export declare function clearRight(): void;
@@ -17,7 +17,7 @@ export declare type FileDownloadEvent = 'init' | 'info' | 'error' | 'downloadPro
17
17
  */
18
18
  export declare class BigFileDownload {
19
19
  private fileID;
20
- private downloadURL;
20
+ private downloadURL?;
21
21
  ChunkUnitM: number;
22
22
  private chunkByteSize;
23
23
  private totalChunks;
@@ -34,12 +34,12 @@ export declare class BigFileDownload {
34
34
  /**
35
35
  *
36
36
  * @param fileID
37
- * @param downloadURL 下载链接
37
+ * @param downloadURL 下载链接(可空)
38
38
  * @param chunkSizeM 分片大小,默认为3M
39
39
  * @param cacheNum 缓存大小
40
40
  * @param requestTimeoutMS 请求超时时间(毫秒)默认为60s
41
41
  */
42
- constructor(fileID: string, downloadURL: string, chunkSizeM?: number, cacheNum?: number, requestTimeoutMS?: number);
42
+ constructor(fileID: string, downloadURL?: string | undefined, chunkSizeM?: number, cacheNum?: number, requestTimeoutMS?: number);
43
43
  /**
44
44
  * 订阅事件
45
45
  */
@@ -101,7 +101,7 @@ export declare class BigFileDownload {
101
101
  /**
102
102
  * 开始分段下载
103
103
  */
104
- download(downURL?: string): Promise<void>;
104
+ download(downloadAPI?: string, baseURL?: string): Promise<void>;
105
105
  /**
106
106
  * 下载完成进度
107
107
  */
@@ -0,0 +1,14 @@
1
+ import { ISysRightOptions } from '../permission/register';
2
+ /**
3
+ * 输出动态Icon图标列表文件
4
+ * @param iconArray
5
+ * @param filePath
6
+ */
7
+ declare function writeIconifyList(iconArray: string[], filePath?: string): void;
8
+ /**
9
+ * 导出系统功能权限文件
10
+ * @param options 系统权限参数对象
11
+ * @param filename 文件名(无需后缀)
12
+ */
13
+ declare function writeSysRoleRight(options: ISysRightOptions, filename: string): void;
14
+ export { writeIconifyList, writeSysRoleRight };
@@ -27,7 +27,7 @@ export default class H5Tool {
27
27
  static fullScreen(element: any | Element, isfull: boolean): void;
28
28
  /**
29
29
  * 进入全屏
30
- * @param element 全屏要素容器
30
+ * @param element 全屏要素容器,默认为整个页面
31
31
  */
32
32
  static requestFullScreen(el?: any | Element): void;
33
33
  /**
@@ -27,6 +27,12 @@ declare class JQuery {
27
27
  * @param className 类名
28
28
  */
29
29
  toggleClass(ele: HTMLElement, className: string): void;
30
+ /**
31
+ * 修改样式css参数
32
+ * @param propField
33
+ * @param propValue
34
+ */
35
+ setCSSProperty(ele: HTMLElement, propField: string, propValue: string | null): void;
30
36
  }
31
37
  /**
32
38
  * jquery对象
@@ -14,3 +14,4 @@ export * from './LockHelper';
14
14
  export * from './BigFileDownload';
15
15
  export * from './IsTool';
16
16
  export * from './URLTool';
17
+ export * from './CodeHelper';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xframelib",
3
- "version": "0.4.9",
3
+ "version": "0.5.4",
4
4
  "description": "积累的前端开发基础库",
5
5
  "main": "dist/index.js",
6
6
  "common": "dist/index.cjs",
@@ -9,7 +9,8 @@
9
9
  "dev": "vite",
10
10
  "build": "vite build",
11
11
  "lib": "rollup -c ",
12
- "serve": "vite preview"
12
+ "serve": "vite preview",
13
+ "clean": "rimraf dist/* && rimraf package-lock.json && rimraf node_modules/.cache && rimraf node_modules/.vite"
13
14
  },
14
15
  "keywords": [
15
16
  "hprose",
@@ -27,31 +28,32 @@
27
28
  "@hprose/rpc-html5": "^3.0.10",
28
29
  "localforage": "^1.10.0",
29
30
  "spark-md5": "^3.0.2",
30
- "streamsaver": "^2.0.5",
31
- "xhr": "^2.6.0"
31
+ "streamsaver": "^2.0.6",
32
+ "xhr": "^2.6.0",
33
+ "axios": "^0.26.1"
32
34
  },
33
35
  "devDependencies": {
34
36
  "@rollup/plugin-alias": "^3.1.9",
35
- "@rollup/plugin-commonjs": "^21.0.1",
37
+ "@rollup/plugin-commonjs": "^21.0.2",
36
38
  "@rollup/plugin-json": "^4.1.0",
37
- "@rollup/plugin-node-resolve": "^13.1.2",
38
- "@rollup/plugin-typescript": "^8.3.0",
39
+ "@rollup/plugin-node-resolve": "^13.1.3",
40
+ "@rollup/plugin-typescript": "^8.3.1",
39
41
  "@types/streamsaver": "^2.0.1",
40
- "@vitejs/plugin-vue": "^2.0.1",
41
- "@vue/compiler-sfc": "^3.2.26",
42
- "axios": "^0.24.0",
43
- "esbuild": "^0.14.10",
42
+ "@vitejs/plugin-vue": "^2.2.4",
43
+ "@vue/compiler-sfc": "^3.2.31",
44
+ "esbuild": "^0.14.27",
45
+ "rimraf": "^3.0.2",
44
46
  "rollup-plugin-copy": "^3.4.0",
45
47
  "rollup-plugin-esbuild": "^4.8.2",
46
48
  "rollup-plugin-scss": "^3.0.0",
47
49
  "rollup-plugin-terser": "^7.0.2",
48
- "rollup-plugin-typescript2": "^0.31.1",
50
+ "rollup-plugin-typescript2": "^0.31.2",
49
51
  "rollup-plugin-vue": "^6.0.0",
50
- "sass": "^1.45.2",
51
- "typescript": "^4.5.4",
52
- "vite": "^2.7.10",
53
- "vue": "^3.2.20",
54
- "vue-router": "^4.0.10",
55
- "vue-tsc": "^0.30.2"
52
+ "sass": "^1.49.9",
53
+ "typescript": "^4.6.2",
54
+ "vite": "^2.8.6",
55
+ "vue": "^3.2.31",
56
+ "vue-router": "^4.0.14",
57
+ "vue-tsc": "^0.33.2"
56
58
  }
57
59
  }