xframelib 1.1.2 → 1.1.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.
Files changed (102) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/{worker-iconv-KS7y7NCM.js → worker-iconv-Bc3Fm2lD.js} +5 -1
  3. package/dist/assets/{worker-webcache-DX6bhBzy.js → worker-webcache-C22MEJ3V.js} +9 -9
  4. package/dist/{src/controls → controls}/layoutcontainer/layout.vue.d.ts +7 -7
  5. package/dist/index.css +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/{src/model → model}/Layout.d.ts +8 -36
  8. package/package.json +8 -8
  9. package/README_zh.md +0 -204
  10. package/dist/{src/api → api}/Token.d.ts +0 -0
  11. package/dist/{src/api → api}/User.d.ts +0 -0
  12. package/dist/{src/api → api}/index.d.ts +0 -0
  13. package/dist/{src/controls → controls}/ADivider.vue.d.ts +0 -0
  14. package/dist/{src/controls → controls}/ScaleContainer/index.vue.d.ts +0 -0
  15. package/dist/{src/controls → controls}/ScrollSnapContainer/index.vue.d.ts +0 -0
  16. package/dist/{src/controls → controls}/index.d.ts +0 -0
  17. package/dist/{src/controls → controls}/layoutcontainer/LayoutManager.d.ts +0 -0
  18. package/dist/{src/controls → controls}/layoutcontainer/index.d.ts +0 -0
  19. package/dist/{src/controls → controls}/popover/index.vue.d.ts +0 -0
  20. package/dist/{src/controls → controls}/routertransition/RouterTransition.vue.d.ts +0 -0
  21. package/dist/{src/controls → controls}/routertransition/RouterTransitionAnimate.vue.d.ts +0 -0
  22. package/dist/{src/controls → controls}/routertransition/SuspenseWithError.vue.d.ts +0 -0
  23. package/dist/{src/controls → controls}/routertransition/index.d.ts +0 -0
  24. package/dist/{src/controls → controls}/splitpanes/index.d.ts +0 -0
  25. package/dist/{src/controls → controls}/splitpanes/pane.vue.d.ts +0 -0
  26. package/dist/{src/controls → controls}/splitpanes/splitpanes.vue.d.ts +0 -0
  27. package/dist/{src/controls → controls}/xwindow/XWindow.vue.d.ts +1 -1
  28. /package/dist/{src/controls → controls}/xwindow/XWindowManager.d.ts +0 -0
  29. /package/dist/{src/controls → controls}/xwindow/index.d.ts +0 -0
  30. /package/dist/{src/core → core}/Global.d.ts +0 -0
  31. /package/dist/{src/core → core}/IModel.d.ts +0 -0
  32. /package/dist/{src/core → core}/Init.d.ts +0 -0
  33. /package/dist/{src/core → core}/MsgHelper.d.ts +0 -0
  34. /package/dist/{src/core → core}/SysEvents.d.ts +0 -0
  35. /package/dist/{src/core → core}/index.d.ts +0 -0
  36. /package/dist/{src/directives → directives}/dbClickDirective.d.ts +0 -0
  37. /package/dist/{src/directives → directives}/dragDirective.d.ts +0 -0
  38. /package/dist/{src/directives → directives}/index.d.ts +0 -0
  39. /package/dist/{src/directives → directives}/mediaDirective.d.ts +0 -0
  40. /package/dist/{src/directives → directives}/repeatClickDirective.d.ts +0 -0
  41. /package/dist/{src/directives → directives}/wowDirective.d.ts +0 -0
  42. /package/dist/{src/hprose → hprose}/HproseClient.d.ts +0 -0
  43. /package/dist/{src/hprose → hprose}/HproseIO.d.ts +0 -0
  44. /package/dist/{src/hprose → hprose}/ProxyClient.d.ts +0 -0
  45. /package/dist/{src/hprose → hprose}/index.d.ts +0 -0
  46. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  47. /package/dist/{src/mitt → mitt}/index.d.ts +0 -0
  48. /package/dist/{src/model → model}/Config.d.ts +0 -0
  49. /package/dist/{src/model → model}/Constants.d.ts +0 -0
  50. /package/dist/{src/model → model}/IModalModels.d.ts +0 -0
  51. /package/dist/{src/model → model}/IRole.d.ts +0 -0
  52. /package/dist/{src/model → model}/ITypes.d.ts +0 -0
  53. /package/dist/{src/model → model}/IUserModel.d.ts +0 -0
  54. /package/dist/{src/model → model}/IWidgetMenu.d.ts +0 -0
  55. /package/dist/{src/model → model}/index.d.ts +0 -0
  56. /package/dist/{src/permission → permission}/RoleSysRightHelper.d.ts +0 -0
  57. /package/dist/{src/permission → permission}/filter.d.ts +0 -0
  58. /package/dist/{src/permission → permission}/index.d.ts +0 -0
  59. /package/dist/{src/permission → permission}/register.d.ts +0 -0
  60. /package/dist/{src/permission → permission}/right.d.ts +0 -0
  61. /package/dist/{src/plugins → plugins}/NavigatorPlugin.d.ts +0 -0
  62. /package/dist/{src/plugins → plugins}/index.d.ts +0 -0
  63. /package/dist/{src/utils → utils}/AutoUpdate.d.ts +0 -0
  64. /package/dist/{src/utils → utils}/AxiosHelper.d.ts +0 -0
  65. /package/dist/{src/utils → utils}/BigFileDownload.d.ts +0 -0
  66. /package/dist/{src/utils → utils}/CodeHelper.d.ts +0 -0
  67. /package/dist/{src/utils → utils}/Color.d.ts +0 -0
  68. /package/dist/{src/utils → utils}/CommonTool.d.ts +0 -0
  69. /package/dist/{src/utils → utils}/DayjsTool.d.ts +0 -0
  70. /package/dist/{src/utils → utils}/FetchHelper.d.ts +0 -0
  71. /package/dist/{src/utils → utils}/FileDownload.d.ts +0 -0
  72. /package/dist/{src/utils → utils}/FileUpload.d.ts +0 -0
  73. /package/dist/{src/utils → utils}/FileUpload_/346/227/247.d.ts" +0 -0
  74. /package/dist/{src/utils → utils}/FilenameUtils.d.ts +0 -0
  75. /package/dist/{src/utils → utils}/GzipTool.d.ts +0 -0
  76. /package/dist/{src/utils → utils}/H5Tool.d.ts +0 -0
  77. /package/dist/{src/utils → utils}/IsTool.d.ts +0 -0
  78. /package/dist/{src/utils → utils}/JQuery.d.ts +0 -0
  79. /package/dist/{src/utils → utils}/LocalForageHelper.d.ts +0 -0
  80. /package/dist/{src/utils → utils}/LockHelper.d.ts +0 -0
  81. /package/dist/{src/utils → utils}/RouterURLTool.d.ts +0 -0
  82. /package/dist/{src/utils → utils}/Screen.d.ts +0 -0
  83. /package/dist/{src/utils → utils}/SignalrClient.d.ts +0 -0
  84. /package/dist/{src/utils → utils}/Storage.d.ts +0 -0
  85. /package/dist/{src/utils → utils}/StringUtils.d.ts +0 -0
  86. /package/dist/{src/utils → utils}/Time.d.ts +0 -0
  87. /package/dist/{src/utils → utils}/TokenHelper.d.ts +0 -0
  88. /package/dist/{src/utils → utils}/ValidateTool.d.ts +0 -0
  89. /package/dist/{src/utils → utils}/WarGridTool.d.ts +0 -0
  90. /package/dist/{src/utils → utils}/WaterMark.d.ts +0 -0
  91. /package/dist/{src/utils → utils}/WebCacheTool.d.ts +0 -0
  92. /package/dist/{src/utils → utils}/WidgetsTool.d.ts +0 -0
  93. /package/dist/{src/utils → utils}/XXTEA.d.ts +0 -0
  94. /package/dist/{src/utils → utils}/ZipTool.d.ts +0 -0
  95. /package/dist/{src/utils → utils}/index.d.ts +0 -0
  96. /package/dist/{src/utils → utils}/uuid.d.ts +0 -0
  97. /package/dist/{src/workers → workers}/index.d.ts +0 -0
  98. /package/dist/{src/workers → workers}/worker-iconv.d.ts +0 -0
  99. /package/dist/{src/workers → workers}/worker-webcache.d.ts +0 -0
  100. /package/dist/{src/workers → workers}/worker-xmath.d.ts +0 -0
  101. /package/dist/{src/workerservice → workerservice}/frontWorker.d.ts +0 -0
  102. /package/dist/{src/workerservice → workerservice}/index.d.ts +0 -0
@@ -12,21 +12,6 @@ export declare enum LayoutContainerEnum {
12
12
  left = 5,
13
13
  right = 6
14
14
  }
15
- /**
16
- * 组件布局
17
- */
18
- export interface IWidgetLayout {
19
- top?: number | string;
20
- left?: number | string;
21
- right?: number | string;
22
- bottom?: number | string;
23
- width?: string;
24
- height?: string;
25
- /**
26
- * 扩展属性,支持应用
27
- */
28
- [props: string]: any;
29
- }
30
15
  export interface IWidgetConfig {
31
16
  /**
32
17
  * Layout标识名,以支撑多个布局使用
@@ -48,23 +33,10 @@ export interface IWidgetConfig {
48
33
  * 所属容器,top/bottom/left/right等
49
34
  */
50
35
  container: LayoutContainerEnum;
51
- /**
52
- * 外部组件js url(备用)
53
- */
54
- jsURL?: string;
55
- /**
56
- * 外部组件css url(备用,暂不用)
57
- */
58
- cssURL?: string;
59
36
  /**
60
37
  * 动态加载的组件
61
38
  */
62
39
  component: Lazy<Component>;
63
- /**
64
- * 组件要绑定的属性
65
- * 20260224新增
66
- */
67
- componentProps?: Record<string, unknown>;
68
40
  /**
69
41
  * 是否初始化时,预加载
70
42
  */
@@ -73,23 +45,23 @@ export interface IWidgetConfig {
73
45
  * 前置组件 ID,一般也就是bindid
74
46
  */
75
47
  afterid?: string;
76
- /**
77
- * 20220424 WM:暂时去掉,容易混乱和循环引用
78
- * 绑定依赖组件ID,不一定有afterid
79
- */
80
48
  /**
81
49
  * 所属组,用于业务分类
82
50
  */
83
51
  group?: string;
84
52
  /**
85
- * 外部定义布局(备用)
53
+ * 修改style样式,例如外部定义布局、定义CSS变量等
86
54
  */
87
- layout?: IWidgetLayout;
55
+ style?: string | Record<string, unknown>;
88
56
  /**
57
+ * 定义组件的外部css类名
89
58
  * 组件的外部扩展样式(在layouts布局、视图页面里定义)
90
- * 通过定义class名称
91
59
  */
92
- cssClass?: string;
60
+ class?: string;
61
+ /**
62
+ * Widget示例化后的对象,动态绑定上的
63
+ */
64
+ instance?: Component;
93
65
  /**
94
66
  * 扩展属性,支持应用
95
67
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xframelib",
3
- "version": "1.1.2",
4
- "description": "积累的前端开发基础库,来源于项目,服务于项目。",
3
+ "version": "1.1.4",
4
+ "description": "The accumulated front-end development foundation library originates from projects and serves projects.",
5
5
  "main": "dist/index.js",
6
6
  "common": "dist/index.cjs",
7
7
  "typings": "dist/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "@hprose/rpc-core": "^3.0.10",
35
35
  "@hprose/rpc-html5": "^3.0.10",
36
36
  "@iconify-icons/ant-design": "^1.2.7",
37
- "@iconify/vue": "^5.0.0",
37
+ "@iconify/vue": "^5.0.1",
38
38
  "@microsoft/signalr": "^10.0.0",
39
39
  "axios": "^1.16.0",
40
40
  "buffer": "^6.0.3",
@@ -42,7 +42,7 @@
42
42
  "iconv-lite": "^0.7.2",
43
43
  "localforage": "^1.10.0",
44
44
  "loglevel": "^1.9.2",
45
- "lru-cache": "^11.3.5",
45
+ "lru-cache": "^11.3.6",
46
46
  "qs": "^6.15.1",
47
47
  "spark-md5": "^3.0.2",
48
48
  "xhr": "^2.6.0"
@@ -52,9 +52,9 @@
52
52
  "@rollup/plugin-commonjs": "^29.0.2",
53
53
  "@rollup/plugin-terser": "^1.0.0",
54
54
  "@rollup/plugin-typescript": "^12.3.0",
55
- "@types/node": "^25.6.0",
55
+ "@types/node": "^25.6.2",
56
56
  "@vitejs/plugin-vue": "^6.0.6",
57
- "@vue/language-core": "^3.2.7",
57
+ "@vue/language-core": "^3.2.8",
58
58
  "comlink": "^4.4.2",
59
59
  "esbuild": "^0.28.0",
60
60
  "rollup-plugin-copy": "^3.5.0",
@@ -64,12 +64,12 @@
64
64
  "sass": "^1.99.0",
65
65
  "typescript": "^6.0.3",
66
66
  "unplugin-dts": "1.0.0",
67
- "vite": "^8.0.10",
67
+ "vite": "^8.0.12",
68
68
  "vite-plugin-comlink": "^5.3.0",
69
69
  "vite-plugin-commonjs": "^0.10.4",
70
70
  "vite-plugin-node-polyfills": "^0.26.0",
71
71
  "vite-plugin-static-copy": "^4.1.0",
72
- "vue": "^3.5.33",
72
+ "vue": "^3.5.34",
73
73
  "vue-router": "^5.0.6"
74
74
  }
75
75
  }
package/README_zh.md DELETED
@@ -1,204 +0,0 @@
1
- # xframelib
2
-
3
- <p>
4
- <a href="https://www.npmjs.com/package/xframelib" target="_blank">
5
- <img src="https://img.shields.io/npm/v/xframelib?color=orange&logo=npm" />
6
- </a>
7
- <a href="https://www.npmjs.com/package/xframelib" target="_blank">
8
- <img src="https://img.shields.io/npm/dt/xframelib?logo=npm"/>
9
- </a>
10
- </p>
11
-
12
- ## XFramelib前端基础库
13
-
14
- > 核心实现一套 Widget机制的企业级微前端架构,积累与UI界面库无关的基础功能和组件,提升基础代码稳定性和高复用度,秉持来源于项目和服务于项目理念。
15
-
16
- [README中文.md](./README_zh.md) | [更新日志](https://share.note.youdao.com/s/MrahKIVA)
17
-
18
- ## 主要功能:
19
-
20
- - Global.Config:对应public下的系统配置Sysconfig.js
21
-
22
- - LayoutManager: 实现Widget调度机制
23
-
24
- - Global.EventBus:公共事件总线
25
-
26
- - UI组件:
27
-
28
- - LayoutContainer (Layout布局容器)
29
- - ScaleContainer(等比例整体缩放容器)
30
- - XWindow (仿window窗体组件)
31
- - SplitPanes( 页面区域分割面板)
32
- - Popover(浮动面板)
33
- - RouterTransition相关组件
34
-
35
- - 后端服务调用:
36
-
37
- - Http Web请求:Axios的封装实现Global.Axios、AxiosHelper{get, post, requestPost, requestGet, getData, requestPostBody}
38
- - Hprose服务:Hprose Proxy方式调用后台hprose服务
39
-
40
- - 常用基础功能:
41
-
42
- - H5Tool通用基础功能
43
- - IsTool类型判断工具(数字、字符串、对象、数组、函数等)
44
- - ValidateTool验证工具(身份证、手机号、IP地址、邮箱、密码强度判断、URL、车牌号等)
45
- - JQuery工具 (hasClass 、addClass、removeClass、toggleClass、setCssProperty)
46
- - 压缩解压工具类:ZipTool和GzipTool
47
- - 缓存功能:StorageHelper 操作本地缓存对象、WebCacheTool前端缓存功能
48
- - XXTEA加密解密算法
49
-
50
- - 指令:(使用setupDirectives进行注册加载指令)
51
-
52
- - v-wow 分块滚动显示
53
- - v-media 自适应样式
54
- - v-drag 可拖拽
55
- - v-repeatClick 避免重复点击
56
- - v-dc 双击指令
57
-
58
- - 文件上传下载
59
-
60
- - BigFileDownload 大文件下载
61
- - FileUpload 大文件上传
62
- - FileDownload 普通文件下载封装,包括{ Download, SaveAs, JsonDownload, HttpDownload, DownloadByUrl }
63
-
64
- - WebWorkers:
65
-
66
- - iconvWorker 文本编码/解码
67
- - webCacheWorker 前端缓存层
68
- - xmathWorker 通用数学计算,前端大图片,瓦片化加载
69
-
70
- - NavigatorPlugin浏览器插件(提供通用浏览器全局方法封装)
71
-
72
-
73
-
74
- ## 使用
75
-
76
- `pnpm add xframelib`
77
-
78
- or
79
-
80
- `npm i xframelib`
81
-
82
- 全局引入库样式:
83
-
84
- import 'xframelib/dist/index.css';
85
-
86
- - 应用案例开源:**前端开发模板 vue-widget-template**
87
-
88
- https://github.com/zorrowm/vue-widget-template
89
-
90
- 全面基于XFramelib和Widget思想的开发模板
91
-
92
- - **main.ts 文件**
93
- In Typescript:
94
-
95
- ```js
96
- import { createApp } from 'vue';
97
- import App from './App.vue';
98
- //模板添加的
99
- import { setupRouter } from './router/index';
100
- import {setupGlobDirectives} from './directives/index';
101
- import { init, Global } from 'xframelib';
102
- import 'xframelib/dist/index.css';
103
- import { getSystemPKG, getSystemID } from '@/utils/sysTool';
104
- import { createPinia } from 'pinia';
105
- import { message } from 'ant-design-vue';
106
- import {Icon} from '@iconify/vue';
107
- //dev阶段打开,build注销
108
- import 'ant-design-vue/dist/antd.css';
109
-
110
-
111
- message.config({
112
- top: `100px`,
113
- duration: 1,
114
- maxCount: 3
115
- });
116
- //绑定消息和初始化xframe
117
- //系统ID,唯一标识
118
- const sysID = getSystemID();
119
- //分组名,工程名
120
- const sysGroup = getSystemPKG().name;
121
- init(message, sysID, sysGroup);
122
-
123
- // 创建pinia 实例
124
- const pinia = createPinia();
125
- const app = createApp(App);
126
- // 挂载到 Vue 根实例上
127
- app.use(pinia);
128
- //定义v-drag命令
129
- setupGlobDirectives(app);
130
- setupRouter(app);
131
- //注册全局组件
132
- app.component('Icon',Icon);
133
-
134
- app.mount('#app');
135
-
136
- ```
137
-
138
- - **Quasar boot 使用示例**
139
-
140
- ```vue
141
- import { boot } from 'quasar/wrappers';
142
- import { addAPIProvider, Icon } from '@iconify/vue';
143
- import { Dropdown } from 'floating-vue';
144
- import { EmitLoadingInfo } from 'src/events/index';
145
- import { autoRefresh } from 'src/utils/autoUpdate';
146
- import { message } from 'src/utils/MessageNotify';
147
- //封装的消息提示
148
- import { getSystemID, getSystemPKG } from 'src/utils/sysTool';
149
- import { Global, init } from 'xframelib';
150
- function preInit() {
151
-
152
- //系统ID,唯一标识
153
- const sysID = getSystemID();
154
- //分组名,工程名
155
- const sysGroup = getSystemPKG().name;
156
- init(message, sysID, sysGroup);
157
- //挂载进度通知方法
158
- Global.Loading = EmitLoadingInfo;
159
- //注册自己的IconAPIProvider
160
- if (Global.Config?.ServiceURL.IconServiceURL)
161
- addAPIProvider('', {
162
- resources: [Global.Config?.ServiceURL.IconServiceURL]
163
- });
164
- else {
165
- //离线使用图标:生效,IconServiceURL配置为空
166
- import('../components/IconOffline').then((it) => {
167
- it.default();
168
- });
169
- }
170
- }
171
- export default boot(({ app }) => {
172
- EmitLoadingInfo('XFramelib库');
173
- //初始化Xframelib
174
- preInit();
175
- //启动热更新监测
176
- if (import.meta.env.DEV) autoRefresh();
177
- // 创建pinia 实例——20240221这里不需要了,在src/stores/index.ts里挂接的
178
- // const pinia = createPinia();
179
- // app.use(pinia);
180
- //注册全局组件
181
- app.component('Icon', Icon);
182
- app.component('VDropdown', Dropdown);
183
- // app.component('VTooltip', Tooltip);
184
- // app.component('VMenu', Menu);
185
-
186
- //开发时,全局注册tiny组件
187
- // if (import.meta.env.DEV) {
188
- // // import('@opentiny/vue').then((it) => {
189
- // // const TinyVue = it.default;
190
- // // app.use(TinyVue);
191
- // // });
192
- // }
193
- console.log('环境变量',process.env);
194
- //保存网站根地址
195
- app.config.globalProperties.$AppURL=process.env.APP_URL;
196
- });
197
-
198
- ```
199
-
200
- ## 应用示例
201
-
202
- ![开发模版](https://zorrowm.github.io/npm/xframelib.png)
203
-
204
- ![maplibre加载大图](https://zorrowm.github.io/npm/bigImageWorkerExample.png)
File without changes
File without changes
File without changes
File without changes
@@ -157,11 +157,11 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
157
157
  onMinimize?: ((...args: any[]) => any) | undefined;
158
158
  }>, {
159
159
  title: string;
160
+ icon: string;
160
161
  top: string | number;
161
162
  left: string | number;
162
163
  right: string | number;
163
164
  bottom: string | number;
164
- icon: string;
165
165
  tag: string | number | unknown[] | Record<string, any>;
166
166
  nWidth: string | number;
167
167
  nHeight: string | number;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes