xframelib 1.1.2 → 1.1.3
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 +1 -1
- package/dist/assets/{worker-webcache-DX6bhBzy.js → worker-webcache-C22MEJ3V.js} +9 -9
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/README_zh.md +0 -204
- /package/dist/{src/api → api}/Token.d.ts +0 -0
- /package/dist/{src/api → api}/User.d.ts +0 -0
- /package/dist/{src/api → api}/index.d.ts +0 -0
- /package/dist/{src/controls → controls}/ADivider.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/ScaleContainer/index.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/ScrollSnapContainer/index.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/index.d.ts +0 -0
- /package/dist/{src/controls → controls}/layoutcontainer/LayoutManager.d.ts +0 -0
- /package/dist/{src/controls → controls}/layoutcontainer/index.d.ts +0 -0
- /package/dist/{src/controls → controls}/layoutcontainer/layout.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/popover/index.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/routertransition/RouterTransition.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/routertransition/RouterTransitionAnimate.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/routertransition/SuspenseWithError.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/routertransition/index.d.ts +0 -0
- /package/dist/{src/controls → controls}/splitpanes/index.d.ts +0 -0
- /package/dist/{src/controls → controls}/splitpanes/pane.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/splitpanes/splitpanes.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/xwindow/XWindow.vue.d.ts +0 -0
- /package/dist/{src/controls → controls}/xwindow/XWindowManager.d.ts +0 -0
- /package/dist/{src/controls → controls}/xwindow/index.d.ts +0 -0
- /package/dist/{src/core → core}/Global.d.ts +0 -0
- /package/dist/{src/core → core}/IModel.d.ts +0 -0
- /package/dist/{src/core → core}/Init.d.ts +0 -0
- /package/dist/{src/core → core}/MsgHelper.d.ts +0 -0
- /package/dist/{src/core → core}/SysEvents.d.ts +0 -0
- /package/dist/{src/core → core}/index.d.ts +0 -0
- /package/dist/{src/directives → directives}/dbClickDirective.d.ts +0 -0
- /package/dist/{src/directives → directives}/dragDirective.d.ts +0 -0
- /package/dist/{src/directives → directives}/index.d.ts +0 -0
- /package/dist/{src/directives → directives}/mediaDirective.d.ts +0 -0
- /package/dist/{src/directives → directives}/repeatClickDirective.d.ts +0 -0
- /package/dist/{src/directives → directives}/wowDirective.d.ts +0 -0
- /package/dist/{src/hprose → hprose}/HproseClient.d.ts +0 -0
- /package/dist/{src/hprose → hprose}/HproseIO.d.ts +0 -0
- /package/dist/{src/hprose → hprose}/ProxyClient.d.ts +0 -0
- /package/dist/{src/hprose → hprose}/index.d.ts +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/mitt → mitt}/index.d.ts +0 -0
- /package/dist/{src/model → model}/Config.d.ts +0 -0
- /package/dist/{src/model → model}/Constants.d.ts +0 -0
- /package/dist/{src/model → model}/IModalModels.d.ts +0 -0
- /package/dist/{src/model → model}/IRole.d.ts +0 -0
- /package/dist/{src/model → model}/ITypes.d.ts +0 -0
- /package/dist/{src/model → model}/IUserModel.d.ts +0 -0
- /package/dist/{src/model → model}/IWidgetMenu.d.ts +0 -0
- /package/dist/{src/model → model}/Layout.d.ts +0 -0
- /package/dist/{src/model → model}/index.d.ts +0 -0
- /package/dist/{src/permission → permission}/RoleSysRightHelper.d.ts +0 -0
- /package/dist/{src/permission → permission}/filter.d.ts +0 -0
- /package/dist/{src/permission → permission}/index.d.ts +0 -0
- /package/dist/{src/permission → permission}/register.d.ts +0 -0
- /package/dist/{src/permission → permission}/right.d.ts +0 -0
- /package/dist/{src/plugins → plugins}/NavigatorPlugin.d.ts +0 -0
- /package/dist/{src/plugins → plugins}/index.d.ts +0 -0
- /package/dist/{src/utils → utils}/AutoUpdate.d.ts +0 -0
- /package/dist/{src/utils → utils}/AxiosHelper.d.ts +0 -0
- /package/dist/{src/utils → utils}/BigFileDownload.d.ts +0 -0
- /package/dist/{src/utils → utils}/CodeHelper.d.ts +0 -0
- /package/dist/{src/utils → utils}/Color.d.ts +0 -0
- /package/dist/{src/utils → utils}/CommonTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/DayjsTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/FetchHelper.d.ts +0 -0
- /package/dist/{src/utils → utils}/FileDownload.d.ts +0 -0
- /package/dist/{src/utils → utils}/FileUpload.d.ts +0 -0
- /package/dist/{src/utils → utils}/FileUpload_/346/227/247.d.ts" +0 -0
- /package/dist/{src/utils → utils}/FilenameUtils.d.ts +0 -0
- /package/dist/{src/utils → utils}/GzipTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/H5Tool.d.ts +0 -0
- /package/dist/{src/utils → utils}/IsTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/JQuery.d.ts +0 -0
- /package/dist/{src/utils → utils}/LocalForageHelper.d.ts +0 -0
- /package/dist/{src/utils → utils}/LockHelper.d.ts +0 -0
- /package/dist/{src/utils → utils}/RouterURLTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/Screen.d.ts +0 -0
- /package/dist/{src/utils → utils}/SignalrClient.d.ts +0 -0
- /package/dist/{src/utils → utils}/Storage.d.ts +0 -0
- /package/dist/{src/utils → utils}/StringUtils.d.ts +0 -0
- /package/dist/{src/utils → utils}/Time.d.ts +0 -0
- /package/dist/{src/utils → utils}/TokenHelper.d.ts +0 -0
- /package/dist/{src/utils → utils}/ValidateTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/WarGridTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/WaterMark.d.ts +0 -0
- /package/dist/{src/utils → utils}/WebCacheTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/WidgetsTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/XXTEA.d.ts +0 -0
- /package/dist/{src/utils → utils}/ZipTool.d.ts +0 -0
- /package/dist/{src/utils → utils}/index.d.ts +0 -0
- /package/dist/{src/utils → utils}/uuid.d.ts +0 -0
- /package/dist/{src/workers → workers}/index.d.ts +0 -0
- /package/dist/{src/workers → workers}/worker-iconv.d.ts +0 -0
- /package/dist/{src/workers → workers}/worker-webcache.d.ts +0 -0
- /package/dist/{src/workers → workers}/worker-xmath.d.ts +0 -0
- /package/dist/{src/workerservice → workerservice}/frontWorker.d.ts +0 -0
- /package/dist/{src/workerservice → workerservice}/index.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xframelib",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "积累的前端开发基础库,来源于项目,服务于项目。",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"common": "dist/index.cjs",
|
|
@@ -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.
|
|
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"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
55
55
|
"@types/node": "^25.6.0",
|
|
56
56
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
57
|
-
"@vue/language-core": "^3.2.
|
|
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",
|
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
|
-

|
|
203
|
-
|
|
204
|
-

|
|
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
|
|
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
|