guava-ui 0.0.1 → 0.0.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.
- package/README.en.md +149 -0
- package/README.md +45 -9
- package/index.html +152 -0
- package/lib/guava-ui.es.js +317 -0
- package/lib/guava-ui.es.js.map +1 -0
- package/lib/guava-ui.umd.js +3 -0
- package/lib/guava-ui.umd.js.map +1 -0
- package/lib/index.css +1 -0
- package/package.json +95 -37
- package/lib/guava-ui.cjs +0 -1
- package/lib/guava-ui.js +0 -15
package/README.en.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Statement
|
|
2
|
+
|
|
3
|
+
`guava-ui` Guava Front end Engineering (Vue3) Historical Version Record
|
|
4
|
+
Author: <andy.ten@tom.com> & <xukaixing@hotmail.com>
|
|
5
|
+
API Url:<http://211.149.174.199:8888/vpapi/>
|
|
6
|
+
|
|
7
|
+
## Preorder
|
|
8
|
+
|
|
9
|
+
1. 安装全局`nodejs` 请使用`v20.18.0`及以上版本,建议使用`nvm`管理 nodejs 多个版本
|
|
10
|
+
2. 建议使用`pnpm`管理 npm 依赖
|
|
11
|
+
3. 前端开发 ide 建议使用`vscode:latest`, 必要的插件列表:
|
|
12
|
+
- `Vite` : vue3 打包工具,开发环境使用vite运行
|
|
13
|
+
- `Vue - Official` : vscode的vue3支持工具
|
|
14
|
+
- `Prettier` : 代码格式化工具,无 lint 检查代码语法能力
|
|
15
|
+
- `Eslint` : 校验脚本语言语法工具
|
|
16
|
+
- `Stylelint` : 校验css语法工具
|
|
17
|
+
|
|
18
|
+
## Version - last >= 3
|
|
19
|
+
|
|
20
|
+
> v0.0.3 : 2025.03.19
|
|
21
|
+
>> 按需导入element-plus组件和样式
|
|
22
|
+
>> 引入国际化多语言i18n
|
|
23
|
+
>> vite.config.js编译与打包优化
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
> v0.0.2 : 2024.11.29
|
|
28
|
+
>> pnpm add vite-plugin-svg-icons -D
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
> v0.0.1 : 2024.11.24
|
|
33
|
+
>> 使用 pnpm create vue@latest 脚手架创建工程
|
|
34
|
+
>> pnpm add sass-embedded -D 添加nodejs解析scss依赖
|
|
35
|
+
>> 在vite.config.ts中配置css解析
|
|
36
|
+
>> 定义目录结构,在@/assets/styles中,新增app.scss、main.scss、variables.scss样式表
|
|
37
|
+
>> pnpm add postcss -D 用JavaScript编写的工具转换CSS代码
|
|
38
|
+
>> pnpm add postcss-html -D 将html文件中的样式块中的CSS代码提取出来进行处理
|
|
39
|
+
>> pnpm add postcss-scss -D 将scss代码转换成CSS代码
|
|
40
|
+
>> pnpm add autoprefixer -D 自动添加CSS浏览器前缀的插件
|
|
41
|
+
>> pnpm add vite-plugin-progress -D Vite 构建工具的插件,提供构建进度条显示功能
|
|
42
|
+
>> pnpm add vite-plugin-eslint -D
|
|
43
|
+
>> pnpm add terser -D
|
|
44
|
+
|
|
45
|
+
## Exec
|
|
46
|
+
|
|
47
|
+
### 使用 `pnpm` 命令
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# 安装依赖
|
|
51
|
+
$ pnpm install
|
|
52
|
+
|
|
53
|
+
# 启动开发服务
|
|
54
|
+
$ pnpm dev
|
|
55
|
+
|
|
56
|
+
# 启动构建生产服务
|
|
57
|
+
$ pnpm build
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Modules
|
|
61
|
+
|
|
62
|
+
- `sass-embedded` pnpm add sass-embedded -D nodejs环境下使用scss
|
|
63
|
+
- `postcss` pnpm add postcss -D 用JavaScript编写的工具转换CSS代码
|
|
64
|
+
- `postcss-html` pnpm add postcss-html -D 将html文件中的样式块中的CSS代码提取出来进行处理
|
|
65
|
+
- `postcss-scss` pnpm add postcss-scss -D 将scss代码转换成CSS代码
|
|
66
|
+
- `autoprefixer` pnpm add autoprefixer -D 自动添加CSS浏览器前缀的插件
|
|
67
|
+
- `vite-plugin-progress` Vite 构建工具的插件,提供构建进度条显示功能
|
|
68
|
+
- `vite-plugin-eslint` 集成了 ESLint 的能力,在保存或构建时检测到代码中的潜在问题
|
|
69
|
+
- `eslint-plugin-vue` 检查.vue文件中的ts
|
|
70
|
+
- `eslint` pnpm add eslint @vue/eslint-config-typescript eslint-plugin-oxlint eslint-plugin-prettier eslint-plugin-vue vue-eslint-parser -D
|
|
71
|
+
- `@typescript-eslint/eslint-plugin` typescript-eslint检查插件
|
|
72
|
+
- `@typescript-eslint/parser` typescript-eslint插件
|
|
73
|
+
- `@commitlint/{config-conventional,cli}` git commit注视规范检查插件
|
|
74
|
+
- `lint-staged` 对已经通过 git add 暂存的文件运行linters进行检测
|
|
75
|
+
- `terser` JavaScript 压缩工具,它是 UglifyJS 的一个现代分支,支持更新的 JavaScript 特性(如 ES6+)
|
|
76
|
+
- `stylelint` pnpm add stylelint stylelint-config-standard stylelint-config-standard-scss stylelint-order stylelint-prettier stylelint-config-prettier stylelint-config-recommended-vue stylelint-config-recommended stylelint-config-recess-order stylelint-config-recess-order stylelint-scss -D
|
|
77
|
+
- `dayjs` pnpm add dayjs JavaScript 日期库,支持国际化显示和各种格式的日期和时间的解析和格式化
|
|
78
|
+
- `vite-plugin-style-import` 按需加载组件库的样式
|
|
79
|
+
- `pinia` vuex替换组件,管理全局state状态
|
|
80
|
+
- `pinia-plugin-persistedstate` pinia 状态持久化到localStorage或SessionStorage
|
|
81
|
+
- `vite-plugin-ejs` 支持 EJS(Embedded JavaScript Templates) 模板语法。在 HTML 模板中使用动态数据(`<%=%>`)
|
|
82
|
+
- `vite-plugin-url-copy` Vite 开发服务器启动后,自动复制 URL 到剪贴板,方便你直接粘贴到浏览器或终端中
|
|
83
|
+
- `vite-plugin-svg-icons` Vite 插件,用于自动加载本地 SVG 图标,并将其转换为 SVG Sprite(SVG 精灵图),从而减少 HTTP 请求,提高性能
|
|
84
|
+
- `vite-plugin-purge-icons` Vite 插件,用于按需导入和自动优化 SVG 图标,可以直接使用 Material Icons、FontAwesome、Tabler Icons、Heroicons 等上千个图标库,而不需要手动安装或导入
|
|
85
|
+
- `vite-plugin-full-reload` Vite 插件,用于监听指定文件,并在更改时触发整个页面的刷新(而不仅仅是 HMR 热更新)(修改 vite.config.js 等配置文件后,HMR 不能自动生效)
|
|
86
|
+
- `rollup-plugin-visualizer` Vite 构建体积分析插件.Rollup 插件,用于 Vite、Rollup、Webpack 项目,生成一个 交互式的可视化报告,分析 构建体积、依赖大小、包的嵌套关系
|
|
87
|
+
- `browserslist` 一个工具,用于定义项目要支持的浏览器范围
|
|
88
|
+
- `@vitejs/plugin-legacy` Vite 官方插件,用于让 Vite 项目兼容 旧版浏览器(如 IE11 或较旧的 Chrome、Safari、Firefox 版本);引入该组件,会生成兼容旧浏览器的polyfill文件,增加代码体积,去掉该依赖;
|
|
89
|
+
- `@rollup/plugin-commonjs` Rollup 官方插件,用于让 Rollup 兼容 CommonJS 模块; 使用该commonjs会导致element-plus打包时提示TimePicker的dayjs引入错误,故去掉该依赖;
|
|
90
|
+
- `cropper.js` 用于实现 图片裁剪 功能;在网页上对图像进行裁剪、缩放、旋转等操作
|
|
91
|
+
- `vite-plugin-vue-devtools` Vite 插件,用于在开发过程中启用和配置 Vue Devtools
|
|
92
|
+
- `@intlify/unplugin-vue-i18n` Vite 默认不支持 vue-i18n 运行时编译,使用 @intlify/unplugin-vue-i18n 插件优化:
|
|
93
|
+
|
|
94
|
+
## Catalog
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### FAQ
|
|
101
|
+
|
|
102
|
+
- `安装pnpm`
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
使用npm安装:$ npm install -g pnpm
|
|
106
|
+
查看版本:$ pnpm -v
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- `全局安装eslint`
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
使用npm安装:$ npm install -g eslint babel-eslint
|
|
113
|
+
注意: 如果使用nvm管理不同的nodejs版本,需要在当前使用版本上执行命令
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- `配置镜像加速`
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
配置淘宝的镜像源: $ npm config set registry https://registry.npm.taobao.org
|
|
120
|
+
还原npm镜像:$ npm config set registry https://registry.npmjs.org/
|
|
121
|
+
清除缓存:$ npm cache clean --force
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- `切换nodejs版本`
|
|
125
|
+
|
|
126
|
+
使用nvm命令: nvm alias default 版本号 </br>
|
|
127
|
+
注意切换完后,重启vscode
|
|
128
|
+
|
|
129
|
+
## Git comments rule
|
|
130
|
+
|
|
131
|
+
- feat 新功能
|
|
132
|
+
- fix 修补 bug
|
|
133
|
+
- docs 文档
|
|
134
|
+
- style 格式、样式(不影响代码运行的变动)
|
|
135
|
+
- refactor 重构(即不是新增功能,也不是修改 BUG 的代码)
|
|
136
|
+
- perf 优化相关,比如提升性能、体验
|
|
137
|
+
- test 添加测试
|
|
138
|
+
- ci 持续集成修改
|
|
139
|
+
- chore 构建过程或辅助工具的变动
|
|
140
|
+
- revert 回滚到上一个版本
|
|
141
|
+
- workflow 工作流改进
|
|
142
|
+
- mod 不确定分类的修改
|
|
143
|
+
- wip 开发中
|
|
144
|
+
- types 类型
|
|
145
|
+
|
|
146
|
+
## HomePage
|
|
147
|
+
|
|
148
|
+
- 欢迎访问个人 [github-xukaixing](https://github.com/xukaixing) 主页.
|
|
149
|
+
- 欢迎访问个人 [gitee-xukaixing](https://gitee.com/xukaixing) 主页.
|
package/README.md
CHANGED
|
@@ -17,6 +17,30 @@
|
|
|
17
17
|
|
|
18
18
|
## Version - last >= 3
|
|
19
19
|
|
|
20
|
+
> v0.0.4 : 2025.04.02
|
|
21
|
+
>> 新增GvLangSelect组件
|
|
22
|
+
>> 新增SvgIcon组件
|
|
23
|
+
>> vite.config.js编译与打包优化
|
|
24
|
+
>> pnpm add @vueuse/core -S 基于 Vue 3 的 组合式 API 工具库
|
|
25
|
+
>> 新增style样式
|
|
26
|
+
>> 新增GvConfigProvider组件,设置全局配置信息
|
|
27
|
+
>> 新增axios封装组件
|
|
28
|
+
>> 新增hooks/useCrud和hooks/useNotify
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
> v0.0.3 : 2025.03.19
|
|
33
|
+
>> 按需导入element-plus组件和样式
|
|
34
|
+
>> 引入国际化多语言i18n
|
|
35
|
+
>> vite.config.js编译与打包优化
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
> v0.0.2 : 2024.11.29
|
|
40
|
+
>> pnpm add vite-plugin-svg-icons -D
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
20
44
|
> v0.0.1 : 2024.11.24
|
|
21
45
|
>> 使用 pnpm create vue@latest 脚手架创建工程
|
|
22
46
|
>> pnpm add sass-embedded -D 添加nodejs解析scss依赖
|
|
@@ -39,14 +63,10 @@
|
|
|
39
63
|
$ pnpm install
|
|
40
64
|
|
|
41
65
|
# 启动开发服务
|
|
42
|
-
$ pnpm
|
|
66
|
+
$ pnpm dev
|
|
43
67
|
|
|
44
68
|
# 启动构建生产服务
|
|
45
|
-
$ pnpm
|
|
46
|
-
|
|
47
|
-
# 本地预览打包后dist目录应用:
|
|
48
|
-
$ npm install serve -g
|
|
49
|
-
$ serve -s ./dist
|
|
69
|
+
$ pnpm build
|
|
50
70
|
```
|
|
51
71
|
|
|
52
72
|
## Modules
|
|
@@ -65,8 +85,25 @@ $ serve -s ./dist
|
|
|
65
85
|
- `@commitlint/{config-conventional,cli}` git commit注视规范检查插件
|
|
66
86
|
- `lint-staged` 对已经通过 git add 暂存的文件运行linters进行检测
|
|
67
87
|
- `terser` JavaScript 压缩工具,它是 UglifyJS 的一个现代分支,支持更新的 JavaScript 特性(如 ES6+)
|
|
68
|
-
- `stylelint` pnpm add stylelint stylelint-config-standard stylelint-config-standard-scss stylelint-order stylelint-prettier stylelint-config-prettier stylelint-config-recommended-vue stylelint-config-recommended stylelint-config-recess-order stylelint-config-recess-order -D
|
|
69
|
-
|
|
88
|
+
- `stylelint` pnpm add stylelint stylelint-config-standard stylelint-config-standard-scss stylelint-order stylelint-prettier stylelint-config-prettier stylelint-config-recommended-vue stylelint-config-recommended stylelint-config-recess-order stylelint-config-recess-order stylelint-scss -D
|
|
89
|
+
- `dayjs` pnpm add dayjs JavaScript 日期库,支持国际化显示和各种格式的日期和时间的解析和格式化
|
|
90
|
+
- `vite-plugin-style-import` 按需加载组件库的样式
|
|
91
|
+
- `pinia` vuex替换组件,管理全局state状态
|
|
92
|
+
- `pinia-plugin-persistedstate` pinia 状态持久化到localStorage或SessionStorage
|
|
93
|
+
- `vite-plugin-ejs` 支持 EJS(Embedded JavaScript Templates) 模板语法。在 HTML 模板中使用动态数据(`<%=%>`)
|
|
94
|
+
- `vite-plugin-url-copy` Vite 开发服务器启动后,自动复制 URL 到剪贴板,方便你直接粘贴到浏览器或终端中
|
|
95
|
+
- `vite-plugin-svg-icons` Vite 插件,用于自动加载本地 SVG 图标,并将其转换为 SVG Sprite(SVG 精灵图),从而减少 HTTP 请求,提高性能
|
|
96
|
+
- `vite-plugin-purge-icons` Vite 插件,用于按需导入和自动优化 SVG 图标,可以直接使用 Material Icons、FontAwesome、Tabler Icons、Heroicons 等上千个图标库,而不需要手动安装或导入
|
|
97
|
+
- `vite-plugin-full-reload` Vite 插件,用于监听指定文件,并在更改时触发整个页面的刷新(而不仅仅是 HMR 热更新)(修改 vite.config.js 等配置文件后,HMR 不能自动生效)
|
|
98
|
+
- `rollup-plugin-visualizer` Vite 构建体积分析插件.Rollup 插件,用于 Vite、Rollup、Webpack 项目,生成一个 交互式的可视化报告,分析 构建体积、依赖大小、包的嵌套关系
|
|
99
|
+
- `browserslist` 一个工具,用于定义项目要支持的浏览器范围
|
|
100
|
+
- `@vitejs/plugin-legacy` Vite 官方插件,用于让 Vite 项目兼容 旧版浏览器(如 IE11 或较旧的 Chrome、Safari、Firefox 版本);引入该组件,会生成兼容旧浏览器的polyfill文件,增加代码体积,去掉该依赖;
|
|
101
|
+
- `@rollup/plugin-commonjs` Rollup 官方插件,用于让 Rollup 兼容 CommonJS 模块; 使用该commonjs会导致element-plus打包时提示TimePicker的dayjs引入错误,故去掉该依赖;
|
|
102
|
+
- `cropper.js` 用于实现 图片裁剪 功能;在网页上对图像进行裁剪、缩放、旋转等操作
|
|
103
|
+
- `vite-plugin-vue-devtools` Vite 插件,用于在开发过程中启用和配置 Vue Devtools
|
|
104
|
+
- `@intlify/unplugin-vue-i18n` Vite 默认不支持 vue-i18n 运行时编译,使用 @intlify/unplugin-vue-i18n 插件优化
|
|
105
|
+
- `@vueuse/core` 基于 Vue 3 的 组合式 API 工具库,useMouse() — 获取鼠标坐标;useDark() — 切换深色模式;useLocalStorage() — 本地存储;useFetch() — 网络请求;useClipboard() — 剪贴板;useFullscreen() - 全屏模式
|
|
106
|
+
|
|
70
107
|
## Catalog
|
|
71
108
|
|
|
72
109
|
```text
|
|
@@ -111,7 +148,6 @@ $ serve -s ./dist
|
|
|
111
148
|
- refactor 重构(即不是新增功能,也不是修改 BUG 的代码)
|
|
112
149
|
- perf 优化相关,比如提升性能、体验
|
|
113
150
|
- test 添加测试
|
|
114
|
-
- build 编译相关的修改,对项目构建或者依赖的改动
|
|
115
151
|
- ci 持续集成修改
|
|
116
152
|
- chore 构建过程或辅助工具的变动
|
|
117
153
|
- revert 回滚到上一个版本
|
package/index.html
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<link rel="shortcut icon" href="/favicon.ico">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1, user-scalable=no" />
|
|
8
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
9
|
+
<meta name="keywords" content="vue3, typescript, element plus, vite,guava-ui" />
|
|
10
|
+
<!-- EJS 语法 -->
|
|
11
|
+
<title>
|
|
12
|
+
<%= title %>
|
|
13
|
+
</title>
|
|
14
|
+
<style>
|
|
15
|
+
.app-loading {
|
|
16
|
+
display: flex;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
background: #f0f2f5;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.app-loading .app-loading-wrap {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 30%;
|
|
28
|
+
left: 50%;
|
|
29
|
+
display: flex;
|
|
30
|
+
-webkit-transform: translate3d(-50%, -50%, 0);
|
|
31
|
+
transform: translate3d(-50%, -50%, 0);
|
|
32
|
+
justify-content: center;
|
|
33
|
+
align-items: center;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.app-loading .app-loading-title {
|
|
38
|
+
margin-bottom: 30px;
|
|
39
|
+
font-size: 20px;
|
|
40
|
+
font-weight: bold;
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.app-loading .app-loading-logo {
|
|
45
|
+
width: 80px;
|
|
46
|
+
margin: 0 auto 10px auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.app-loading .app-loading-item {
|
|
50
|
+
position: relative;
|
|
51
|
+
display: inline-block;
|
|
52
|
+
width: 60px;
|
|
53
|
+
height: 60px;
|
|
54
|
+
vertical-align: middle;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.app-loading .app-loading-outter {
|
|
59
|
+
position: absolute;
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
border: 3px solid #cf2931;
|
|
63
|
+
border-bottom: 0;
|
|
64
|
+
border-left-color: transparent;
|
|
65
|
+
border-radius: 50%;
|
|
66
|
+
animation: loader-outter 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.app-loading .app-loading-inner {
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: calc(50% - 20px);
|
|
72
|
+
left: calc(50% - 20px);
|
|
73
|
+
width: 40px;
|
|
74
|
+
height: 40px;
|
|
75
|
+
border: 2px solid #d9545a;
|
|
76
|
+
border-right: 0;
|
|
77
|
+
border-top-color: transparent;
|
|
78
|
+
border-radius: 50%;
|
|
79
|
+
animation: loader-inner 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@-webkit-keyframes loader-outter {
|
|
83
|
+
0% {
|
|
84
|
+
-webkit-transform: rotate(0deg);
|
|
85
|
+
transform: rotate(0deg);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
100% {
|
|
89
|
+
-webkit-transform: rotate(360deg);
|
|
90
|
+
transform: rotate(360deg);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@keyframes loader-outter {
|
|
95
|
+
0% {
|
|
96
|
+
-webkit-transform: rotate(0deg);
|
|
97
|
+
transform: rotate(0deg);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
100% {
|
|
101
|
+
-webkit-transform: rotate(360deg);
|
|
102
|
+
transform: rotate(360deg);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@-webkit-keyframes loader-inner {
|
|
107
|
+
0% {
|
|
108
|
+
-webkit-transform: rotate(0deg);
|
|
109
|
+
transform: rotate(0deg);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
100% {
|
|
113
|
+
-webkit-transform: rotate(-360deg);
|
|
114
|
+
transform: rotate(-360deg);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@keyframes loader-inner {
|
|
119
|
+
0% {
|
|
120
|
+
-webkit-transform: rotate(0deg);
|
|
121
|
+
transform: rotate(0deg);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
100% {
|
|
125
|
+
-webkit-transform: rotate(-360deg);
|
|
126
|
+
transform: rotate(-360deg);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
</style>
|
|
130
|
+
</head>
|
|
131
|
+
|
|
132
|
+
<body>
|
|
133
|
+
<div id="app">
|
|
134
|
+
<div class="app-loading">
|
|
135
|
+
<div class="app-loading-wrap">
|
|
136
|
+
<div class="app-loading-title">
|
|
137
|
+
<img src="/logo.png" class="app-loading-logo" alt="Logo" />
|
|
138
|
+
<div class="app-loading-title">
|
|
139
|
+
<%= title %>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="app-loading-item">
|
|
143
|
+
<div class="app-loading-outter"></div>
|
|
144
|
+
<div class="app-loading-inner"></div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
<script type="module" src="/src/main.ts"></script>
|
|
150
|
+
</body>
|
|
151
|
+
|
|
152
|
+
</html>
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
var M = Object.defineProperty, D = Object.defineProperties;
|
|
2
|
+
var z = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var T = Object.getOwnPropertySymbols;
|
|
4
|
+
var R = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var $ = (e, t, s) => t in e ? M(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, C = (e, t) => {
|
|
6
|
+
for (var s in t || (t = {}))
|
|
7
|
+
R.call(t, s) && $(e, s, t[s]);
|
|
8
|
+
if (T)
|
|
9
|
+
for (var s of T(t))
|
|
10
|
+
H.call(t, s) && $(e, s, t[s]);
|
|
11
|
+
return e;
|
|
12
|
+
}, _ = (e, t) => D(e, z(t));
|
|
13
|
+
var f = (e, t, s) => new Promise((r, o) => {
|
|
14
|
+
var n = (i) => {
|
|
15
|
+
try {
|
|
16
|
+
u(s.next(i));
|
|
17
|
+
} catch (d) {
|
|
18
|
+
o(d);
|
|
19
|
+
}
|
|
20
|
+
}, a = (i) => {
|
|
21
|
+
try {
|
|
22
|
+
u(s.throw(i));
|
|
23
|
+
} catch (d) {
|
|
24
|
+
o(d);
|
|
25
|
+
}
|
|
26
|
+
}, u = (i) => i.done ? r(i.value) : Promise.resolve(i.value).then(n, a);
|
|
27
|
+
u((s = s.apply(e, t)).next());
|
|
28
|
+
});
|
|
29
|
+
import { defineComponent as O, computed as h, watch as J, createVNode as V, useAttrs as F, createElementBlock as v, openBlock as k, mergeProps as b, unref as E, createElementVNode as B } from "vue";
|
|
30
|
+
import { ElButton as K, ElMessage as Z, ElMessageBox as Q, ElNotification as W } from "element-plus";
|
|
31
|
+
import { useStyle as X } from "@/hook/web/useStyle";
|
|
32
|
+
import Y from "axios";
|
|
33
|
+
import { useI18n as P } from "@/hook/web/useI18n";
|
|
34
|
+
import { useUserStore as ee } from "@/store/modules/user";
|
|
35
|
+
import { useRouter as te } from "vue-router";
|
|
36
|
+
import p from "crypto-js";
|
|
37
|
+
const se = /* @__PURE__ */ O({
|
|
38
|
+
name: "GvButton",
|
|
39
|
+
// --- pass params between parent-child ---
|
|
40
|
+
props: {
|
|
41
|
+
message: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "GvButton",
|
|
44
|
+
request: !1
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
// --- register components ---
|
|
48
|
+
components: {},
|
|
49
|
+
// --- pass events between parent-child ---
|
|
50
|
+
emits: ["click", "submit"],
|
|
51
|
+
setup(e, {
|
|
52
|
+
emit: t,
|
|
53
|
+
slots: s
|
|
54
|
+
}) {
|
|
55
|
+
const r = h(() => {
|
|
56
|
+
var n;
|
|
57
|
+
return (n = s.default) == null ? void 0 : n.call(s);
|
|
58
|
+
});
|
|
59
|
+
J(() => e.message, (n) => {
|
|
60
|
+
console.log("GvButton:" + n);
|
|
61
|
+
});
|
|
62
|
+
const o = (n, a) => {
|
|
63
|
+
alert("this is a child event"), t("click", n, a);
|
|
64
|
+
};
|
|
65
|
+
return () => V(K, {
|
|
66
|
+
class: "gv-button",
|
|
67
|
+
onClick: (n) => o(n, e.message)
|
|
68
|
+
}, {
|
|
69
|
+
default: () => {
|
|
70
|
+
var n;
|
|
71
|
+
return [(n = r.value) != null ? n : e.message];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}), j = (e, t) => {
|
|
76
|
+
const s = e.__vccOpts || e;
|
|
77
|
+
for (const [r, o] of t)
|
|
78
|
+
s[r] = o;
|
|
79
|
+
return s;
|
|
80
|
+
}, N = /* @__PURE__ */ j(se, [["__scopeId", "data-v-67cee13e"]]), re = {
|
|
81
|
+
install(e) {
|
|
82
|
+
var t;
|
|
83
|
+
e.component((t = N.name) != null ? t : "GvButton", N);
|
|
84
|
+
}
|
|
85
|
+
}, oe = (e) => /^(https?:|mailto:|tel:)/.test(e), x = (e) => f(void 0, null, function* () {
|
|
86
|
+
return new Promise((t) => setTimeout(t, e));
|
|
87
|
+
}), Be = (e) => e ? e.replace(/\_(\w)/g, function(t, s) {
|
|
88
|
+
return s.toUpperCase();
|
|
89
|
+
}) : "", Ne = (e) => e.replace(/([A-Z])/g, "_$1").toLowerCase(), ne = ["href"], ae = ["xlink:href"], ce = /* @__PURE__ */ O({
|
|
90
|
+
name: "GvSvgIcon",
|
|
91
|
+
// 定义组件名称
|
|
92
|
+
inheritAttrs: !1,
|
|
93
|
+
__name: "GvSvgIcon",
|
|
94
|
+
props: {
|
|
95
|
+
iconType: { default: "svg" },
|
|
96
|
+
iconClass: {},
|
|
97
|
+
className: { default: "" },
|
|
98
|
+
size: {}
|
|
99
|
+
},
|
|
100
|
+
setup(e) {
|
|
101
|
+
const { variables: t } = X(), s = t.namespace, r = F(), o = e, n = h(() => oe(o.iconClass)), a = h(() => o.iconType === "svg" ? `#${s}-icon-${o.iconClass}` : `#${o.iconClass}`), u = h(() => o.className ? "svg-icon " + o.className : "svg-icon"), i = h(() => ({
|
|
102
|
+
mask: `url(${o.iconClass}) no-repeat 50% 50%`,
|
|
103
|
+
"-webkit-mask": `url(${o.iconClass}) no-repeat 50% 50%`
|
|
104
|
+
}));
|
|
105
|
+
return (d, w) => n.value ? (k(), v("div", b({
|
|
106
|
+
key: 0,
|
|
107
|
+
style: i.value,
|
|
108
|
+
class: "svg-external-icon svg-icon"
|
|
109
|
+
}, E(r)), null, 16)) : d.iconType === "svg" ? (k(), v("svg", b({
|
|
110
|
+
key: 1,
|
|
111
|
+
class: u.value,
|
|
112
|
+
"aria-hidden": "true"
|
|
113
|
+
}, E(r)), [
|
|
114
|
+
B("use", { href: a.value }, null, 8, ne)
|
|
115
|
+
], 16)) : (k(), v("svg", b({
|
|
116
|
+
key: 2,
|
|
117
|
+
class: u.value,
|
|
118
|
+
style: { "font-size": d.size + "px" },
|
|
119
|
+
"aria-hidden": "true"
|
|
120
|
+
}, E(r)), [
|
|
121
|
+
B("use", { "xlink:href": a.value }, null, 8, ae)
|
|
122
|
+
], 16));
|
|
123
|
+
}
|
|
124
|
+
}), I = /* @__PURE__ */ j(ce, [["__scopeId", "data-v-b1560990"]]), ie = {
|
|
125
|
+
install(e) {
|
|
126
|
+
var t;
|
|
127
|
+
e.component((t = I.name) != null ? t : "GvSvgIcon", I);
|
|
128
|
+
}
|
|
129
|
+
}, { t: g } = P(), ue = 5e3, le = 6e3, me = 2e3, pe = 5e3, de = () => ({
|
|
130
|
+
alert: (r = "No message...", o = "success") => f(void 0, null, function* () {
|
|
131
|
+
const n = document.body.querySelector("body>.el-notification");
|
|
132
|
+
n && n.remove();
|
|
133
|
+
const a = g("common.promptMsg"), u = o === "error" ? le : ue;
|
|
134
|
+
W({
|
|
135
|
+
title: a,
|
|
136
|
+
message: r,
|
|
137
|
+
type: o,
|
|
138
|
+
duration: u
|
|
139
|
+
}), yield x(u);
|
|
140
|
+
}),
|
|
141
|
+
confirm: (r, o = "warning") => f(void 0, null, function* () {
|
|
142
|
+
if (document.body.querySelector("body>.el-confirm")) return;
|
|
143
|
+
let n;
|
|
144
|
+
const a = !0;
|
|
145
|
+
r ? n = r : n = g("common.confirmMsg");
|
|
146
|
+
const u = g("common.confirmHint"), i = g("common.confirmOk"), d = g("common.confirmCancel");
|
|
147
|
+
return new Promise((w, q) => {
|
|
148
|
+
Q.confirm(n, u, {
|
|
149
|
+
confirmButtonText: i,
|
|
150
|
+
cancelButtonText: d,
|
|
151
|
+
type: o,
|
|
152
|
+
showCancelButton: a
|
|
153
|
+
}).then(() => {
|
|
154
|
+
w(!0);
|
|
155
|
+
}).catch(() => {
|
|
156
|
+
q(!1);
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}),
|
|
160
|
+
message: (r = "No message...", o = "warning", n = !1) => f(void 0, null, function* () {
|
|
161
|
+
if (n === !1 && (document.body.querySelector("body>.el-message") || document.body.querySelector("body>.el-notification")))
|
|
162
|
+
return;
|
|
163
|
+
const a = o === "error" ? pe : me;
|
|
164
|
+
Z({
|
|
165
|
+
message: r,
|
|
166
|
+
showClose: !0,
|
|
167
|
+
type: o,
|
|
168
|
+
duration: a
|
|
169
|
+
}), yield x(a);
|
|
170
|
+
})
|
|
171
|
+
}), U = "abcdefgabcdefg12", xe = (e) => {
|
|
172
|
+
const t = p.enc.Utf8.parse(U);
|
|
173
|
+
let s;
|
|
174
|
+
typeof e == "object" ? s = JSON.stringify(e) : s = e;
|
|
175
|
+
const r = p.enc.Utf8.parse(s);
|
|
176
|
+
return p.AES.encrypt(r, t, { mode: p.mode.ECB, padding: p.pad.Pkcs7 }).toString();
|
|
177
|
+
}, Ie = (e) => {
|
|
178
|
+
const t = p.enc.Utf8.parse(U), s = p.AES.decrypt(e, t, { mode: p.mode.ECB, padding: p.pad.Pkcs7 });
|
|
179
|
+
return p.enc.Utf8.stringify(s).toString();
|
|
180
|
+
}, Oe = (e) => {
|
|
181
|
+
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
182
|
+
let s = "";
|
|
183
|
+
for (let r = 0; r < e; r++) {
|
|
184
|
+
const o = Math.floor(Math.random() * t.length);
|
|
185
|
+
s += t.substring(o, o + 1);
|
|
186
|
+
}
|
|
187
|
+
return s;
|
|
188
|
+
}, { t: c } = P(), { alert: m } = de(), l = ee(), G = te(), fe = "https://api.example.com", ge = void 0, y = {
|
|
189
|
+
200: c("http.responseDataSuccess"),
|
|
190
|
+
201: c("http.dataOpSuccess"),
|
|
191
|
+
202: c("http.requestBackground"),
|
|
192
|
+
204: c("http.dataDelSuccess"),
|
|
193
|
+
400: c("http.responseError"),
|
|
194
|
+
401: c("http.noPerm"),
|
|
195
|
+
403: c("http.authorizedUserForbidden"),
|
|
196
|
+
404: c("http.targetRequestError"),
|
|
197
|
+
406: c("http.requestFormatError"),
|
|
198
|
+
410: c("http.resourceDel"),
|
|
199
|
+
422: c("http.createObjError"),
|
|
200
|
+
500: c("http.serverError"),
|
|
201
|
+
502: c("http.gatewayError"),
|
|
202
|
+
503: c("http.serviceError"),
|
|
203
|
+
504: c("http.gatewayTimeOut"),
|
|
204
|
+
default: c("http.networkLinkError")
|
|
205
|
+
}, he = [23001, 23002, 23003, 23007, 23008, 1999], ye = () => {
|
|
206
|
+
var e, t, s;
|
|
207
|
+
return {
|
|
208
|
+
Authorization: l.getToken,
|
|
209
|
+
AuthorizationRefresh: l.getRefreshToken,
|
|
210
|
+
useraccount: l.getLoginAccount,
|
|
211
|
+
userid: l.getUserId,
|
|
212
|
+
deptid: ((e = l.getUserInfo) == null ? void 0 : e.deptid) || -1,
|
|
213
|
+
oemcid: ((t = l.getUserInfo) == null ? void 0 : t.oemcid) || 1,
|
|
214
|
+
comid: ((s = l.getUserInfo) == null ? void 0 : s.comid) || 1,
|
|
215
|
+
loginuuid: l.getLoginUuid,
|
|
216
|
+
language: l.getLanguage,
|
|
217
|
+
userAgent: "PC"
|
|
218
|
+
};
|
|
219
|
+
}, A = (e) => {
|
|
220
|
+
const { response: t = {} } = e;
|
|
221
|
+
let s = 0;
|
|
222
|
+
try {
|
|
223
|
+
s = t.status;
|
|
224
|
+
} catch (r) {
|
|
225
|
+
if (console.error(r), e.toString().indexOf("TypeError:") !== -1)
|
|
226
|
+
return m(c("http.reqParamError"), "error"), Promise.reject(e);
|
|
227
|
+
if (e.toString().indexOf("Error: timeout") !== -1)
|
|
228
|
+
return m(`${c("http.networkTimeout")} ${t.status || ""}`, "error"), Promise.reject(e);
|
|
229
|
+
if (e.toString().indexOf("Error: Network Error") !== -1)
|
|
230
|
+
return m(`${c("http.networkError")} ${t.status || ""}`, "error"), Promise.reject(e);
|
|
231
|
+
}
|
|
232
|
+
if (t.data && t.data.status === "fail") {
|
|
233
|
+
let r = "";
|
|
234
|
+
t.status !== 400 && (r = y[s]), m(`[${t.data.code || "[]"}] - ${r || t.data.message}`, "warning");
|
|
235
|
+
} else if (s) {
|
|
236
|
+
const r = y[s] || t.statusText || y.default;
|
|
237
|
+
switch (s) {
|
|
238
|
+
case 401:
|
|
239
|
+
m(`[${s || "[]"}] - ${r}`, "error");
|
|
240
|
+
break;
|
|
241
|
+
case 403:
|
|
242
|
+
G.push({ path: "/401" });
|
|
243
|
+
break;
|
|
244
|
+
default:
|
|
245
|
+
m(`[${s || "[]"}] - ${r}`, "error");
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
} else m(`${c("http.noResponse")} ${t.status || ""}`, "error");
|
|
249
|
+
return Promise.reject(e);
|
|
250
|
+
}, L = Y.create({
|
|
251
|
+
baseURL: process.env.NODE_ENV === "production" ? "" : fe,
|
|
252
|
+
// api 的 base_url
|
|
253
|
+
timeout: ge,
|
|
254
|
+
// 请求超时时间
|
|
255
|
+
withCredentials: !1
|
|
256
|
+
// paramsSerializer: params => {
|
|
257
|
+
// // 序列化 GET 请求参数 -> a: [1, 2] => a=1&a=2
|
|
258
|
+
// return qs.stringify(params, { arrayFormat: 'repeat' });
|
|
259
|
+
// }
|
|
260
|
+
});
|
|
261
|
+
L.interceptors.request.use((e) => (e.headers = Object.assign(e.headers, ye()), e.method === "post" && typeof e.data != "object" && (e.headers.post["Content-Type"] = "application/json"), e.params = _(C({}, e.params || {}), {
|
|
262
|
+
_t: +(/* @__PURE__ */ new Date()).getTime()
|
|
263
|
+
}), e), A);
|
|
264
|
+
L.interceptors.response.use((e) => {
|
|
265
|
+
const { headers: t, data: s, statusText: r, status: o } = e, { datas: n } = s;
|
|
266
|
+
let a;
|
|
267
|
+
const u = t.newtoken;
|
|
268
|
+
if (u && l.setRefreshToken(u), o !== 200) {
|
|
269
|
+
if (he.includes(n.code)) {
|
|
270
|
+
try {
|
|
271
|
+
a = JSON.parse(n.message);
|
|
272
|
+
} catch (i) {
|
|
273
|
+
console.error(i), a = { error: n.message };
|
|
274
|
+
}
|
|
275
|
+
n.code === 23003 && (a = c("http.loginAgain"), G.push({ path: "/" })), a && m(a, "error");
|
|
276
|
+
} else {
|
|
277
|
+
const i = n.code;
|
|
278
|
+
switch (a = y[i] || r || y.default, i) {
|
|
279
|
+
case 401:
|
|
280
|
+
break;
|
|
281
|
+
case 403:
|
|
282
|
+
break;
|
|
283
|
+
default:
|
|
284
|
+
m(`${a} - ${o || ""}`, "error");
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return Promise.reject(new Error(a));
|
|
289
|
+
} else
|
|
290
|
+
return s.status === "fail" ? (m(`${s.code || "unknow"} - ${s.message || ""}`, "error"), Promise.reject(new Error(s.message))) : s instanceof Blob ? { headers: t, data: s } : e.data;
|
|
291
|
+
}, A);
|
|
292
|
+
const Pe = () => ({
|
|
293
|
+
fetchData: (t, s) => f(void 0, null, function* () {
|
|
294
|
+
return yield t(s);
|
|
295
|
+
})
|
|
296
|
+
}), ve = [re, ie], S = (e) => {
|
|
297
|
+
S.INSTALLED || (S.INSTALLED = !0, ve.forEach((t) => t.install(e)));
|
|
298
|
+
}, je = {
|
|
299
|
+
install: S
|
|
300
|
+
};
|
|
301
|
+
export {
|
|
302
|
+
re as GvButton,
|
|
303
|
+
ie as GvSvgIcon,
|
|
304
|
+
Ie as decrypt,
|
|
305
|
+
je as default,
|
|
306
|
+
xe as encrypt,
|
|
307
|
+
Oe as generateKey,
|
|
308
|
+
oe as isExternal,
|
|
309
|
+
U as key,
|
|
310
|
+
ye as setHeaders,
|
|
311
|
+
x as sleep,
|
|
312
|
+
Be as toHump,
|
|
313
|
+
Ne as toLine,
|
|
314
|
+
Pe as useCrud,
|
|
315
|
+
de as useNotify
|
|
316
|
+
};
|
|
317
|
+
//# sourceMappingURL=guava-ui.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guava-ui.es.js","sources":["../packages/GvButton/GvButton.vue","../packages/GvButton/index.ts","../packages/utils/index.ts","../packages/GvSvgIcon/GvSvgIcon.vue","../packages/GvSvgIcon/index.ts","../packages/hooks/web/useNotify.ts","../packages/utils/gv.secret.ts","../packages/GvAxios/index.ts","../packages/hooks/service/useCrud.ts","../packages/index.ts"],"sourcesContent":["<!--\n * @title: GvButton组件,基于el-button封装\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-02-27 17:07:51\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-07 12:05:21\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu \n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n-->\n\n<script lang=\"tsx\">\n import { defineComponent, computed, watch } from 'vue';\n import { ElButton } from 'element-plus';\n export default defineComponent({\n name: 'GvButton',\n // --- pass params between parent-child ---\n props: {\n message: {\n type: String,\n default: 'GvButton',\n request: false,\n },\n },\n // --- register components ---\n components: {},\n // --- pass events between parent-child ---\n emits: ['click', 'submit'],\n\n setup(props, { emit, slots }) {\n // --- define computed ---\n // get default slot, Note: check if the slot is empty\n const getSlots = computed(() => slots.default?.());\n\n // --- listen data ---\n watch(\n () => props.message,\n (newVal) => {\n console.log('GvButton:' + newVal);\n },\n );\n\n // --- define Methods ---\n const handleClick = (event: MouseEvent, msg: string): void => {\n alert('this is a child event');\n emit('click', event, msg);\n };\n\n // render jsx\n return (): any => (\n <ElButton\n class=\"gv-button\"\n onClick={(event) => handleClick(event, props.message)}>\n {getSlots.value ?? props.message}\n </ElButton>\n );\n },\n });\n</script>\n\n<style lang=\"scss\" scoped>\n .gv-button {\n &:hover {\n color: red;\n }\n }\n</style>\n","import type { App } from 'vue';\nimport GvButton from './GvButton.vue';\n// Define the install method on the GvButton component\nconst GvButtonPlugin = {\n install(app: App): void {\n app.component(GvButton.name ?? 'GvButton', GvButton);\n },\n};\nexport default GvButtonPlugin;\nexport { GvButton };\n","/*\n * @title: common utility func\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-02-27 13:25:29\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 15:22:31\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\n\n/**\n * @todo: if external url\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2022-04-05 10:34:51\n * @param {*} path\n */\nexport const isExternal = (path: string): boolean => /^(https?:|mailto:|tel:)/.test(path);\n\n/**\n * @todo: sleep async function\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 12:01:37\n * @param {*} timeLen\n */\nexport const sleep = async (timeLen: number) => new Promise((resolve) => setTimeout(resolve, timeLen));\n\n/**\n * @todo: 下划线转换驼峰\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2022-04-06 13:53:06\n * @param {*} name\n */\n/**\n * @todo: underline to camel case\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 15:21:09\n * @param {*} name\n */\nexport const toHump = (name: string): string => {\n if (!name) return '';\n // eslint-disable-next-line no-useless-escape\n return name.replace(/\\_(\\w)/g, function (all, letter) {\n return letter.toUpperCase();\n });\n};\n\n/**\n * @todo: camel case to underline\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 15:21:50\n * @param {*} name\n */\nexport const toLine = (name: string): string => name.replace(/([A-Z])/g, '_$1').toLowerCase();\n","<!--\n * @title: svg icon component\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-01 17:02:13\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 16:25:52\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu \n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n-->\n<script setup lang=\"ts\">\n import { computed, useAttrs } from 'vue';\n import { isExternal } from '@@/utils';\n import { useStyle } from '@/hook/web/useStyle';\n const { variables } = useStyle();\n const preNameSpace = variables.namespace;\n const attrs = useAttrs();\n // --- define name and inheritAttrs ---\n defineOptions({\n name: 'GvSvgIcon', // 定义组件名称\n inheritAttrs: false, // 默认继承属性\n });\n // --- transfer props and define default values ---\n const props = withDefaults(\n defineProps<{\n iconType?: string;\n iconClass: string;\n className?: string;\n size?: string; // 图标的font-size,单位是px\n }>(),\n {\n iconType: 'svg', // svg | iconfont\n className: '',\n },\n );\n const isLocal = computed(() => isExternal(props.iconClass));\n const iconName = computed(() => {\n if (props.iconType === 'svg') return `#${preNameSpace}-icon-${props.iconClass}`;\n else return `#${props.iconClass}`;\n });\n const svgClass = computed(() => {\n if (props.className) return 'svg-icon ' + props.className;\n else return 'svg-icon';\n });\n const styleExternalIcon = computed(() => ({\n mask: `url(${props.iconClass}) no-repeat 50% 50%`,\n '-webkit-mask': `url(${props.iconClass}) no-repeat 50% 50%`,\n }));\n</script>\n<template>\n <div\n v-if=\"isLocal\"\n :style=\"styleExternalIcon\"\n class=\"svg-external-icon svg-icon\"\n v-bind=\"attrs\"></div>\n <svg\n v-else-if=\"iconType === 'svg'\"\n :class=\"svgClass\"\n aria-hidden=\"true\"\n v-bind=\"attrs\">\n <use :href=\"iconName\" />\n </svg>\n <svg\n v-else\n :class=\"svgClass\"\n :style=\"{ 'font-size': size + 'px' }\"\n aria-hidden=\"true\"\n v-bind=\"attrs\">\n <use :xlink:href=\"iconName\" />\n </svg>\n</template>\n\n<style lang=\"scss\" scoped>\n .svg-icon {\n width: 1em;\n height: 1em;\n overflow: hidden;\n vertical-align: -0.15em;\n fill: currentcolor;\n }\n\n .svg-external-icon {\n display: inline-block;\n background-color: currentcolor;\n mask-size: cover !important;\n }\n</style>\n","import type { App } from 'vue';\nimport GvSvgIcon from './GvSvgIcon.vue';\n// Define the install method on the GvButton component\nconst GvSvgIconPlugin = {\n install(app: App): void {\n app.component(GvSvgIcon.name ?? 'GvSvgIcon', GvSvgIcon);\n },\n};\nexport default GvSvgIconPlugin;\n","/*\n * @title: message alert confirm\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 11:47:30\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 15:27:25\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\n\nimport { ElMessageBox, ElNotification, ElMessage } from 'element-plus';\nimport { sleep } from '@@/utils';\nimport { useI18n } from '@/hook/web/useI18n';\nconst { t } = useI18n();\n\nconst notificationTime = 5000;\nconst notificationTimeError = 6000;\nconst messageTime = 2000;\nconst messageTimeError = 5000;\n\ninterface ConfirmOptions {\n title?: string;\n message: string;\n confirmButtonText?: string;\n cancelButtonText?: string;\n type?: 'success' | 'warning' | 'info' | 'error';\n showCancelButton?: boolean;\n}\nexport const useNotify = () => {\n /**\n * @todo: Notification - MessageBox\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 13:48:24\n * @param {string} msg\n * @param {MessageType} type\n * @param {string} title\n */\n const alert = async (msg: string = 'No message...', type: MessageType = 'success') => {\n const alertObj = document.body.querySelector('body>.el-notification');\n if (alertObj) alertObj.remove();\n\n const promptMsg = t('common.promptMsg');\n const duration = type === 'error' ? notificationTimeError : notificationTime;\n\n ElNotification({\n title: promptMsg,\n message: msg,\n type,\n duration: duration,\n });\n await sleep(duration);\n };\n /**\n * @todo: confirm - MessageBox\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 12:03:27\n * @param {*} msg\n * @param {*} type\n */\n const confirm = async (msg: string, type: MessageType = 'warning') => {\n if (document.body.querySelector('body>.el-confirm')) return;\n // 返回 Promise 对象\n let msgs: string;\n const showCancelButton = true;\n\n if (msg) msgs = msg;\n else msgs = t('common.confirmMsg');\n const hint = t('common.confirmHint');\n const ok = t('common.confirmOk');\n const cancel = t('common.confirmCancel');\n\n return new Promise((resolve, reject) => {\n ElMessageBox.confirm(msgs, hint, {\n confirmButtonText: ok,\n cancelButtonText: cancel,\n type,\n showCancelButton,\n } as ConfirmOptions)\n .then(() => {\n resolve(true);\n })\n .catch(() => {\n reject(false);\n });\n });\n };\n\n const message = async (msg: string = 'No message...', type: MessageType = 'warning', tableedit: boolean = false) => {\n if (tableedit === false) {\n const messageObj = document.body.querySelector('body>.el-message');\n // if (messageObj) messageObj.style.display = 'none';\n if (messageObj) return;\n const notifyObj = document.body.querySelector('body>.el-notification');\n if (notifyObj) return;\n }\n\n const duration = type === 'error' ? messageTimeError : messageTime;\n ElMessage({\n message: msg,\n showClose: true,\n type,\n duration: duration,\n });\n await sleep(duration);\n };\n return {\n alert,\n confirm,\n message,\n };\n};\n","/*\r\n * @title: encrypt\r\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\r\n * @Date: 2023-12-16 08:07:24\r\n * @LastEditors: andy.ten@tom.com\r\n * @LastEditTime: 2025-04-07 13:54:00\r\n * @version: 1.0.1\r\n * @copyright: copyright (c) 2025 Andy Xu\r\n * node: you can not copy and/or use and/or modify this program free,\r\n * please reserve the segment above.Please mail me if you have any question.\r\n */\r\n\r\nimport CryptoJS from 'crypto-js';\r\nexport const key = 'abcdefgabcdefg12';\r\nexport const encrypt = (word: any): string => {\r\n const keyStr = CryptoJS.enc.Utf8.parse(key);\r\n let ww;\r\n if (typeof word === 'object') ww = JSON.stringify(word);\r\n else ww = word;\r\n const srcs = CryptoJS.enc.Utf8.parse(ww);\r\n const encrypted = CryptoJS.AES.encrypt(srcs, keyStr, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });\r\n return encrypted.toString();\r\n};\r\nexport const decrypt = (word: string): any => {\r\n const keyStr = CryptoJS.enc.Utf8.parse(key);\r\n const decrypt = CryptoJS.AES.decrypt(word, keyStr, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });\r\n return CryptoJS.enc.Utf8.stringify(decrypt).toString();\r\n};\r\n// Randomly generate a specified number of hexadecimal keys\r\nexport const generateKey = (num: number): string => {\r\n const library = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n let key = '';\r\n for (let i = 0; i < num; i++) {\r\n const randomPoz = Math.floor(Math.random() * library.length);\r\n key += library.substring(randomPoz, randomPoz + 1);\r\n }\r\n return key;\r\n};\r\n","/*\n * @title: axios request\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 11:44:12\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 17:38:35\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\n\nimport axios from 'axios';\nimport { useI18n } from '@/hook/web/useI18n';\nimport { useUserStore } from '@/store/modules/user';\nimport { useNotify } from '@@/hooks/web/useNotify';\nimport { useRouter } from 'vue-router';\nimport { encrypt } from '@@/utils/gv.secret';\nconst { t } = useI18n();\nconst { alert } = useNotify();\nconst userStore = useUserStore();\nconst router = useRouter();\nconst appUrl = import.meta.env.VITE_API_URL;\nconst requestTimeout = import.meta.env.VITE_APP_REQUEST_TIMEOUT;\nconst paramEncryp = import.meta.env.VITE_REQUEST_PARAM_ENCRYP;\n// 定义 http status code\nconst codeMessage = {\n 200: t('http.responseDataSuccess'),\n 201: t('http.dataOpSuccess'),\n 202: t('http.requestBackground'),\n 204: t('http.dataDelSuccess'),\n 400: t('http.responseError'),\n 401: t('http.noPerm'),\n 403: t('http.authorizedUserForbidden'),\n 404: t('http.targetRequestError'),\n 406: t('http.requestFormatError'),\n 410: t('http.resourceDel'),\n 422: t('http.createObjError'),\n 500: t('http.serverError'),\n 502: t('http.gatewayError'),\n 503: t('http.serviceError'),\n 504: t('http.gatewayTimeOut'),\n default: t('http.networkLinkError'),\n};\n\n// 定义 gateway response status\nconst gatewayCodes = [23001, 23002, 23003, 23007, 23008, 1999];\n\n/**\n * @todo: 设置请求header头部信息\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2022-03-22 20:27:44\n */\nconst setHeaders = () => ({\n Authorization: userStore.getToken,\n AuthorizationRefresh: userStore.getRefreshToken,\n useraccount: userStore.getLoginAccount,\n userid: userStore.getUserId,\n deptid: userStore.getUserInfo?.deptid || -1,\n oemcid: userStore.getUserInfo?.oemcid || 1,\n comid: userStore.getUserInfo?.comid || 1,\n loginuuid: userStore.getLoginUuid,\n language: userStore.getLanguage,\n userAgent: 'PC',\n});\n/**\n * @todo: 请求异常处理\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2022-03-22 22:01:02\n * @param {*} error\n */\nconst errorHandler = (error) => {\n const { response = {} } = error;\n let status = 0;\n try {\n status = response.status;\n } catch (e) {\n console.error(e);\n if (error.toString().indexOf('TypeError:') !== -1) {\n alert(t('http.reqParamError'), 'error');\n return Promise.reject(error);\n }\n if (error.toString().indexOf('Error: timeout') !== -1) {\n alert(`${t('http.networkTimeout')} ${response.status || ''}`, 'error');\n return Promise.reject(error);\n }\n\n if (error.toString().indexOf('Error: Network Error') !== -1) {\n alert(`${t('http.networkError')} ${response.status || ''}`, 'error');\n return Promise.reject(error);\n }\n }\n // bizException 自定义异常\n if (response.data && response.data.status === 'fail') {\n let errorMsg = '';\n if (response.status !== 400) errorMsg = codeMessage[status];\n alert(`[${response.data.code || '[]'}] - ${errorMsg || response.data.message}`, 'warning');\n } else if (status) {\n const errorMsg = codeMessage[status] || response.statusText || codeMessage['default'];\n switch (status) {\n case 401:\n alert(`[${status || '[]'}] - ${errorMsg}`, 'error');\n break;\n case 403:\n router.push({ path: '/401' });\n break;\n default:\n alert(`[${status || '[]'}] - ${errorMsg}`, 'error');\n break;\n }\n } else alert(`${t('http.noResponse')} ${response.status || ''}`, 'error');\n\n // 设置loading block\n // store.dispatch('app/clearBtnLoading');\n return Promise.reject(error);\n};\n\n// 全局axios默认配置\n// axios.defaults.baseURL = 'https://api.example.com';\n// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;\n// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';\n\n// 创建axios实例\nconst service = axios.create({\n baseURL: process.env.NODE_ENV === 'production' ? '' : appUrl, // api 的 base_url\n timeout: requestTimeout, // 请求超时时间\n withCredentials: false,\n // paramsSerializer: params => {\n // // 序列化 GET 请求参数 -> a: [1, 2] => a=1&a=2\n // return qs.stringify(params, { arrayFormat: 'repeat' });\n // }\n});\n\n// request拦截器\nservice.interceptors.request.use((config) => {\n // 设置请求头部信息\n config.headers = Object.assign(config.headers, setHeaders());\n // 处理 POST 请求,参数是字符串,修正请求头 Content-Type 类型\n // 默认为:application/x-www-form-urlencoded\n if (config.method === 'post' && typeof config.data !== 'object') config.headers.post['Content-Type'] = 'application/json';\n\n // config.headers['Content-Type'] = 'application/json';\n\n // 设置loading block\n // if (config.mark) {\n // store.dispatch('app/createBtnLoading', { [config.mark]: true });\n // }\n\n // 生产环境请求参数加密\n if (paramEncryp === true)\n if (\n (config.url?.indexOf('loginAuth') ?? -1) === -1 &&\n (config.url?.indexOf('loginMenu') ?? -1) === -1 &&\n (config.url?.indexOf('sysmessage') ?? -1) === -1 &&\n (config.url?.indexOf('sysdict') ?? -1) === -1 &&\n (config.url?.indexOf('sysattach') ?? -1) === -1\n ) {\n config.data = { param: encrypt(config.data) };\n config.headers['aes'] = '1';\n }\n // console.log(config.data);\n\n // 兼容 IE 缓存,增加随机数参数\n config.params = {\n ...(config.params || {}),\n _t: +new Date().getTime(),\n };\n\n return config;\n}, errorHandler);\n\n// response 拦截器\nservice.interceptors.response.use((response) => {\n const { headers, data, statusText, status } = response;\n const { datas } = data;\n let errMsg2;\n // store.dispatch('app/clearBtnLoading');\n const newToken = headers.newtoken;\n if (newToken) userStore.setRefreshToken(newToken);\n\n if (status !== 200) {\n // 处理网关的响应\n if (gatewayCodes.includes(datas.code)) {\n try {\n errMsg2 = JSON.parse(datas.message);\n } catch (e) {\n console.error(e);\n errMsg2 = { error: datas.message };\n }\n //\n if (datas.code === 23003) {\n errMsg2 = t('http.loginAgain');\n // store.dispatch('app/createLogout');\n router.push({ path: '/' });\n }\n errMsg2 && alert(errMsg2, 'error');\n } else {\n const code = datas.code;\n errMsg2 = codeMessage[code] || statusText || codeMessage['default'];\n switch (code) {\n case 401:\n // store.dispatch('LogOut').then(() => {\n // // 用户登录界面提示\n // //Cookies.set('point', 401)\n // location.reload()\n // })\n break;\n case 403:\n // router.push({ path: '/401' })\n break;\n default:\n alert(`${errMsg2} - ${status || ''}`, 'error');\n break;\n }\n }\n return Promise.reject(new Error(errMsg2));\n } else {\n // console.log(headers);\n if (data.status === 'fail') {\n // 成功 但是返回错误信息\n alert(`${data.code || 'unknow'} - ${data.message || ''}`, 'error');\n return Promise.reject(new Error(data.message));\n }\n // 兼容blob下载出错json提示\n if (data instanceof Blob)\n // const reader = new FileReader();\n // reader.readAsText(data, 'utf-8');\n // reader.onload = function(e) {\n // const errorMsg = JSON.parse(reader.result).message;\n // Notify.alert(errorMsg, 'error');\n // };\n return { headers, data };\n else return response.data;\n }\n}, errorHandler);\n\nexport { setHeaders };\nexport default service;\n","/*\n * @title: CRUD hook\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 15:25:08\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 16:07:59\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\n\nexport const useCrud = () => {\n /**\n * @todo: request data\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 15:39:44\n * @param {*} fetch\n * @param {*} datas\n */\n const fetchData = async <T = any>(fetch, params): Promise<IResponse<T>> => (await fetch(params)) as IResponse<T>;\n\n return {\n fetchData,\n };\n};\n","/*\n * @title: package lib entry\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2024-11-28 18:18:44\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 17:30:38\n * @version: 1.0.1\n * @copyright: copyright (c) 2024 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\nimport type { App } from 'vue';\nimport GvButton from './GvButton';\nimport GvSvgIcon from './GvSvgIcon';\n\nconst components = [GvButton, GvSvgIcon];\n\n// 定义 install 方法, App 作为参数\nconst install = (app: App): void => {\n if (install['INSTALLED']) return;\n install['INSTALLED'] = true;\n // 遍历注册所有组件\n components.forEach((component) => component.install(app));\n};\n\nconst GuavaUI = {\n install,\n};\n\nexport default GuavaUI;\n\n// 按需加载\nexport { GvButton };\nexport { GvSvgIcon };\n\nexport * from './GvAxios/index';\n// hooks\nexport * from './hooks/service/useCrud';\nexport * from './hooks/web/useNotify';\nexport * from './utils/gv.secret';\nexport * from './utils/index';\n"],"names":["defineComponent","name","props","message","type","String","default","request","components","emits","setup","emit","slots","getSlots","computed","watch","newVal","console","log","handleClick","event","msg","alert","_createVNode","ElButton","value","_export_sfc","sfc","GvButtonPlugin","app","_a","GvButton","isExternal","path","sleep","timeLen","__async","resolve","toHump","all","letter","toLine","variables","useStyle","preNameSpace","attrs","useAttrs","__props","isLocal","iconName","svgClass","styleExternalIcon","GvSvgIconPlugin","GvSvgIcon","t","useI18n","notificationTime","notificationTimeError","messageTime","messageTimeError","useNotify","alertObj","promptMsg","duration","ElNotification","msgs","showCancelButton","hint","ok","cancel","reject","ElMessageBox","tableedit","ElMessage","key","encrypt","word","keyStr","CryptoJS","ww","srcs","decrypt","generateKey","num","library","i","randomPoz","userStore","useUserStore","router","useRouter","appUrl","requestTimeout","codeMessage","gatewayCodes","setHeaders","_b","_c","errorHandler","error","response","status","e","errorMsg","service","axios","config","__spreadProps","__spreadValues","headers","data","statusText","datas","errMsg2","newToken","code","useCrud","fetch","params","install","component","GuavaUI"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeE,MAAeA,uBAAgB;AAAA,EAC7BC,MAAM;AAAA;AAAA,EAENC,OAAO;AAAA,IACLC,SAAS;AAAA,MACPC,MAAMC;AAAAA,MACNC,SAAS;AAAA,MACTC,SAAS;AAAA,IACX;AAAA,EACD;AAAA;AAAA,EAEDC,YAAY,CAAE;AAAA;AAAA,EAEdC,OAAO,CAAC,SAAS,QAAQ;AAAA,EAEzBC,MAAMR,GAAO;AAAA,IAAES,MAAAA;AAAAA,IAAMC,OAAAA;AAAAA,EAAM,GAAG;AAG5B,UAAMC,IAAWC,EAAS;;AAAMF,cAAAA,IAAAA,EAAMN,YAANM,gBAAAA,EAAAA,KAAAA;AAAAA,KAAiB;AAGjDG,IAAAA,EACE,MAAMb,EAAMC,SACXa,CAAAA,MAAW;AACVC,cAAQC,IAAI,cAAcF,CAAM;AAAA,IAClC,CACF;AAGA,UAAMG,IAAcA,CAACC,GAAmBC,MAAsB;AAC5DC,YAAM,uBAAuB,GAC7BX,EAAK,SAASS,GAAOC,C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,EAAE,MAAM,IAAA,CAAK,IAEhBwB,KAAA3F,EAAM2F,GAAS,OAAO;AAAA,IAAA,OAC5B;AACL,YAAME,IAAOH,EAAM;AAEnB,cADAC,IAAUpB,EAAYsB,CAAI,KAAKJ,KAAclB,EAAY,SACjDsB,GAAM;AAAA,QACZ,KAAK;AAMH;AAAA,QACF,KAAK;AAEH;AAAA,QACF;AACE7F,UAAAA,EAAM,GAAG2F,CAAO,MAAMZ,KAAU,EAAE,IAAI,OAAO;AAC7C;AAAA,MAAA;AAAA,IACJ;AAEF,WAAO,QAAQ,OAAO,IAAI,MAAMY,CAAO,CAAC;AAAA,EAAA;AAGpC,WAAAH,EAAK,WAAW,UAEZxF,EAAA,GAAGwF,EAAK,QAAQ,QAAQ,MAAMA,EAAK,WAAW,EAAE,IAAI,OAAO,GAC1D,QAAQ,OAAO,IAAI,MAAMA,EAAK,OAAO,CAAC,KAG3CA,aAAgB,OAOX,EAAE,SAAAD,GAAS,MAAAC,EAAK,IACbV,EAAS;AAEzB,GAAGF,CAAY;AC9NR,MAAMkB,KAAU,OAUd;AAAA,EACL,WAHgB,CAAgBC,GAAOC,MAAmClF,EAAA;AAAA,iBAAMiF,EAAMC,CAAM;AAAA;AAI9F,ICTI9G,KAAa,CAACuB,IAAUsB,EAAS,GAGjCkE,IAAU,CAAC1F,MAAmB;AAC9B,EAAA0F,EAAQ,cACZA,EAAQ,YAAe,IAEvB/G,GAAW,QAAQ,CAACgH,MAAcA,EAAU,QAAQ3F,CAAG,CAAC;AAC1D,GAEM4F,KAAU;AAAA,EACd,SAAAF;AACF;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(function(r,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("element-plus"),require("@/hook/web/useStyle"),require("axios"),require("@/hook/web/useI18n"),require("@/store/modules/user"),require("vue-router"),require("crypto-js")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","@/hook/web/useStyle","axios","@/hook/web/useI18n","@/store/modules/user","vue-router","crypto-js"],t):(r=typeof globalThis!="undefined"?globalThis:r||self,t(r["guava-ui"]={},r.Vue,r.ElementPlus,r.useStyle,r.axios,r.useI18n,r.user,r.VueRouter,r.CryptoJS))})(this,function(r,t,u,S,E,w,T,k,d){"use strict";var le=Object.defineProperty,de=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var z=Object.getOwnPropertySymbols;var pe=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var D=(r,t,u)=>t in r?le(r,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):r[t]=u,R=(r,t)=>{for(var u in t||(t={}))pe.call(t,u)&&D(r,u,t[u]);if(z)for(var u of z(t))fe.call(t,u)&&D(r,u,t[u]);return r},H=(r,t)=>de(r,me(t));var y=(r,t,u)=>new Promise((S,E)=>{var w=d=>{try{k(u.next(d))}catch(h){E(h)}},T=d=>{try{k(u.throw(d))}catch(h){E(h)}},k=d=>d.done?S(d.value):Promise.resolve(d.value).then(w,T);k((u=u.apply(r,t)).next())});var h=document.createElement("style");h.textContent=`[data-v-67cee13e]:export{namespace:gv;elNamespace:el;zIndex:1000}.gv-button[data-v-67cee13e]:hover{color:red}[data-v-b1560990]:export{namespace:gv;elNamespace:el;zIndex:1000}.svg-icon[data-v-b1560990]{width:1em;height:1em;overflow:hidden;vertical-align:-.15em;fill:currentcolor}.svg-external-icon[data-v-b1560990]{display:inline-block;background-color:currentcolor;-webkit-mask-size:cover!important;mask-size:cover!important}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(h);const V=t.defineComponent({name:"GvButton",props:{message:{type:String,default:"GvButton",request:!1}},components:{},emits:["click","submit"],setup(e,{emit:s,slots:o}){const n=t.computed(()=>{var a;return(a=o.default)==null?void 0:a.call(o)});t.watch(()=>e.message,a=>{console.log("GvButton:"+a)});const c=(a,l)=>{alert("this is a child event"),s("click",a,l)};return()=>t.createVNode(u.ElButton,{class:"gv-button",onClick:a=>c(a,e.message)},{default:()=>{var a;return[(a=n.value)!=null?a:e.message]}})}}),N=(e,s)=>{const o=e.__vccOpts||e;for(const[n,c]of s)o[n]=c;return o},j=N(V,[["__scopeId","data-v-67cee13e"]]),q={install(e){var s;e.component((s=j.name)!=null?s:"GvButton",j)}},C=e=>/^(https?:|mailto:|tel:)/.test(e),$=e=>y(this,null,function*(){return new Promise(s=>setTimeout(s,e))}),F=e=>e?e.replace(/\_(\w)/g,function(s,o){return o.toUpperCase()}):"",K=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Z=["href"],Q=["xlink:href"],O=N(t.defineComponent({name:"GvSvgIcon",inheritAttrs:!1,__name:"GvSvgIcon",props:{iconType:{default:"svg"},iconClass:{},className:{default:""},size:{}},setup(e){const{variables:s}=S.useStyle(),o=s.namespace,n=t.useAttrs(),c=e,a=t.computed(()=>C(c.iconClass)),l=t.computed(()=>c.iconType==="svg"?`#${o}-icon-${c.iconClass}`:`#${c.iconClass}`),m=t.computed(()=>c.className?"svg-icon "+c.className:"svg-icon"),g=t.computed(()=>({mask:`url(${c.iconClass}) no-repeat 50% 50%`,"-webkit-mask":`url(${c.iconClass}) no-repeat 50% 50%`}));return(_,A)=>a.value?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0,style:g.value,class:"svg-external-icon svg-icon"},t.unref(n)),null,16)):_.iconType==="svg"?(t.openBlock(),t.createElementBlock("svg",t.mergeProps({key:1,class:m.value,"aria-hidden":"true"},t.unref(n)),[t.createElementVNode("use",{href:l.value},null,8,Z)],16)):(t.openBlock(),t.createElementBlock("svg",t.mergeProps({key:2,class:m.value,style:{"font-size":_.size+"px"},"aria-hidden":"true"},t.unref(n)),[t.createElementVNode("use",{"xlink:href":l.value},null,8,Q)],16))}}),[["__scopeId","data-v-b1560990"]]),P={install(e){var s;e.component((s=O.name)!=null?s:"GvSvgIcon",O)}},{t:v}=w.useI18n(),W=5e3,X=6e3,Y=2e3,J=5e3,U=()=>({alert:(n="No message...",c="success")=>y(this,null,function*(){const a=document.body.querySelector("body>.el-notification");a&&a.remove();const l=v("common.promptMsg"),m=c==="error"?X:W;u.ElNotification({title:l,message:n,type:c,duration:m}),yield $(m)}),confirm:(n,c="warning")=>y(this,null,function*(){if(document.body.querySelector("body>.el-confirm"))return;let a;const l=!0;n?a=n:a=v("common.confirmMsg");const m=v("common.confirmHint"),g=v("common.confirmOk"),_=v("common.confirmCancel");return new Promise((A,ue)=>{u.ElMessageBox.confirm(a,m,{confirmButtonText:g,cancelButtonText:_,type:c,showCancelButton:l}).then(()=>{A(!0)}).catch(()=>{ue(!1)})})}),message:(n="No message...",c="warning",a=!1)=>y(this,null,function*(){if(a===!1&&(document.body.querySelector("body>.el-message")||document.body.querySelector("body>.el-notification")))return;const l=c==="error"?J:Y;u.ElMessage({message:n,showClose:!0,type:c,duration:l}),yield $(l)})}),B="abcdefgabcdefg12",ee=e=>{const s=d.enc.Utf8.parse(B);let o;typeof e=="object"?o=JSON.stringify(e):o=e;const n=d.enc.Utf8.parse(o);return d.AES.encrypt(n,s,{mode:d.mode.ECB,padding:d.pad.Pkcs7}).toString()},te=e=>{const s=d.enc.Utf8.parse(B),o=d.AES.decrypt(e,s,{mode:d.mode.ECB,padding:d.pad.Pkcs7});return d.enc.Utf8.stringify(o).toString()},se=e=>{const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let o="";for(let n=0;n<e;n++){const c=Math.floor(Math.random()*s.length);o+=s.substring(c,c+1)}return o},{t:i}=w.useI18n(),{alert:p}=U(),f=T.useUserStore(),x=k.useRouter(),oe="https://api.example.com",re=void 0,b={200:i("http.responseDataSuccess"),201:i("http.dataOpSuccess"),202:i("http.requestBackground"),204:i("http.dataDelSuccess"),400:i("http.responseError"),401:i("http.noPerm"),403:i("http.authorizedUserForbidden"),404:i("http.targetRequestError"),406:i("http.requestFormatError"),410:i("http.resourceDel"),422:i("http.createObjError"),500:i("http.serverError"),502:i("http.gatewayError"),503:i("http.serviceError"),504:i("http.gatewayTimeOut"),default:i("http.networkLinkError")},ne=[23001,23002,23003,23007,23008,1999],G=()=>{var e,s,o;return{Authorization:f.getToken,AuthorizationRefresh:f.getRefreshToken,useraccount:f.getLoginAccount,userid:f.getUserId,deptid:((e=f.getUserInfo)==null?void 0:e.deptid)||-1,oemcid:((s=f.getUserInfo)==null?void 0:s.oemcid)||1,comid:((o=f.getUserInfo)==null?void 0:o.comid)||1,loginuuid:f.getLoginUuid,language:f.getLanguage,userAgent:"PC"}},L=e=>{const{response:s={}}=e;let o=0;try{o=s.status}catch(n){if(console.error(n),e.toString().indexOf("TypeError:")!==-1)return p(i("http.reqParamError"),"error"),Promise.reject(e);if(e.toString().indexOf("Error: timeout")!==-1)return p(`${i("http.networkTimeout")} ${s.status||""}`,"error"),Promise.reject(e);if(e.toString().indexOf("Error: Network Error")!==-1)return p(`${i("http.networkError")} ${s.status||""}`,"error"),Promise.reject(e)}if(s.data&&s.data.status==="fail"){let n="";s.status!==400&&(n=b[o]),p(`[${s.data.code||"[]"}] - ${n||s.data.message}`,"warning")}else if(o){const n=b[o]||s.statusText||b.default;switch(o){case 401:p(`[${o||"[]"}] - ${n}`,"error");break;case 403:x.push({path:"/401"});break;default:p(`[${o||"[]"}] - ${n}`,"error");break}}else p(`${i("http.noResponse")} ${s.status||""}`,"error");return Promise.reject(e)},M=E.create({baseURL:process.env.NODE_ENV==="production"?"":oe,timeout:re,withCredentials:!1});M.interceptors.request.use(e=>(e.headers=Object.assign(e.headers,G()),e.method==="post"&&typeof e.data!="object"&&(e.headers.post["Content-Type"]="application/json"),e.params=H(R({},e.params||{}),{_t:+new Date().getTime()}),e),L),M.interceptors.response.use(e=>{const{headers:s,data:o,statusText:n,status:c}=e,{datas:a}=o;let l;const m=s.newtoken;if(m&&f.setRefreshToken(m),c!==200){if(ne.includes(a.code)){try{l=JSON.parse(a.message)}catch(g){console.error(g),l={error:a.message}}a.code===23003&&(l=i("http.loginAgain"),x.push({path:"/"})),l&&p(l,"error")}else{const g=a.code;switch(l=b[g]||n||b.default,g){case 401:break;case 403:break;default:p(`${l} - ${c||""}`,"error");break}}return Promise.reject(new Error(l))}else return o.status==="fail"?(p(`${o.code||"unknow"} - ${o.message||""}`,"error"),Promise.reject(new Error(o.message))):o instanceof Blob?{headers:s,data:o}:e.data},L);const ae=()=>({fetchData:(s,o)=>y(this,null,function*(){return yield s(o)})}),ce=[q,P],I=e=>{I.INSTALLED||(I.INSTALLED=!0,ce.forEach(s=>s.install(e)))},ie={install:I};r.GvButton=q,r.GvSvgIcon=P,r.decrypt=te,r.default=ie,r.encrypt=ee,r.generateKey=se,r.isExternal=C,r.key=B,r.setHeaders=G,r.sleep=$,r.toHump=F,r.toLine=K,r.useCrud=ae,r.useNotify=U,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
3
|
+
//# sourceMappingURL=guava-ui.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guava-ui.umd.js","sources":["../packages/GvButton/GvButton.vue","../packages/GvButton/index.ts","../packages/utils/index.ts","../packages/GvSvgIcon/GvSvgIcon.vue","../packages/GvSvgIcon/index.ts","../packages/hooks/web/useNotify.ts","../packages/utils/gv.secret.ts","../packages/GvAxios/index.ts","../packages/hooks/service/useCrud.ts","../packages/index.ts"],"sourcesContent":["<!--\n * @title: GvButton组件,基于el-button封装\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-02-27 17:07:51\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-07 12:05:21\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu \n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n-->\n\n<script lang=\"tsx\">\n import { defineComponent, computed, watch } from 'vue';\n import { ElButton } from 'element-plus';\n export default defineComponent({\n name: 'GvButton',\n // --- pass params between parent-child ---\n props: {\n message: {\n type: String,\n default: 'GvButton',\n request: false,\n },\n },\n // --- register components ---\n components: {},\n // --- pass events between parent-child ---\n emits: ['click', 'submit'],\n\n setup(props, { emit, slots }) {\n // --- define computed ---\n // get default slot, Note: check if the slot is empty\n const getSlots = computed(() => slots.default?.());\n\n // --- listen data ---\n watch(\n () => props.message,\n (newVal) => {\n console.log('GvButton:' + newVal);\n },\n );\n\n // --- define Methods ---\n const handleClick = (event: MouseEvent, msg: string): void => {\n alert('this is a child event');\n emit('click', event, msg);\n };\n\n // render jsx\n return (): any => (\n <ElButton\n class=\"gv-button\"\n onClick={(event) => handleClick(event, props.message)}>\n {getSlots.value ?? props.message}\n </ElButton>\n );\n },\n });\n</script>\n\n<style lang=\"scss\" scoped>\n .gv-button {\n &:hover {\n color: red;\n }\n }\n</style>\n","import type { App } from 'vue';\nimport GvButton from './GvButton.vue';\n// Define the install method on the GvButton component\nconst GvButtonPlugin = {\n install(app: App): void {\n app.component(GvButton.name ?? 'GvButton', GvButton);\n },\n};\nexport default GvButtonPlugin;\nexport { GvButton };\n","/*\n * @title: common utility func\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-02-27 13:25:29\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 15:22:31\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\n\n/**\n * @todo: if external url\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2022-04-05 10:34:51\n * @param {*} path\n */\nexport const isExternal = (path: string): boolean => /^(https?:|mailto:|tel:)/.test(path);\n\n/**\n * @todo: sleep async function\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 12:01:37\n * @param {*} timeLen\n */\nexport const sleep = async (timeLen: number) => new Promise((resolve) => setTimeout(resolve, timeLen));\n\n/**\n * @todo: 下划线转换驼峰\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2022-04-06 13:53:06\n * @param {*} name\n */\n/**\n * @todo: underline to camel case\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 15:21:09\n * @param {*} name\n */\nexport const toHump = (name: string): string => {\n if (!name) return '';\n // eslint-disable-next-line no-useless-escape\n return name.replace(/\\_(\\w)/g, function (all, letter) {\n return letter.toUpperCase();\n });\n};\n\n/**\n * @todo: camel case to underline\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 15:21:50\n * @param {*} name\n */\nexport const toLine = (name: string): string => name.replace(/([A-Z])/g, '_$1').toLowerCase();\n","<!--\n * @title: svg icon component\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-01 17:02:13\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 16:25:52\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu \n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n-->\n<script setup lang=\"ts\">\n import { computed, useAttrs } from 'vue';\n import { isExternal } from '@@/utils';\n import { useStyle } from '@/hook/web/useStyle';\n const { variables } = useStyle();\n const preNameSpace = variables.namespace;\n const attrs = useAttrs();\n // --- define name and inheritAttrs ---\n defineOptions({\n name: 'GvSvgIcon', // 定义组件名称\n inheritAttrs: false, // 默认继承属性\n });\n // --- transfer props and define default values ---\n const props = withDefaults(\n defineProps<{\n iconType?: string;\n iconClass: string;\n className?: string;\n size?: string; // 图标的font-size,单位是px\n }>(),\n {\n iconType: 'svg', // svg | iconfont\n className: '',\n },\n );\n const isLocal = computed(() => isExternal(props.iconClass));\n const iconName = computed(() => {\n if (props.iconType === 'svg') return `#${preNameSpace}-icon-${props.iconClass}`;\n else return `#${props.iconClass}`;\n });\n const svgClass = computed(() => {\n if (props.className) return 'svg-icon ' + props.className;\n else return 'svg-icon';\n });\n const styleExternalIcon = computed(() => ({\n mask: `url(${props.iconClass}) no-repeat 50% 50%`,\n '-webkit-mask': `url(${props.iconClass}) no-repeat 50% 50%`,\n }));\n</script>\n<template>\n <div\n v-if=\"isLocal\"\n :style=\"styleExternalIcon\"\n class=\"svg-external-icon svg-icon\"\n v-bind=\"attrs\"></div>\n <svg\n v-else-if=\"iconType === 'svg'\"\n :class=\"svgClass\"\n aria-hidden=\"true\"\n v-bind=\"attrs\">\n <use :href=\"iconName\" />\n </svg>\n <svg\n v-else\n :class=\"svgClass\"\n :style=\"{ 'font-size': size + 'px' }\"\n aria-hidden=\"true\"\n v-bind=\"attrs\">\n <use :xlink:href=\"iconName\" />\n </svg>\n</template>\n\n<style lang=\"scss\" scoped>\n .svg-icon {\n width: 1em;\n height: 1em;\n overflow: hidden;\n vertical-align: -0.15em;\n fill: currentcolor;\n }\n\n .svg-external-icon {\n display: inline-block;\n background-color: currentcolor;\n mask-size: cover !important;\n }\n</style>\n","import type { App } from 'vue';\nimport GvSvgIcon from './GvSvgIcon.vue';\n// Define the install method on the GvButton component\nconst GvSvgIconPlugin = {\n install(app: App): void {\n app.component(GvSvgIcon.name ?? 'GvSvgIcon', GvSvgIcon);\n },\n};\nexport default GvSvgIconPlugin;\n","/*\n * @title: message alert confirm\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 11:47:30\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 15:27:25\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\n\nimport { ElMessageBox, ElNotification, ElMessage } from 'element-plus';\nimport { sleep } from '@@/utils';\nimport { useI18n } from '@/hook/web/useI18n';\nconst { t } = useI18n();\n\nconst notificationTime = 5000;\nconst notificationTimeError = 6000;\nconst messageTime = 2000;\nconst messageTimeError = 5000;\n\ninterface ConfirmOptions {\n title?: string;\n message: string;\n confirmButtonText?: string;\n cancelButtonText?: string;\n type?: 'success' | 'warning' | 'info' | 'error';\n showCancelButton?: boolean;\n}\nexport const useNotify = () => {\n /**\n * @todo: Notification - MessageBox\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 13:48:24\n * @param {string} msg\n * @param {MessageType} type\n * @param {string} title\n */\n const alert = async (msg: string = 'No message...', type: MessageType = 'success') => {\n const alertObj = document.body.querySelector('body>.el-notification');\n if (alertObj) alertObj.remove();\n\n const promptMsg = t('common.promptMsg');\n const duration = type === 'error' ? notificationTimeError : notificationTime;\n\n ElNotification({\n title: promptMsg,\n message: msg,\n type,\n duration: duration,\n });\n await sleep(duration);\n };\n /**\n * @todo: confirm - MessageBox\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 12:03:27\n * @param {*} msg\n * @param {*} type\n */\n const confirm = async (msg: string, type: MessageType = 'warning') => {\n if (document.body.querySelector('body>.el-confirm')) return;\n // 返回 Promise 对象\n let msgs: string;\n const showCancelButton = true;\n\n if (msg) msgs = msg;\n else msgs = t('common.confirmMsg');\n const hint = t('common.confirmHint');\n const ok = t('common.confirmOk');\n const cancel = t('common.confirmCancel');\n\n return new Promise((resolve, reject) => {\n ElMessageBox.confirm(msgs, hint, {\n confirmButtonText: ok,\n cancelButtonText: cancel,\n type,\n showCancelButton,\n } as ConfirmOptions)\n .then(() => {\n resolve(true);\n })\n .catch(() => {\n reject(false);\n });\n });\n };\n\n const message = async (msg: string = 'No message...', type: MessageType = 'warning', tableedit: boolean = false) => {\n if (tableedit === false) {\n const messageObj = document.body.querySelector('body>.el-message');\n // if (messageObj) messageObj.style.display = 'none';\n if (messageObj) return;\n const notifyObj = document.body.querySelector('body>.el-notification');\n if (notifyObj) return;\n }\n\n const duration = type === 'error' ? messageTimeError : messageTime;\n ElMessage({\n message: msg,\n showClose: true,\n type,\n duration: duration,\n });\n await sleep(duration);\n };\n return {\n alert,\n confirm,\n message,\n };\n};\n","/*\r\n * @title: encrypt\r\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\r\n * @Date: 2023-12-16 08:07:24\r\n * @LastEditors: andy.ten@tom.com\r\n * @LastEditTime: 2025-04-07 13:54:00\r\n * @version: 1.0.1\r\n * @copyright: copyright (c) 2025 Andy Xu\r\n * node: you can not copy and/or use and/or modify this program free,\r\n * please reserve the segment above.Please mail me if you have any question.\r\n */\r\n\r\nimport CryptoJS from 'crypto-js';\r\nexport const key = 'abcdefgabcdefg12';\r\nexport const encrypt = (word: any): string => {\r\n const keyStr = CryptoJS.enc.Utf8.parse(key);\r\n let ww;\r\n if (typeof word === 'object') ww = JSON.stringify(word);\r\n else ww = word;\r\n const srcs = CryptoJS.enc.Utf8.parse(ww);\r\n const encrypted = CryptoJS.AES.encrypt(srcs, keyStr, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });\r\n return encrypted.toString();\r\n};\r\nexport const decrypt = (word: string): any => {\r\n const keyStr = CryptoJS.enc.Utf8.parse(key);\r\n const decrypt = CryptoJS.AES.decrypt(word, keyStr, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });\r\n return CryptoJS.enc.Utf8.stringify(decrypt).toString();\r\n};\r\n// Randomly generate a specified number of hexadecimal keys\r\nexport const generateKey = (num: number): string => {\r\n const library = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n let key = '';\r\n for (let i = 0; i < num; i++) {\r\n const randomPoz = Math.floor(Math.random() * library.length);\r\n key += library.substring(randomPoz, randomPoz + 1);\r\n }\r\n return key;\r\n};\r\n","/*\n * @title: axios request\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 11:44:12\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 17:38:35\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\n\nimport axios from 'axios';\nimport { useI18n } from '@/hook/web/useI18n';\nimport { useUserStore } from '@/store/modules/user';\nimport { useNotify } from '@@/hooks/web/useNotify';\nimport { useRouter } from 'vue-router';\nimport { encrypt } from '@@/utils/gv.secret';\nconst { t } = useI18n();\nconst { alert } = useNotify();\nconst userStore = useUserStore();\nconst router = useRouter();\nconst appUrl = import.meta.env.VITE_API_URL;\nconst requestTimeout = import.meta.env.VITE_APP_REQUEST_TIMEOUT;\nconst paramEncryp = import.meta.env.VITE_REQUEST_PARAM_ENCRYP;\n// 定义 http status code\nconst codeMessage = {\n 200: t('http.responseDataSuccess'),\n 201: t('http.dataOpSuccess'),\n 202: t('http.requestBackground'),\n 204: t('http.dataDelSuccess'),\n 400: t('http.responseError'),\n 401: t('http.noPerm'),\n 403: t('http.authorizedUserForbidden'),\n 404: t('http.targetRequestError'),\n 406: t('http.requestFormatError'),\n 410: t('http.resourceDel'),\n 422: t('http.createObjError'),\n 500: t('http.serverError'),\n 502: t('http.gatewayError'),\n 503: t('http.serviceError'),\n 504: t('http.gatewayTimeOut'),\n default: t('http.networkLinkError'),\n};\n\n// 定义 gateway response status\nconst gatewayCodes = [23001, 23002, 23003, 23007, 23008, 1999];\n\n/**\n * @todo: 设置请求header头部信息\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2022-03-22 20:27:44\n */\nconst setHeaders = () => ({\n Authorization: userStore.getToken,\n AuthorizationRefresh: userStore.getRefreshToken,\n useraccount: userStore.getLoginAccount,\n userid: userStore.getUserId,\n deptid: userStore.getUserInfo?.deptid || -1,\n oemcid: userStore.getUserInfo?.oemcid || 1,\n comid: userStore.getUserInfo?.comid || 1,\n loginuuid: userStore.getLoginUuid,\n language: userStore.getLanguage,\n userAgent: 'PC',\n});\n/**\n * @todo: 请求异常处理\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2022-03-22 22:01:02\n * @param {*} error\n */\nconst errorHandler = (error) => {\n const { response = {} } = error;\n let status = 0;\n try {\n status = response.status;\n } catch (e) {\n console.error(e);\n if (error.toString().indexOf('TypeError:') !== -1) {\n alert(t('http.reqParamError'), 'error');\n return Promise.reject(error);\n }\n if (error.toString().indexOf('Error: timeout') !== -1) {\n alert(`${t('http.networkTimeout')} ${response.status || ''}`, 'error');\n return Promise.reject(error);\n }\n\n if (error.toString().indexOf('Error: Network Error') !== -1) {\n alert(`${t('http.networkError')} ${response.status || ''}`, 'error');\n return Promise.reject(error);\n }\n }\n // bizException 自定义异常\n if (response.data && response.data.status === 'fail') {\n let errorMsg = '';\n if (response.status !== 400) errorMsg = codeMessage[status];\n alert(`[${response.data.code || '[]'}] - ${errorMsg || response.data.message}`, 'warning');\n } else if (status) {\n const errorMsg = codeMessage[status] || response.statusText || codeMessage['default'];\n switch (status) {\n case 401:\n alert(`[${status || '[]'}] - ${errorMsg}`, 'error');\n break;\n case 403:\n router.push({ path: '/401' });\n break;\n default:\n alert(`[${status || '[]'}] - ${errorMsg}`, 'error');\n break;\n }\n } else alert(`${t('http.noResponse')} ${response.status || ''}`, 'error');\n\n // 设置loading block\n // store.dispatch('app/clearBtnLoading');\n return Promise.reject(error);\n};\n\n// 全局axios默认配置\n// axios.defaults.baseURL = 'https://api.example.com';\n// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;\n// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';\n\n// 创建axios实例\nconst service = axios.create({\n baseURL: process.env.NODE_ENV === 'production' ? '' : appUrl, // api 的 base_url\n timeout: requestTimeout, // 请求超时时间\n withCredentials: false,\n // paramsSerializer: params => {\n // // 序列化 GET 请求参数 -> a: [1, 2] => a=1&a=2\n // return qs.stringify(params, { arrayFormat: 'repeat' });\n // }\n});\n\n// request拦截器\nservice.interceptors.request.use((config) => {\n // 设置请求头部信息\n config.headers = Object.assign(config.headers, setHeaders());\n // 处理 POST 请求,参数是字符串,修正请求头 Content-Type 类型\n // 默认为:application/x-www-form-urlencoded\n if (config.method === 'post' && typeof config.data !== 'object') config.headers.post['Content-Type'] = 'application/json';\n\n // config.headers['Content-Type'] = 'application/json';\n\n // 设置loading block\n // if (config.mark) {\n // store.dispatch('app/createBtnLoading', { [config.mark]: true });\n // }\n\n // 生产环境请求参数加密\n if (paramEncryp === true)\n if (\n (config.url?.indexOf('loginAuth') ?? -1) === -1 &&\n (config.url?.indexOf('loginMenu') ?? -1) === -1 &&\n (config.url?.indexOf('sysmessage') ?? -1) === -1 &&\n (config.url?.indexOf('sysdict') ?? -1) === -1 &&\n (config.url?.indexOf('sysattach') ?? -1) === -1\n ) {\n config.data = { param: encrypt(config.data) };\n config.headers['aes'] = '1';\n }\n // console.log(config.data);\n\n // 兼容 IE 缓存,增加随机数参数\n config.params = {\n ...(config.params || {}),\n _t: +new Date().getTime(),\n };\n\n return config;\n}, errorHandler);\n\n// response 拦截器\nservice.interceptors.response.use((response) => {\n const { headers, data, statusText, status } = response;\n const { datas } = data;\n let errMsg2;\n // store.dispatch('app/clearBtnLoading');\n const newToken = headers.newtoken;\n if (newToken) userStore.setRefreshToken(newToken);\n\n if (status !== 200) {\n // 处理网关的响应\n if (gatewayCodes.includes(datas.code)) {\n try {\n errMsg2 = JSON.parse(datas.message);\n } catch (e) {\n console.error(e);\n errMsg2 = { error: datas.message };\n }\n //\n if (datas.code === 23003) {\n errMsg2 = t('http.loginAgain');\n // store.dispatch('app/createLogout');\n router.push({ path: '/' });\n }\n errMsg2 && alert(errMsg2, 'error');\n } else {\n const code = datas.code;\n errMsg2 = codeMessage[code] || statusText || codeMessage['default'];\n switch (code) {\n case 401:\n // store.dispatch('LogOut').then(() => {\n // // 用户登录界面提示\n // //Cookies.set('point', 401)\n // location.reload()\n // })\n break;\n case 403:\n // router.push({ path: '/401' })\n break;\n default:\n alert(`${errMsg2} - ${status || ''}`, 'error');\n break;\n }\n }\n return Promise.reject(new Error(errMsg2));\n } else {\n // console.log(headers);\n if (data.status === 'fail') {\n // 成功 但是返回错误信息\n alert(`${data.code || 'unknow'} - ${data.message || ''}`, 'error');\n return Promise.reject(new Error(data.message));\n }\n // 兼容blob下载出错json提示\n if (data instanceof Blob)\n // const reader = new FileReader();\n // reader.readAsText(data, 'utf-8');\n // reader.onload = function(e) {\n // const errorMsg = JSON.parse(reader.result).message;\n // Notify.alert(errorMsg, 'error');\n // };\n return { headers, data };\n else return response.data;\n }\n}, errorHandler);\n\nexport { setHeaders };\nexport default service;\n","/*\n * @title: CRUD hook\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 15:25:08\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 16:07:59\n * @version: 1.0.1\n * @copyright: copyright (c) 2025 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\n\nexport const useCrud = () => {\n /**\n * @todo: request data\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2025-04-08 15:39:44\n * @param {*} fetch\n * @param {*} datas\n */\n const fetchData = async <T = any>(fetch, params): Promise<IResponse<T>> => (await fetch(params)) as IResponse<T>;\n\n return {\n fetchData,\n };\n};\n","/*\n * @title: package lib entry\n * @author: andy.ten@tom.com & xukaixing@hotmail.com\n * @Date: 2024-11-28 18:18:44\n * @LastEditors: andy.ten@tom.com\n * @LastEditTime: 2025-04-08 17:30:38\n * @version: 1.0.1\n * @copyright: copyright (c) 2024 Andy Xu\n * node: you can not copy and/or use and/or modify this program free,\n * please reserve the segment above.Please mail me if you have any question.\n */\nimport type { App } from 'vue';\nimport GvButton from './GvButton';\nimport GvSvgIcon from './GvSvgIcon';\n\nconst components = [GvButton, GvSvgIcon];\n\n// 定义 install 方法, App 作为参数\nconst install = (app: App): void => {\n if (install['INSTALLED']) return;\n install['INSTALLED'] = true;\n // 遍历注册所有组件\n components.forEach((component) => component.install(app));\n};\n\nconst GuavaUI = {\n install,\n};\n\nexport default GuavaUI;\n\n// 按需加载\nexport { GvButton };\nexport { GvSvgIcon };\n\nexport * from './GvAxios/index';\n// hooks\nexport * from './hooks/service/useCrud';\nexport * from './hooks/web/useNotify';\nexport * from './utils/gv.secret';\nexport * from './utils/index';\n"],"names":["defineComponent","name","props","message","type","String","default","request","components","emits","setup","emit","slots","getSlots","computed","watch","newVal","console","log","handleClick","event","msg","alert","_createVNode","ElButton","value","_export_sfc","sfc","GvButtonPlugin","app","_a","GvButton","isExternal","path","sleep","timeLen","__async","resolve","toHump","all","letter","toLine","variables","useStyle","preNameSpace","attrs","useAttrs","__props","isLocal","iconName","svgClass","styleExternalIcon","GvSvgIconPlugin","GvSvgIcon","t","useI18n","notificationTime","notificationTimeError","messageTime","messageTimeError","useNotify","alertObj","promptMsg","duration","ElNotification","msgs","showCancelButton","hint","ok","cancel","reject","ElMessageBox","tableedit","ElMessage","key","encrypt","word","keyStr","CryptoJS","ww","srcs","decrypt","generateKey","num","library","i","randomPoz","userStore","useUserStore","router","useRouter","appUrl","requestTimeout","codeMessage","gatewayCodes","setHeaders","_b","_c","errorHandler","error","response","status","e","errorMsg","service","axios","config","__spreadProps","__spreadValues","headers","data","statusText","datas","errMsg2","newToken","code","useCrud","fetch","params","install","component","GuavaUI","exports"],"mappings":";2CAeE,MAAeA,oBAAgB,CAC7BC,KAAM,WAENC,MAAO,CACLC,QAAS,CACPC,KAAMC,OACNC,QAAS,WACTC,QAAS,EACX,CACD,EAEDC,WAAY,CAAE,EAEdC,MAAO,CAAC,QAAS,QAAQ,EAEzBC,MAAMR,EAAO,CAAES,KAAAA,EAAMC,MAAAA,CAAM,EAAG,CAG5B,MAAMC,EAAWC,EAAQ,SAAC,WAAMF,OAAAA,EAAAA,EAAMN,UAANM,YAAAA,EAAAA,KAAAA,GAAiB,EAGjDG,EAAAA,MACE,IAAMb,EAAMC,QACXa,GAAW,CACVC,QAAQC,IAAI,YAAcF,CAAM,CAClC,CACF,EAGA,MAAMG,EAAcA,CAACC,EAAmBC,IAAsB,CAC5DC,MAAM,uBAAuB,EAC7BX,EAAK,QAASS,EAAOC,CAAG,CACzB,EAGD,MAAO,IAAAE,EAAA,YAAAC,WAAA,CAAA,MAAA,YAAA,QAGOJ,GAAUD,EAAYC,EAAOlB,EAAMC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,QAASgH,GAAcA,EAAU,QAAQ3F,CAAG,CAAC,EAC1D,EAEM4F,GAAU,CACd,QAAAF,CACF,EAAAG,EAAA,SAAA9F,EAAA8F,EAAA,UAAAtE,EAAAsE,EAAA,QAAAzC,GAAAyC,EAAA,QAAAD,GAAAC,EAAA,QAAA/C,GAAA+C,EAAA,YAAAxC,GAAAwC,EAAA,WAAA1F,EAAA0F,EAAA,IAAAhD,EAAAgD,EAAA,WAAA3B,EAAA2B,EAAA,MAAAxF,EAAAwF,EAAA,OAAApF,EAAAoF,EAAA,OAAAjF,EAAAiF,EAAA,QAAAN,GAAAM,EAAA,UAAA9D,EAAA,OAAA,iBAAA8D,EAAA,CAAA,WAAA,CAAA,MAAA,EAAA,EAAA,CAAA,OAAA,WAAA,EAAA,CAAA,MAAA,QAAA,CAAA,CAAA,CAAA,CAAA"}
|
package/lib/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[data-v-67cee13e]:export{namespace:gv;elNamespace:el;zIndex:1000}.gv-button[data-v-67cee13e]:hover{color:red}[data-v-b1560990]:export{namespace:gv;elNamespace:el;zIndex:1000}.svg-icon[data-v-b1560990]{width:1em;height:1em;overflow:hidden;vertical-align:-.15em;fill:currentcolor}.svg-external-icon[data-v-b1560990]{display:inline-block;background-color:currentcolor;-webkit-mask-size:cover!important;mask-size:cover!important}
|
package/package.json
CHANGED
|
@@ -1,67 +1,108 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "guava-ui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "vue3 & element-plus & typesScript & vite
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"description": "vue3 & element-plus & typesScript & vite UI platform",
|
|
5
5
|
"author": "Andy <xukaixing@hotmail.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"private": false,
|
|
8
|
+
"main": "index.html",
|
|
8
9
|
"type": "module",
|
|
9
10
|
"scripts": {
|
|
10
11
|
"dev": "pnpm vite --mode dev",
|
|
11
|
-
"build": "pnpm vite build --mode
|
|
12
|
+
"build": "pnpm vite build --mode prod",
|
|
12
13
|
"build:no-cache": "npm clean:cache && npm run build",
|
|
13
|
-
"lib": "pnpm vite build",
|
|
14
|
+
"lib": "pnpm vite build ",
|
|
14
15
|
"prepare": "npx husky install",
|
|
15
16
|
"preview": "pnpm vite preview",
|
|
16
|
-
"clean
|
|
17
|
+
"clean": "pnpx rimraf node_modules",
|
|
18
|
+
"clean:cache": "pnpx rimraf node_modules/.cache",
|
|
17
19
|
"upgrade": "ncu -u && pnpm install",
|
|
18
20
|
"lint:lint-staged": "lint-staged -c ./.lintstagedrc.mjs",
|
|
19
21
|
"lint:oxlint": "oxlint . --fix -D correctness --ignore-path .gitignore",
|
|
20
22
|
"lint:prettier": "prettier --write --fix --loglevel warn \"./**/*.{js,ts,json,jsx,tsx,css,less,scss,vue,html}\"",
|
|
21
23
|
"lint:stylelint": "stylelint --cache --fix \"src/**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
|
|
22
|
-
"commitlint": "commitlint --
|
|
24
|
+
"commitlint": "commitlint --config .commitlintrc.mjs -e -V"
|
|
25
|
+
},
|
|
26
|
+
"husky": {
|
|
27
|
+
"hooks": {
|
|
28
|
+
"pre-commit": "lint-staged",
|
|
29
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
30
|
+
}
|
|
23
31
|
},
|
|
24
32
|
"lint-staged": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
33
|
+
"src/**/*.js": "eslint --cache --fix",
|
|
34
|
+
"src/**/*.ts": "eslint --cache --fix",
|
|
35
|
+
"src/**/*.vue": "eslint --cache --fix",
|
|
36
|
+
"src/**/*.scss": "stylelint --fix",
|
|
37
|
+
"src/**/*.less": "stylelint --fix",
|
|
38
|
+
"src/**/*.css": "stylelint --fix"
|
|
30
39
|
},
|
|
31
40
|
"dependencies": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
41
|
+
"@vueuse/core": "^13.0.0",
|
|
42
|
+
"axios": "^1.7.8",
|
|
43
|
+
"cropperjs": "^2.0.0",
|
|
44
|
+
"crypto-js": "^4.2.0",
|
|
45
|
+
"dayjs": "^1.11.13",
|
|
46
|
+
"echarts": "^5.5.1",
|
|
47
|
+
"echarts-wordcloud": "^2.1.0",
|
|
48
|
+
"element-plus": "^2.9.2",
|
|
49
|
+
"lodash-es": "^4.17.21",
|
|
50
|
+
"nprogress": "^0.2.0",
|
|
51
|
+
"pinia": "^2.3.0",
|
|
52
|
+
"pinia-plugin-persistedstate": "^4.2.0",
|
|
53
|
+
"pinia-plugin-persistedstate-2": "^2.0.30",
|
|
54
|
+
"qrcode": "^1.5.4",
|
|
55
|
+
"qs": "^6.13.1",
|
|
56
|
+
"vue": "^3.5.13",
|
|
57
|
+
"vue-i18n": "^11.0.1",
|
|
58
|
+
"vue-router": "^4.5.0",
|
|
59
|
+
"vue-types": "^5.1.3"
|
|
35
60
|
},
|
|
36
61
|
"devDependencies": {
|
|
37
62
|
"@commitlint/cli": "^19.6.0",
|
|
38
63
|
"@commitlint/config-conventional": "^19.6.0",
|
|
64
|
+
"@eslint/js": "^9.21.0",
|
|
65
|
+
"@intlify/unplugin-vue-i18n": "^6.0.5",
|
|
66
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
67
|
+
"@stylistic/eslint-plugin": "^2.12.1",
|
|
39
68
|
"@tsconfig/node20": "^20.0.0",
|
|
40
|
-
"@types/
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
69
|
+
"@types/echarts": "^4.9.22",
|
|
70
|
+
"@types/lodash-es": "^4.17.12",
|
|
71
|
+
"@types/node": "^22.10.5",
|
|
72
|
+
"@types/qrcode": "^1.5.5",
|
|
73
|
+
"@types/qs": "^6.9.17",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
75
|
+
"@typescript-eslint/parser": "^8.19.1",
|
|
76
|
+
"@vitejs/plugin-legacy": "^6.0.2",
|
|
77
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
78
|
+
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
45
79
|
"@vue/eslint-config-typescript": "^14.1.3",
|
|
46
80
|
"@vue/tsconfig": "^0.5.1",
|
|
47
81
|
"autoprefixer": "^10.4.20",
|
|
48
|
-
"
|
|
82
|
+
"browserslist": "^4.24.4",
|
|
83
|
+
"consola": "^3.4.2",
|
|
84
|
+
"eslint": "^9.17.0",
|
|
49
85
|
"eslint-config-prettier": "^9.1.0",
|
|
86
|
+
"eslint-define-config": "^2.1.0",
|
|
50
87
|
"eslint-plugin-oxlint": "^0.11.0",
|
|
51
88
|
"eslint-plugin-prettier": "^5.2.1",
|
|
52
|
-
"eslint-plugin-vue": "^9.
|
|
89
|
+
"eslint-plugin-vue": "^9.32.0",
|
|
90
|
+
"globals": "^15.12.0",
|
|
53
91
|
"husky": "^9.1.7",
|
|
54
92
|
"lint-staged": "^15.2.10",
|
|
55
93
|
"npm-run-all2": "^7.0.1",
|
|
56
94
|
"oxlint": "^0.11.0",
|
|
57
95
|
"postcss": "^8.4.49",
|
|
58
96
|
"postcss-html": "^1.7.0",
|
|
59
|
-
"postcss-preset-env": "^10.1.
|
|
97
|
+
"postcss-preset-env": "^10.1.5",
|
|
60
98
|
"postcss-px-to-viewport-8-plugin": "^1.2.5",
|
|
61
99
|
"postcss-scss": "^4.0.9",
|
|
62
|
-
"prettier": "^3.
|
|
100
|
+
"prettier": "^3.4.2",
|
|
101
|
+
"rollup": "^4.30.1",
|
|
102
|
+
"rollup-plugin-visualizer": "^5.14.0",
|
|
63
103
|
"sass-embedded": "^1.81.0",
|
|
64
|
-
"stylelint": "^16.
|
|
104
|
+
"stylelint": "^16.12.0",
|
|
105
|
+
"stylelint-config-html": "^1.1.0",
|
|
65
106
|
"stylelint-config-prettier": "^9.0.5",
|
|
66
107
|
"stylelint-config-recess-order": "^5.1.1",
|
|
67
108
|
"stylelint-config-recommended": "^14.0.1",
|
|
@@ -70,33 +111,50 @@
|
|
|
70
111
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
71
112
|
"stylelint-order": "^6.0.4",
|
|
72
113
|
"stylelint-prettier": "^5.0.2",
|
|
73
|
-
"terser": "^5.
|
|
74
|
-
"typescript": "~5.
|
|
75
|
-
"
|
|
114
|
+
"terser": "^5.39.0",
|
|
115
|
+
"typescript": "~5.7.3",
|
|
116
|
+
"typescript-eslint": "^8.19.1",
|
|
117
|
+
"vite": "^6.0.7",
|
|
118
|
+
"vite-plugin-compression2": "^1.3.3",
|
|
119
|
+
"vite-plugin-ejs": "^1.7.0",
|
|
76
120
|
"vite-plugin-eslint": "^1.8.1",
|
|
121
|
+
"vite-plugin-full-reload": "^1.2.0",
|
|
77
122
|
"vite-plugin-progress": "^0.0.7",
|
|
78
|
-
"vite-plugin-
|
|
79
|
-
"
|
|
80
|
-
"
|
|
123
|
+
"vite-plugin-purge-icons": "^0.10.0",
|
|
124
|
+
"vite-plugin-pwa": "^0.21.0",
|
|
125
|
+
"vite-plugin-style-import": "^2.0.0",
|
|
126
|
+
"vite-plugin-svg-icons": "^2.0.1",
|
|
127
|
+
"vite-plugin-url-copy": "^1.1.4",
|
|
128
|
+
"vite-plugin-vue-devtools": "^7.7.2",
|
|
129
|
+
"vue-eslint-parser": "^10.1.1",
|
|
130
|
+
"vue-tsc": "^2.2.0"
|
|
81
131
|
},
|
|
82
132
|
"files": [
|
|
83
133
|
"lib/static",
|
|
84
|
-
"lib/guava-ui.
|
|
85
|
-
"lib/guava-ui.
|
|
86
|
-
"lib/guava-ui.js"
|
|
134
|
+
"lib/guava-ui.es.js",
|
|
135
|
+
"lib/guava-ui.es.js.map",
|
|
136
|
+
"lib/guava-ui.umd.js",
|
|
137
|
+
"lib/guava-ui.umd.js.map",
|
|
138
|
+
"lib/index.css"
|
|
87
139
|
],
|
|
88
|
-
"packageManager": "pnpm@
|
|
140
|
+
"packageManager": "pnpm@10.6.5",
|
|
89
141
|
"engines": {
|
|
90
142
|
"node": "20.18.0",
|
|
91
|
-
"
|
|
143
|
+
"pnpm": ">=10.6.5"
|
|
92
144
|
},
|
|
93
145
|
"keywords": [
|
|
94
146
|
"vue3",
|
|
147
|
+
"typescript",
|
|
95
148
|
"vite",
|
|
149
|
+
"vue-router",
|
|
150
|
+
"pinia",
|
|
96
151
|
"element-plus",
|
|
97
|
-
"
|
|
98
|
-
"guava"
|
|
152
|
+
"i18n",
|
|
153
|
+
"guava-ui"
|
|
99
154
|
],
|
|
155
|
+
"publishConfig": {
|
|
156
|
+
"registry": "https://registry.npmjs.org/"
|
|
157
|
+
},
|
|
100
158
|
"repository": {
|
|
101
159
|
"type": "git",
|
|
102
160
|
"url": "https://gitee.com/xukaixing/guava-ui.git"
|
package/lib/guava-ui.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vue-CKh7LjAU.cjs");exports.useFlag=(t=!1)=>{const r=e.r(t);return{flag:r,setFlag:e=>{r.value=void 0!==e?e:!r.value}}};
|
package/lib/guava-ui.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as ref } from "./vue-DezUuk3_.js";
|
|
2
|
-
const useFlag = (defind = false) => {
|
|
3
|
-
const flag = ref(defind);
|
|
4
|
-
const setFlag = (defind2) => {
|
|
5
|
-
if (typeof defind2 === "undefined") {
|
|
6
|
-
flag.value = !flag.value;
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
flag.value = defind2;
|
|
10
|
-
};
|
|
11
|
-
return { flag, setFlag };
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
useFlag
|
|
15
|
-
};
|