1
0
mirror of https://github.com/WeBankFinTech/fes.js.git synced 2025-04-06 03:59:53 +08:00

Compare commits

...

749 Commits

Author SHA1 Message Date
winixt
831a91bded chore: v3.4.11 2025-03-14 18:22:38 +08:00
winixt
2cb7d5d4e0 fix: request 属性代理问题 2025-03-14 18:21:48 +08:00
winixt
677a25d00d chore: v3.4.10 2025-03-14 18:04:33 +08:00
winixt
4f07de0df0 chore: update lock 2025-03-14 18:04:06 +08:00
winixt
6649e0615b fix: 修复 request 属性挂载问题 2025-03-14 17:57:30 +08:00
winixt
4169cc8c5f chore: v3.4.9 2025-03-10 18:03:05 +08:00
winixt
17a7e0116e feat: upgrade request 2025-03-10 18:01:04 +08:00
harrywan
736807d9e8 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2024-12-20 11:14:14 +08:00
harrywan
c5b88a4232 chore: v3.4.8 2024-12-10 10:45:17 +08:00
harrywan
8feaa8d643 chore: v3.4.8 2024-12-10 10:45:17 +08:00
harrywan
9ba8d1ae0f Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2024-12-10 10:44:15 +08:00
harrywan
88c88d9116 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2024-12-10 10:44:15 +08:00
harrywan
63e55cc44f fix: 修复plugin-layout 404页面无法正常渲染问题 2024-12-10 10:44:08 +08:00
harrywan
8ab9b99b11 fix: 修复plugin-layout 404页面无法正常渲染问题 2024-12-10 10:44:08 +08:00
winixt
e7a7b9507a docs: change doc 2024-12-05 10:57:57 +08:00
winixt
1cf8f25bd4 docs: change doc 2024-12-05 10:57:57 +08:00
winixt
bc0cca4974 chore: v3.4.7 2024-12-01 19:20:24 +08:00
winixt
776128b21a chore: v3.4.7 2024-12-01 19:20:24 +08:00
qlin
c7ad0cd806
feat: 添加 console 配置,支持输出 version () 2024-11-29 10:58:12 +08:00
qlin
4c9941503e feat: 添加 console 配置,支持输出 version () 2024-11-29 10:58:12 +08:00
winixt
2cc5915ea7 chore: v3.4.6 2024-11-28 11:49:57 +08:00
winixt
e957e6b365 chore: v3.4.6 2024-11-28 11:49:57 +08:00
qlin
4d28a09c85
fix: 受控模式优化 () 2024-11-28 11:48:59 +08:00
qlin
e371e2383f fix: 受控模式优化 () 2024-11-28 11:48:59 +08:00
qlin
7c01ee979e
fix: 代理插件兼容 array 写法 () 2024-11-27 11:31:20 +08:00
qlin
57645b1adf fix: 代理插件兼容 array 写法 () 2024-11-27 11:31:20 +08:00
瞅啥呢!
b1ea675f40
fix: 修复pc模版无法启动问题 ()
* fix: 模版PC模版无法启动

* fix: 修复PC模版无法启动问题

---------

Co-authored-by: zhouyonghuan <zhouyonghuan@gyyx.cn>
2024-11-27 11:29:39 +08:00
瞅啥呢!
fca58a5103 fix: 修复pc模版无法启动问题 ()
* fix: 模版PC模版无法启动

* fix: 修复PC模版无法启动问题

---------

Co-authored-by: zhouyonghuan <zhouyonghuan@gyyx.cn>
2024-11-27 11:29:39 +08:00
qlin
efd8708752
feat: webpack-dev 升级到5.x,提升 dev 性能,优化日志输出 () 2024-11-22 10:29:48 +08:00
qlin
b2e6f2f34b feat: webpack-dev 升级到5.x,提升 dev 性能,优化日志输出 () 2024-11-22 10:29:48 +08:00
winixt
fad3c95a92 chore: 优化 webpack dev 日志输出 & 优化 ctrl + c 结束进程的日志输出 2024-11-20 20:47:09 +08:00
winixt
1bb74ee769 chore: 优化 webpack dev 日志输出 & 优化 ctrl + c 结束进程的日志输出 2024-11-20 20:47:09 +08:00
winixt
9d8692e5f8 docs: 优化文档 2024-11-20 20:21:04 +08:00
winixt
71621a4acc docs: 优化文档 2024-11-20 20:21:04 +08:00
winixt
1576c0ad17 chore: v3.4.5 2024-11-19 14:31:24 +08:00
winixt
ad6700279a chore: v3.4.5 2024-11-19 14:31:24 +08:00
winixt
4b21799ff9 chore: v3.4.4 2024-11-19 14:26:11 +08:00
winixt
fed3d5c91d chore: v3.4.4 2024-11-19 14:26:11 +08:00
qlin
eb6ed75dd4
feat: menu 支持配置 _blank 在新页面打开 () 2024-11-19 10:54:24 +08:00
qlin
a426a30a7d feat: menu 支持配置 _blank 在新页面打开 () 2024-11-19 10:54:24 +08:00
qlin
4b3fb7b3d1
fix: 控制 tab 是否可以刷新 () 2024-11-14 16:16:50 +08:00
qlin
712f22a9ac fix: 控制 tab 是否可以刷新 () 2024-11-14 16:16:50 +08:00
qlin
0280fb9826
chore: 修复安全告警问题 () 2024-11-14 16:15:03 +08:00
qlin
7fbb9e847d chore: 修复安全告警问题 () 2024-11-14 16:15:03 +08:00
harrywan
8530183c21 chore: v3.4.3 2024-11-12 11:15:25 +08:00
harrywan
a676eeaac0 chore: v3.4.3 2024-11-12 11:15:25 +08:00
harrywan
fb5caa61bc fix: 修复vite配置https无效问题 2024-11-12 11:14:53 +08:00
harrywan
c38ed06a6e fix: 修复vite配置https无效问题 2024-11-12 11:14:53 +08:00
harrywan
616de07763 chore: v3.4.2 2024-11-08 16:22:32 +08:00
harrywan
e6c453cfc9 chore: v3.4.2 2024-11-08 16:22:32 +08:00
harrywan
dfe2ca4b89 feat: 修复乾坤问题 2024-11-08 16:21:01 +08:00
harrywan
df8dce5f42 feat: 修复乾坤问题 2024-11-08 16:21:01 +08:00
harrywan
1d22690174 chore: v3.4.1 2024-10-28 12:37:07 +08:00
harrywan
8e2d18c311 chore: v3.4.1 2024-10-28 12:37:07 +08:00
harrywan
6957e5c2c7 fix: 修复依赖问题 2024-10-28 12:36:42 +08:00
harrywan
edbbb8e84d fix: 修复依赖问题 2024-10-28 12:36:42 +08:00
harrywan
218e1b32fd chore: v3.4.0 2024-10-24 09:36:24 +08:00
harrywan
6b1bf23aff chore: v3.4.0 2024-10-24 09:36:24 +08:00
听海
a303e171c9
feat: 暴露语言变化事件 & layout的title支持配置国际化 ()
* feat: layout的title支持国际化

* feat: locale插件暴漏onLocaleChange事件

* chore: change docs

* fix: 去掉无用代码

---------

Co-authored-by: winixt <haizekuo@gmail.com>
2024-10-23 18:58:36 +08:00
听海
32dbd1ecf9 feat: 暴露语言变化事件 & layout的title支持配置国际化 ()
* feat: layout的title支持国际化

* feat: locale插件暴漏onLocaleChange事件

* chore: change docs

* fix: 去掉无用代码

---------

Co-authored-by: winixt <haizekuo@gmail.com>
2024-10-23 18:58:36 +08:00
harrywan
db358576e8 chore: v3.3.2 2024-10-23 11:26:12 +08:00
harrywan
456de69a45 chore: v3.3.2 2024-10-23 11:26:12 +08:00
harrywan
47b32a2767 fix(plugin-locale): 修复默认语言取值问题 2024-10-23 11:25:00 +08:00
harrywan
4501868510 fix(plugin-locale): 修复默认语言取值问题 2024-10-23 11:25:00 +08:00
听海
66a8572ed6
feat: 修复xss漏洞 () 2024-10-21 15:42:03 +08:00
听海
bf86a5f745 feat: 修复xss漏洞 () 2024-10-21 15:42:03 +08:00
harrywan
eda6fba09c fix: 修复国际化配置问题 2024-10-16 15:29:52 +08:00
harrywan
831a6c6c6e fix: 修复国际化配置问题 2024-10-16 15:29:52 +08:00
harrywan
743e863285 fix: 修复语言插件问题 2024-10-15 18:52:05 +08:00
harrywan
d530b62063 fix: 修复语言插件问题 2024-10-15 18:52:05 +08:00
winixt
13adf83c61 chore: v3.3.1 2024-10-12 10:36:00 +08:00
winixt
ebb7a4ed52 chore: v3.3.1 2024-10-12 10:36:00 +08:00
Rookie
11c392d3d1
fix: v-access指令无法控制元素展示隐藏 ()
Co-authored-by: cwsong4 <cwsong4@iflytek.com>
2024-10-12 10:20:41 +08:00
Rookie
ef13a4dba5 fix: v-access指令无法控制元素展示隐藏 ()
Co-authored-by: cwsong4 <cwsong4@iflytek.com>
2024-10-12 10:20:41 +08:00
听海
df36be4671
fix: 修复清空父应用状态,子应用状态未清空问题 () 2024-10-12 10:12:25 +08:00
听海
57d9df85d0 fix: 修复清空父应用状态,子应用状态未清空问题 () 2024-10-12 10:12:25 +08:00
qlin
314dc2133b
feat: 403 404 页面文案可配置 () 2024-10-12 10:08:08 +08:00
qlin
ba04e97fa7 feat: 403 404 页面文案可配置 () 2024-10-12 10:08:08 +08:00
harrywan
cfa522a3d3 chore: v3.3.0 2024-09-18 14:19:39 +08:00
harrywan
76b291a4a5 chore: v3.3.0 2024-09-18 14:19:39 +08:00
听海
35328603c6
refactor: 完善useLayout () 2024-09-18 14:09:24 +08:00
听海
b61df95535 refactor: 完善useLayout () 2024-09-18 14:09:24 +08:00
harrywan
7c00f3defd feat: 默认 2024-09-13 16:36:33 +08:00
harrywan
b7b7642709 feat: 默认 2024-09-13 16:36:33 +08:00
harrywan
aab25d58db Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2024-09-12 14:32:55 +08:00
harrywan
6adea9dcd7 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2024-09-12 14:32:55 +08:00
harrywan
b66535831e feat: 规范pnpm版本 2024-09-12 14:32:23 +08:00
harrywan
a7d9e12745 feat: 规范pnpm版本 2024-09-12 14:32:23 +08:00
winixt
ebecd859b6 chore: v3.2.1 2024-09-08 16:45:36 +08:00
winixt
3f14936d12 chore: v3.2.1 2024-09-08 16:45:36 +08:00
qlin
95a1e07c6a
fix: fes layout 添加 route name, 用于动态路由创建 () 2024-09-08 16:44:51 +08:00
qlin
e31f81b4e9 fix: fes layout 添加 route name, 用于动态路由创建 () 2024-09-08 16:44:51 +08:00
harrywan
9298cf1485 docs: 更新文档 2024-09-05 15:09:08 +08:00
harrywan
5d25b0630d docs: 更新文档 2024-09-05 15:09:08 +08:00
harrywan
e2e5fa9496 feat: 更新文档 2024-09-05 15:01:59 +08:00
harrywan
32ce77605e feat: 更新文档 2024-09-05 15:01:59 +08:00
harrywan
7e6435bb36 chore: v3.2.0 2024-09-04 15:29:12 +08:00
harrywan
ac8554fd92 chore: v3.2.0 2024-09-04 15:29:12 +08:00
harrywan
0a78b72fdf feat: plugin-layout的页签信息支持国际化 2024-09-04 15:27:44 +08:00
harrywan
fd53acb3fa feat: plugin-layout的页签信息支持国际化 2024-09-04 15:27:44 +08:00
harrywan
6d64a0997a chore: v3.1.16 2024-09-04 09:55:14 +08:00
harrywan
e125f93d92 chore: v3.1.16 2024-09-04 09:55:14 +08:00
harrywan
77d2b09121 fix: 优化svg不能去掉fill等属性 2024-09-04 09:54:42 +08:00
harrywan
dd1897a4da fix: 优化svg不能去掉fill等属性 2024-09-04 09:54:42 +08:00
harrywan
46f28d6c76 chore: v3.1.15 2024-08-27 19:46:58 +08:00
harrywan
191ea810d2 chore: v3.1.15 2024-08-27 19:46:58 +08:00
harrywan
032b5d464c fix(plugin-locale):修复导出函数t 2024-08-27 19:42:55 +08:00
harrywan
11d4e68d60 fix(plugin-locale):修复导出函数t 2024-08-27 19:42:55 +08:00
winixt
c180b3fa4c chore: v3.1.14 2024-08-15 17:54:06 +08:00
winixt
b68384a027 chore: v3.1.14 2024-08-15 17:54:06 +08:00
winixt
7815fc1e8e fix: remove comment 2024-08-15 17:52:27 +08:00
winixt
c214538db3 fix: remove comment 2024-08-15 17:52:27 +08:00
winixt
e5b42a094d chore: v3.1.13 2024-08-15 15:37:24 +08:00
winixt
6ea5ba0da1 chore: v3.1.13 2024-08-15 15:37:24 +08:00
qlin
d2909d4ebb
refactor: 优化 dev server ip监听 () 2024-08-15 10:28:16 +08:00
qlin
c1718892e4 refactor: 优化 dev server ip监听 () 2024-08-15 10:28:16 +08:00
qlin
5f305e53ae
fix: 修复 vuex 插件没有 store 目录报错问题 () 2024-07-17 10:18:08 +08:00
qlin
8b7a41fbb4 fix: 修复 vuex 插件没有 store 目录报错问题 () 2024-07-17 10:18:08 +08:00
harrywan
6dc7114eea chore: v3.1.12 2024-05-30 15:40:44 +08:00
harrywan
53830bca5f chore: v3.1.12 2024-05-30 15:40:44 +08:00
harrywan
56f6120f88 feat: plugin-access中导出hasAccessSync方法 2024-05-30 15:39:53 +08:00
harrywan
9c01a5437d feat: plugin-access中导出hasAccessSync方法 2024-05-30 15:39:53 +08:00
1zumii
db99bb9bc4 chore: v3.1.11 2024-05-24 15:02:22 +08:00
1zumii
5c516953b8 chore: v3.1.11 2024-05-24 15:02:22 +08:00
ocean_gao
d87baedac0
feat: plugin-layout 支持顶部导航栏父菜单没有配置跳转链接的情况 ()
* feat: plugin-layout 兼容顶部导航栏父菜单没有配置跳转链接的情况

* feat(plugin-layout): 代码逻辑优化
2024-05-24 11:09:41 +08:00
ocean_gao
2631438f0a feat: plugin-layout 支持顶部导航栏父菜单没有配置跳转链接的情况 ()
* feat: plugin-layout 兼容顶部导航栏父菜单没有配置跳转链接的情况

* feat(plugin-layout): 代码逻辑优化
2024-05-24 11:09:41 +08:00
1zumii
4ed0366cd6 chore: v3.1.10 2024-05-21 16:53:44 +08:00
1zumii
ec5156c34a chore: v3.1.10 2024-05-21 16:53:44 +08:00
ocean_gao
8375fe9be7
feat(plugin-layout): 增加 top-left 布局类型 () 2024-05-21 15:17:33 +08:00
ocean_gao
e0adcf868b feat(plugin-layout): 增加 top-left 布局类型 () 2024-05-21 15:17:33 +08:00
letgo
ed561d7e3c chore: v3.1.9 2024-05-08 15:15:14 +08:00
letgo
323497c9b3 chore: v3.1.9 2024-05-08 15:15:14 +08:00
letgo
f337e69f3e fix: login 插件获取配置问题 2024-05-08 15:14:46 +08:00
letgo
d8ff6aacf3 fix: login 插件获取配置问题 2024-05-08 15:14:46 +08:00
winixt
c0723990c7 chore: v3.1.8 2024-05-06 15:15:31 +08:00
winixt
d87f0ed5e9 chore: v3.1.8 2024-05-06 15:15:31 +08:00
qlin
c7e7efaa31
fix: login 兼容不同的 request 版本 ()
* fix: login 兼容不同的 request 版本

* chore: upgrade request
2024-05-06 15:14:26 +08:00
qlin
36cc169ffe fix: login 兼容不同的 request 版本 ()
* fix: login 兼容不同的 request 版本

* chore: upgrade request
2024-05-06 15:14:26 +08:00
1zumii
1b0d3409bb
fix(plugin-access): 修复切换角色时,getAccess 不正确 () 2024-04-29 10:47:09 +08:00
1zumii
7e9cb618f0 fix(plugin-access): 修复切换角色时,getAccess 不正确 () 2024-04-29 10:47:09 +08:00
winixt
5a041f0882 chore: v3.1.7 2024-03-28 18:29:54 +08:00
winixt
06c8633f3d chore: v3.1.7 2024-03-28 18:29:54 +08:00
qlin
c369572c41
fix: 解决 reqeust 生成文件流的问题 () 2024-03-28 18:27:40 +08:00
qlin
3bc59652a0 fix: 解决 reqeust 生成文件流的问题 () 2024-03-28 18:27:40 +08:00
harrywan
0f672afd3b chore: v3.1.6 2024-03-21 16:20:18 +08:00
harrywan
7fe26ae3ac fix: 修复DefaultContainer中找不到defineComponent问题 2024-03-21 16:17:44 +08:00
winixt
76b1a5152f chore: v3.1.5 2024-03-13 10:34:03 +08:00
qlin
ad9de027b4
fix: 修复 webpack 构建 publicPath 使用相对路径,导致 css 里面依赖资源路径异常问题 () 2024-03-08 15:08:07 +08:00
qlin
a4728bdc9f
docs: 修改文案 () 2024-02-29 20:11:52 +08:00
winixt
1568398471 chore: v3.1.4 2024-02-27 20:22:03 +08:00
1zumii
e8aad1fbc1
feat(plugin-layout): 调整 layout: aside 的 logo 布局 () 2024-02-22 14:42:55 +08:00
1zumii
e4b4d0939d
fix(plugin-layout): 403、404 样式优化,防止被覆盖 () 2024-02-22 14:42:36 +08:00
Shaobo Lua
3de08bc024
fix(fes): [hackFesInBuild] fix issues ()
Co-authored-by: neo.st.fox <neo.st.fox@outlook.com>
2024-02-21 19:33:39 +08:00
qlin
cca6223477
fix: 优化类型 () 2024-02-19 16:14:28 +08:00
winixt
5a4b4587f1 chore: v3.1.3 2024-01-24 21:23:33 +08:00
qlin
20303cfec9
fix: webpack 丢失 publicPath () 2024-01-24 21:22:22 +08:00
qlin
5c7bdca371
feat: [plugin-local] 添加 getLocal API 获取当前用户选择的语言 () 2024-01-24 16:44:27 +08:00
winixt
c7496eab6e docs: 优化 request 文档 2024-01-18 19:14:23 +08:00
winixt
157c1d8caa chore: v3.1.2 2024-01-13 11:28:16 +08:00
winixt
2316ea3473 chore: upgrade postcss 2024-01-13 11:26:45 +08:00
1zumii
74fa0ba122
feat(plugin-layout): 支持配置 403、404 的 navigation ()
* feat: 升级 eslint 配置及版本

* feat(plugin-layout): 支持配置 403、404  的 navigation

* docs: 补充文档
2024-01-12 12:43:57 +08:00
winixt
14d7f6eaad fix: 关闭 vite 告警 2024-01-02 17:26:02 +08:00
winixt
098d175ddf docs: update docs: 2023-12-27 17:51:02 +08:00
qlin
3223a20600
Feat use layout ()
* style: format code

* feat: 添加 useLayout 暴露 closeTab 的能力
2023-12-18 20:22:31 +08:00
winixt
a3e931bacf chore: v3.1.1 2023-12-14 19:14:28 +08:00
harrywan
3b7000a0dd chore: v3.1.0 2023-12-14 14:31:07 +08:00
qlin
fec7a8f1ae
feat: 升级 vite5 ()
* feat: 升级 vite5

* fix: 优化 webpack publicPath

* fix: 优化文档

* chore: remove log

* chore: remove 无效代码
2023-12-14 14:28:02 +08:00
winixt
fb54913109 chore: v3.0.19 2023-11-11 14:41:07 +08:00
听海
e556fc342e
fix: 修复vite构建时public下的html文件无法正常访问问题 () 2023-11-11 14:39:41 +08:00
winixt
b37392ac60 chore: v3.0.18 2023-11-08 21:02:22 +08:00
winixt
2e0162984a fix: 添加默认 responseType 配置 2023-11-08 20:57:14 +08:00
qlin
04e745fa72
docs: 优化 request 文档 () 2023-10-30 14:28:01 +08:00
winixt
f86b7175f6 chore: v3.0.17 2023-10-24 18:56:27 +08:00
qlin
3e580dbed9
fix: 优化依赖 () 2023-10-24 18:34:53 +08:00
wanchun
585235697a chore: v3.0.16 2023-09-18 18:05:18 +08:00
听海
7e0d5ab991
feat: 国际化支持模块化配置 () 2023-09-15 14:33:42 +08:00
听海
33b76940d8
fix: 处理create-fes-app中丢失.npmrc问题 & 升级plugin-jest支持tsx? () 2023-09-14 14:15:10 +08:00
wanchun
c7dc4363df chore: v3.0.15 2023-08-28 11:06:08 +08:00
听海
4955ae1841
feat: plugin-layout不强依赖plugin-access () 2023-08-28 10:24:52 +08:00
winixt
612c75ac64 chore: v3.0.14 2023-08-25 14:47:13 +08:00
qlin
15a2b99df2
feat: plugin request 添加版本导出 () 2023-08-25 11:21:34 +08:00
winixt
080218c183 chore: v3.0.13 2023-08-24 11:31:05 +08:00
qlin
fdaf1fde73
feat: plugin access 添加 getRole 接口 () 2023-08-23 19:11:08 +08:00
wanchun
862b229158 chore: v3.0.12 2023-08-14 20:11:30 +08:00
izumiiAoba
7c6c662837
fix(plugin-access): 修复 useAccess 类型定义 () 2023-08-14 10:27:34 +08:00
winixt
617a36e461 docs: 优化 layout 文档 2023-08-03 16:41:03 +08:00
winixt
c626d80950 docs: update lock 2023-08-03 16:12:11 +08:00
winixt
d668d06dc8 docs: 优化文档构建 2023-08-03 16:08:41 +08:00
izumiiAoba
61fa8be45e
fix(plugin-access): 补充 RuntimeConfig['access'] 字段 () 2023-08-01 16:06:50 +08:00
winixt
55e87e5d68 ci: release request beta.2 2023-07-27 12:38:44 +08:00
winixt
699f99887d chore: update peerDep 2023-07-27 12:34:18 +08:00
izumiiAoba
b0357e9fdb
fix(plugin-layout): 修复 Menu、CustomNaviGuard 类型 () 2023-07-26 16:22:36 +08:00
wanchun
6f89223a9d chore: v3.0.11 2023-07-10 18:08:02 +08:00
wanchun
f45944b6db fix: 优化ts提示 2023-07-10 18:06:31 +08:00
wanchun
2892871b25 chore: v3.0.10 2023-06-29 14:47:23 +08:00
听海
c5a6e7b348
fix: 修复plugin-layout中body的top计算问题 () 2023-06-28 15:00:08 +08:00
winixt
fbcde25789 chore: v3.0.9 2023-06-16 11:17:43 +08:00
qlin
ebfdea7522
fix: 修复 vite html 配置问题 ()
* fix: 修复 vite html 配置问题

* chore: lock @babel/preset-env
2023-06-16 11:11:11 +08:00
qlin
6b6e703c54
Fix upgrade webpack ()
* fix: 修复 webpack 5.86.0 处理 iframe 异常问题

* fix: 修复 webpack 5.86.0 处理 iframe 异常问题
2023-06-16 10:44:07 +08:00
winixt
7b2319eca3 chore: v3.0.8 2023-06-14 15:16:35 +08:00
qlin
bbb4db750d
fix: 修复 request 初始化问题 () 2023-06-14 15:11:43 +08:00
winixt
5cadb75cdb chore: v3.0.7 2023-06-09 17:41:44 +08:00
qlin
9c57f9c7e5
fix: 删去 webpack dev overlay 全屏弹窗 () 2023-06-08 11:18:43 +08:00
qlin
3c1290fc58
feat: 增加配置控制全局样式加载顺序 ()
* docs: remove pwa

* fix: 全局样式覆盖问题

* fix: 修复全局样式加载顺序问题

* chore: 优化代码
2023-06-02 10:59:31 +08:00
wanchun
48c0e0693a Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2023-04-25 12:32:31 +08:00
wanchun
d5b014ecc5 fix(plugin-layout): 默认路由如果不是菜单,则不需要添加到expandedKeys中,否则会导则defaultExpandAll不生效 2023-04-25 12:32:04 +08:00
winixt
4b2689c5eb docs: fix docs deploy 2023-04-24 15:59:04 +08:00
winixt
f4e4bde755 docs: fix docs build problem 2023-04-24 15:34:50 +08:00
wanchun
2be3cffcb6 chore: v3.0.6 2023-04-24 15:12:50 +08:00
qlin
70db98e617
docs: 切换使用vitepress ()
* sdf

* docs: 优化文档

* fix: webpack 编译失败问题

---------

Co-authored-by: wanchun <445436867@qq.com>
2023-04-24 14:41:41 +08:00
听海
1fb871da09
fix: 修复设置extraCSS为false时关闭压缩css错误 ()
* feat: mini-css-extract-plugin支持配置

* fix: 修复设置extraCSS为false时关闭压缩css错误
2023-04-24 14:28:22 +08:00
听海
92fa1919b7
feat: mini-css-extract-plugin支持配置 () 2023-04-23 19:49:38 +08:00
听海
d0c05b77bb
docs: update readme 2023-04-18 17:48:54 +08:00
wanchun
82a9444f09 chore: v3.0.5 2023-04-17 14:37:08 +08:00
RiESAEX
b65b02fd02
chore: bump swc () 2023-04-14 15:34:19 +08:00
qlin
594fd966df
docs: 优化文档 () 2023-04-12 16:03:07 +08:00
wanchun
f680a6a51c chore: v3.0.4 2023-04-11 20:40:29 +08:00
听海
29f925b644
fix: 完善路由文件命名提示 & 保证403和404路由一直有权限 ()
* fix: 完善提示

* refactor: 切换路由都判断下403和404保证他们有权限
2023-04-11 20:38:54 +08:00
qlin
a670c5e10e
chore: upgrade swc-plugin-vue-jsx () 2023-04-11 16:45:14 +08:00
wanchun
57ed444573 feat: 更新fes版本,保持跟fes-buitin同步 2023-04-11 15:57:46 +08:00
wanchun
726c298428 chore: v3.0.3 2023-04-11 15:52:39 +08:00
听海
a5d422ea04
fix: 修复layout菜单折叠不更新状态问题 ()
* fix: 修复layout菜单折叠不更新状态问题

* fix: 修复accessApi.setAccess['/403']执行多次问题

* feat: 手动切换当前路由,菜单也会自动展开

* fix: 修复menu问题
2023-04-11 15:38:51 +08:00
wanchun
eb4c2d92f9 docs: pages 2023-04-10 15:12:01 +08:00
wanchun
5f766c6383 docs: 解决pages问题 2023-04-10 14:50:09 +08:00
wanchun
909c32c0a0 ci: 升级本地pnpm 2023-04-10 14:33:16 +08:00
听海
c3969f8d87
feat: 添加[...slug].vue方式替换*.vue实现模糊匹配 () 2023-04-07 20:46:33 +08:00
wanchun
a6a4f36162 chore: v3.0.2 2023-04-06 10:14:23 +08:00
听海
43496ef307
feat(plugin-layout): custom插槽支持 menus 参数 & 重构403、404逻辑 ()
* feat(plugin-layout): custom插槽添加menus参数

* refactor: 403/404默认显示layout,在pages目录下创建404.vue/403.vue可覆盖默认

* refactor(plugin-layout): 优化index.jsx

n

* fix: 403/404添加title
2023-04-06 10:07:29 +08:00
听海
d11095355f
fix: 修复plugin-locale类型问题 ()
* fix: 修复plugin-locale类型问题

* ci: 添加codeReview action & pr模板
2023-04-03 20:49:30 +08:00
winixt
31e954e322 docs: update README 2023-04-01 16:03:58 +08:00
winixt
e0cfbeb359 chore: v3.0.1 2023-04-01 16:00:46 +08:00
winixt
21c404aa07 feat: change request to fetch 2023-04-01 15:59:37 +08:00
winixt
35be9b4aa6 docs: 优化 docs 2023-04-01 15:45:51 +08:00
winixt
453b500c28 chore: v3.0.1-0 2023-04-01 15:22:50 +08:00
winixt
8263cf2b60 ci: 修复 release 异常 2023-04-01 15:21:28 +08:00
winixt
ac75e433ae ci: 修复文档发布 2023-04-01 15:06:29 +08:00
winixt
9ea0bf93ca chore: fix conflict 2023-03-31 22:03:57 +08:00
winixt
209723445d chore: upgrade webpack-chain 2023-03-31 21:09:21 +08:00
winixt
e80ede772b docs: update docs deploy 2023-03-31 18:27:14 +08:00
winixt
852aad294c feat: 对齐 webpack 和 vite 文件输出 2023-03-31 18:22:55 +08:00
wanchun
ee2e79c004 docs: 添加pages action 2023-03-31 16:03:15 +08:00
winixt
d35e066472 docs: change docs publich path 2023-03-31 15:31:17 +08:00
wanchun
e808556385 feat: template改为使用workspace协议 2023-03-31 14:54:36 +08:00
wanchun
c87be8a788 feat: 增加bootstrap和clean命令 2023-03-31 14:41:08 +08:00
wanchun
bafa4d08cc feat: 优化peer依赖 2023-03-31 14:38:43 +08:00
wanchun
679b5ce3be feat: 优化一些demo 2023-03-31 14:14:35 +08:00
winixt
902fbc9283 ci: change docs ci 2023-03-30 21:33:59 +08:00
winixt
18bed3368e chore: 优化输出模版 2023-03-30 21:28:48 +08:00
winixt
b0c764f75a docs: 优化文档版本依赖 2023-03-30 21:24:12 +08:00
winixt
49063482eb chore: 3.0 发版本前奏 2023-03-30 21:16:04 +08:00
winixt
3caaf58afb fix: request cache 类型声明问题 2023-03-30 16:27:24 +08:00
听海
07b1d844f0
fix(built-in): 规范 beforeRender 逻辑,如果异常,则不应该执行后续的 router.beforeEach ()
* fix: 修复watermark插件类型问题

* fix(built-in): 避免在beforeRender action中操作路由或者location.href,构建后会出现卡死

* feat: 换更合理的方式
2023-03-30 14:57:39 +08:00
wanchun
fdf548d6c3 fix: 修复watermark插件类型问题 2023-03-28 14:10:03 +08:00
winixt
c162749eae chore(release): publish
- @fesjs/preset-built-in@2.1.10
 - @fesjs/fes@2.1.10
2023-03-23 19:13:54 +08:00
听海
d258a274ba
feat: 给使用mini-css-extract-plugin增加开关 ()
* feat: 给使用mini-css-extract-plugin增加开关

* fix: add inlineLimit

* fix: useExtraCSS 名称异常

---------

Co-authored-by: winixt <haizekuo@gmail.com>
2023-03-23 19:13:02 +08:00
winixt
18886b3067 chore(release): publish
- @fesjs/preset-built-in@2.1.9
 - @fesjs/fes@2.1.9
2023-03-17 21:07:18 +08:00
qlin
ad352f2b44
fix: 解决 webpack 安全漏洞问题 () 2023-03-17 21:05:36 +08:00
wanchun
828a58d885 chore: v3.0.0-rc.17 2023-03-17 15:21:12 +08:00
wanchun
e7987ee60f fix: 水印插件兼容微前端场景,应用唯一 2023-03-15 17:55:21 +08:00
wanchun
9ce69ebe10 chore: v3.0.0-rc.16 2023-03-14 15:03:11 +08:00
wanchun
b1adca9f11 fix: 修复plugin-access和plugin-layout中noFoundHandler和unAccessHandler的类型错误问题 2023-03-14 14:56:07 +08:00
wanchun
425a04568b docs: 更新demo 2023-03-14 14:07:37 +08:00
wanchun
16c4264707 chore: v3.0.0-rc.15 2023-03-13 20:31:35 +08:00
听海
fc4173a7e8
feat(plugin-layout): 多页签支持配置title ()
* feat(plugin-layout): 多页签支持配置title

* feat: 更改参数名 & 关闭页面清数据

* docs: 更新文档

* docs: 更新文档
2023-03-13 20:28:03 +08:00
听海
7c432badf6
fix: 修复其他dom变化也会导致水印重新渲染的问题 () 2023-03-13 20:27:47 +08:00
winixt
f254158b31 chore: v3.0.0-rc.14 2023-03-06 16:10:50 +08:00
听海
943ffba07f
fix: 修复plugin-layout中计算默认展开菜单未考虑未配置在菜单的路由场景 () 2023-03-06 16:06:27 +08:00
wanchun
04a605ab77 docs: 更新qiankun的demo 2023-03-02 16:03:06 +08:00
wanchun
6d6b03bbd3 chore: v3.0.0-rc.13 2023-03-01 17:53:27 +08:00
wanchun
62a0333d49 Merge branch 'RiESAEX-swc' into next 2023-03-01 17:52:01 +08:00
wanchun
9295b91370 Merge branch 'swc' of https://github.com/RiESAEX/fes.js into RiESAEX-swc 2023-03-01 17:51:35 +08:00
wanchun
f823a8cf5e fix: 固定corejs版本吧 2023-03-01 17:30:33 +08:00
wanchun
3211408133 feat: 升级swc版本 2023-03-01 17:02:22 +08:00
wanchun
e05fb32a76 feat: plugin-swc 2023-03-01 16:29:42 +08:00
winixt
8fd114c8fe chore: v3.0.0-rc.12 2023-02-27 14:32:40 +08:00
winixt
159fcf013b fix: 修复 ts 类型声明问题 2023-02-27 14:29:37 +08:00
winixt
75b32b7dd0 chore: v3.0.0-rc.11 2023-02-21 20:08:15 +08:00
winixt
5d537c55c0 fix: .d.ts 类型异常 2023-02-21 20:05:25 +08:00
wanchun
d797f85ad5 chore: v3.0.0-rc.10 2023-02-21 16:42:16 +08:00
听海
e3bd573429
fix: layout插件菜单会自动展开当前路由 & 修复之前不合理用法 () 2023-02-21 16:20:21 +08:00
RiESAEX
db6f2799ef revert: devtool 2023-02-13 08:23:20 +00:00
RiESAEX
9d6b32be88 fix: keep browsers 2023-02-13 08:17:29 +00:00
RiESAEX
bda1bb4cf5 fix: minify 2023-02-08 07:46:42 +00:00
wanchun
b0a4fc5bb4 Merge branch 'next' of https://github.com/WeBankFinTech/fes.js into next 2023-01-30 14:32:55 +08:00
wanchun
d87a7815e8 docs: 优化plugin-layout文档 2023-01-30 14:30:39 +08:00
winixt
83827d3f3c chore: v3.0.0-rc.9 2023-01-30 12:51:35 +08:00
qlin
a1cbdb558f
fix: fix login plugin build error () 2023-01-30 12:45:31 +08:00
RiESAEX
b3555770a6 chore: update swc 2023-01-17 08:46:04 +00:00
winixt
ae61e7660a chore: v3.0.0-rc.8 2023-01-11 15:54:29 +08:00
qlin
8332b1114c
feat: 添加 login 插件 ()
* feat: 添加 login 插件

* docs: 优化 access docs 文档

* refactor: beforeRender迁移到router创建后

* fix: 修复清除webpack-cache问题

* refactor: 优化 plugin 插件

Co-authored-by: wanchun <445436867@qq.com>
2023-01-11 15:51:43 +08:00
winixt
d5340faebf chore(release): publish
- @fesjs/preset-built-in@2.1.8
 - @fesjs/fes@2.1.8
2023-01-10 18:02:24 +08:00
winixt
a7ed9297d4 fix: build cache 2023-01-10 18:01:52 +08:00
winixt
937adce18a chore: v3.0.0-rc.7 2023-01-06 20:06:11 +08:00
winixt
4dba1f31ed chore(release): publish
- @fesjs/create-fes-app@2.2.3
 - @fesjs/preset-built-in@2.1.7
 - @fesjs/fes@2.1.7
2023-01-06 20:00:48 +08:00
qlin
ab4cc6a5a8
fix: webpack 缓存不断叠加 () 2023-01-06 17:44:30 +08:00
qlin
a9fae0fa7d
fix: 解决 webpack 缓存问题 ()
* fix: 解决 webpack 缓存问题

* refactor: 优化清理代码
2023-01-06 17:30:22 +08:00
RiESAEX
bca727338b feat: 只在prod开压缩 2023-01-06 08:56:44 +00:00
RiESAEX
862ba3cf9c fix: cjs 2022-12-29 08:18:33 +00:00
RiESAEX
2d92ad883f fix: swc/css 2022-12-29 08:18:09 +00:00
RiESAEX
c4fd1f6fea fix: swc/css 2022-12-29 08:16:45 +00:00
qlin
bb51ba18ad
fix: 解决 core-js 版本问题 () 2022-12-28 16:39:59 +08:00
qlin
eee453b601
fix: 解决 core-js 版本问题 () 2022-12-28 16:34:39 +08:00
RiESAEX
6e5bfbca93 docs: swc 2022-12-28 02:39:51 +00:00
RiESAEX
f5dddd7700 feat: log more error 2022-12-28 02:17:58 +00:00
RiESAEX
0e05f23bc1 fix: rm swc/css 2022-12-28 02:17:44 +00:00
RiESAEX
8ef9a1c862 fix: css 2022-12-27 08:59:06 +00:00
RiESAEX
acb27c4c91 fix: targets 2022-12-27 08:58:45 +00:00
RiESAEX
92041845c6 fix: exclude 2022-12-27 07:01:15 +00:00
RiESAEX
a9c8469b95 feat: swc/css 2022-12-27 06:41:30 +00:00
RiESAEX
3c7edefc62 feat: use swc with webpack 2022-12-27 06:41:30 +00:00
Aresn
7d8af0392b
增加了 Cloud IDE 在线预览链接 ()
* Create preview.yml

* Update README.md

* Update README.en-US.md
2022-12-23 10:00:23 +08:00
RiESAEX
22000e4f9c
feat(build script): generate sourcemap for developer () 2022-12-23 09:59:42 +08:00
winixt
7e6bf89118 chore: v3.0.0-rc.6 2022-12-11 16:58:03 +08:00
qlin
3b0ab19bf1
feat: upgrade vite4.x () 2022-12-11 16:57:18 +08:00
wanchun
474e62aef8 chore: v3.0.0-rc.5 2022-12-07 10:22:28 +08:00
听海
42b83cc54f
feat: 支持配置选择vite () 2022-12-07 10:20:39 +08:00
wanchun
ca039ff85d docs: 修正文档 2022-12-05 14:26:17 +08:00
wanchun
84beaadc82 chore: v3.0.0-rc.4 2022-11-29 11:15:06 +08:00
听海
5c44181fcd
feat: qiankun插件支持vite ()
* feat: qiankun支持vite

* fix: 优化根据meta创建qiankun子路由逻辑

* refactor: 优化模板代码
2022-11-29 11:12:51 +08:00
winixt
a3569bf1b0 chore: v3.0.0-rc.3 2022-11-25 12:31:59 +08:00
winixt
9a518bcb95 fix: 修复 windows 兼容问题 2022-11-25 11:20:29 +08:00
winixt
aec267f83f fix: 修复 viteLegacy 配置问题 2022-11-24 14:54:22 +08:00
winixt
b6ba33df6e fix: remove Created by MumbleFE 2022-11-21 10:49:18 +08:00
winixt
7649895c77 chore: 优化 create-fes-app 2022-11-20 17:51:41 +08:00
wanchun
518141f4b9 docs: 更换联系图片 2022-11-18 12:29:25 +08:00
wanchun
d2dab3b136 docs: 更换联系人图片地址 2022-11-18 12:27:16 +08:00
wanchun
aab3080a1d docs: 更新文档 2022-11-18 11:13:51 +08:00
听海
4032691e1c
docs: 更新文档 2022-11-18 11:06:15 +08:00
winixt
688e6a3ff1 chore: v3.0.0-rc.2 2022-11-17 19:52:39 +08:00
winixt
03e98ac667 fix: 导出 RequestOptions 类型 2022-11-17 19:50:29 +08:00
wanchun
907879eac5 docs: 增加backToTop插件 2022-11-17 16:46:01 +08:00
wanchun
3660291e14 docs: 升级vuepress和修复文档配置 2022-11-17 16:37:46 +08:00
wanchun
4d23b483cc chore: 更新版本号 2022-11-17 15:54:01 +08:00
wanchun
b4443889d4 docs: 更新文档 2022-11-17 15:53:21 +08:00
wanchun
6f3d8e5bb5 chore: vuepres锁死版本 2022-11-17 15:52:35 +08:00
wanchun
8306d8a018 docs: 更新文档 2022-11-17 15:45:22 +08:00
wanchun
835e732897 chore: 使用yarn打包文档 2022-11-17 15:44:23 +08:00
wanchun
554242139a docs: 更新文档 2022-11-17 15:39:14 +08:00
wanchun
496b9fe5da chore: 使用pnpm打包文档 2022-11-17 15:35:28 +08:00
wanchun
0f5df8d42e docs: 更新文档 2022-11-17 14:48:12 +08:00
wanchun
c375df86f7 Merge branch 'next' of https://github.com/WeBankFinTech/fes.js into next 2022-11-17 14:45:59 +08:00
wanchun
6e88e90a9d docs: 更新文档 2022-11-17 14:45:31 +08:00
winixt
8f7d682065 chore: v3.0.0-beta.32 2022-11-15 15:30:49 +08:00
winixt
246900923a fix: 修复 request ts 类型提示问题 2022-11-15 15:30:13 +08:00
winixt
a3847f167a chore: v3.0.0-beta.31 2022-11-10 19:48:33 +08:00
winixt
9852fd3f55 chore: upgrade vertion to rc 2022-11-10 19:46:40 +08:00
winixt
6aa4dfbed3 chore: v3.0.0-beta.30 2022-11-10 19:26:09 +08:00
winixt
e7d6d94e92 ci: 解决 release 异常 2022-11-10 19:18:22 +08:00
听海
104571b2a4
feat: 路由支持配置base & plugin-locale插件legacy默认false ()
* feat: 路由支持配置base & plugin-locale插件legacy默认false

* docs: 修改文档
2022-11-10 19:08:35 +08:00
qlin
92e154e48b
fix: 解决 ts 提示问题 () 2022-11-10 17:48:34 +08:00
winixt
8d4f8c1321 chore: v3.0.0-beta.29 2022-11-09 17:34:51 +08:00
winixt
cb1af88de6 fix: 优化类型声明 2022-11-09 17:33:47 +08:00
winixt
f1523d5636 chore: v3.0.0-beta.28 2022-11-07 19:36:51 +08:00
winixt
f2d4fad682 docs: 更换 logo 2022-10-31 16:51:44 +08:00
winixt
e4f3dff7fa fix: 修复 icon-plugin viewBox 删除问题 2022-10-27 19:46:24 +08:00
winixt
1dd0739479 chore(release): publish
- @fesjs/preset-built-in@2.1.6
 - @fesjs/fes@2.1.6
2022-10-27 18:18:14 +08:00
qlin
7cb69d1843
fix: defineRouteMeta parse 异常 ()
* fix: defineRouteMeta parse 异常

* fix: config 不是 json 格式导致 dev 退出
2022-10-27 18:17:39 +08:00
winixt
f8e7105f58 chore(release): publish
- @fesjs/plugin-icon@2.0.8
 - @fesjs/plugin-qiankun@2.1.5
2022-10-27 18:15:15 +08:00
qlin
17ab4f2b79
fix: 修复 fes-icon 删除 viewBox 导致异常问题 () 2022-10-27 18:05:56 +08:00
winixt
a384335534 fix: config 不是 json 格式导致 dev 退出 2022-10-10 16:42:36 +08:00
winixt
76afad7c2d fix: defineRouteMeta parse 异常 2022-10-10 16:23:47 +08:00
winixt
7d73c86e98 chore: v3.0.0-beta.27 2022-10-10 15:31:54 +08:00
winixt
339c81126a fix: qiankun props 异常 2022-10-10 15:30:58 +08:00
qlin
ec1cf5b427
fix: qiankun plugin props error () 2022-10-10 10:38:45 +08:00
winixt
797a07394d chore: v3.0.0-beta.26 2022-09-29 15:34:39 +08:00
winixt
1ed97fdce0 chore: 发布 types.d.ts 2022-09-29 15:33:50 +08:00
winixt
87a59d5d87 docs: 修复 request 文档 2022-09-29 15:25:38 +08:00
winixt
b7ebae0570 chore: v3.0.0-beta.25 2022-09-29 15:20:36 +08:00
winixt
4f85b22c30 fix: runtime 添加 d.ts 2022-09-29 15:18:51 +08:00
winixt
4a306a1cbe chore(release): publish
- @fesjs/create-fes-app@2.2.2
 - @fesjs/plugin-access@2.0.7
 - @fesjs/plugin-enums@2.0.3
 - @fesjs/plugin-icon@2.0.7
 - @fesjs/plugin-layout@4.2.4
 - @fesjs/plugin-locale@3.0.7
 - @fesjs/plugin-model@2.0.6
 - @fesjs/plugin-monaco-editor@2.0.0-beta.7
 - @fesjs/plugin-pinia@2.0.3
 - @fesjs/plugin-qiankun@2.1.4
 - @fesjs/plugin-request@2.0.16
 - @fesjs/plugin-vuex@2.0.6
 - @fesjs/plugin-watermark@2.1.1
 - @fesjs/plugin-windicss@2.0.9
 - @fesjs/preset-built-in@2.1.5
 - @fesjs/runtime@2.0.3
 - @fesjs/fes@2.1.5
2022-09-27 10:26:06 +08:00
winixt
1e1fc7abf0 chore: v3.0.0-beta.24 2022-09-27 10:16:52 +08:00
winixt
2840b462ec fix: js 语法错误导致 dev 退出 2022-09-27 10:15:30 +08:00
qlin
9e3e5c1aca
fix: js 语法错误导致 dev 退出 () 2022-09-27 09:56:12 +08:00
wanchun
d714a64b00 fix: plugin-locale的legacy默认为false, 最新版vue-i18n中设置为true不支持composition api方式 2022-09-26 17:46:47 +08:00
wanchun
7fdc61ab9d chore: v3.0.0-beta.23 2022-09-22 10:16:52 +08:00
听海
0a64739a22
fix: 修复SelectLang.vue的循环依赖问题 () 2022-09-21 20:15:51 +08:00
winixt
fefbdc9b9e chore: v3.0.0-beta.22 2022-09-15 17:37:37 +08:00
winixt
9141e77865 fix: 升级 fes-design 依赖 2022-09-15 17:36:26 +08:00
听海
54ca93028b
Update README.en-US.md 2022-09-07 10:33:57 +08:00
听海
8cf8c685d0
Update README.md 2022-09-07 10:32:42 +08:00
听海
3529c2072f
Update README.md 2022-09-07 10:31:33 +08:00
winixt
c8ec8a19a7 chore: v3.0.0-beta.21 2022-08-26 20:24:35 +08:00
winixt
d9a65d0358 chore: 优化targets 2022-08-26 20:22:04 +08:00
winixt
d0691ca90a fix: 优化构建 2022-08-26 15:22:48 +08:00
winixt
49d64b5179 chore: v3.0.0-beta.20 2022-08-23 17:49:37 +08:00
qlin
dbbf447362
fix: 修复现代浏览器 polyfill 问题 () 2022-08-23 17:41:53 +08:00
winixt
fdf3e83bd2 chore: 优化 ci 2022-08-22 16:00:42 +08:00
winixt
e9d2f1dfe2 chore: 清理无用的 ci 代码 2022-08-21 16:40:56 +08:00
wanchun
20c0fd1003 chore: v3.0.0-beta.19 2022-08-18 10:48:29 +08:00
wanchun
08fd3d45f7 Merge branch 'next' of https://github.com/WeBankFinTech/fes.js into next 2022-08-18 10:44:03 +08:00
wanchun
7b696e41ff fix: 修复plugin-layout把未缓存页面当做undefined丢进缓存列表出现的问题 2022-08-18 10:41:44 +08:00
winixt
9835d951b6 chore: 升级 vue 依赖到最新版本,处理 compile-sfc 和 vue 版本冲突问题 2022-08-17 11:02:50 +08:00
winixt
fa014fdfe7 ci: 优化版本日志输出 2022-08-17 10:53:59 +08:00
winixt
6f2d79c8ca chore: v3.0.0-beta.18 2022-08-17 10:51:19 +08:00
winixt
e71dff50f2 chore: 升级依赖 2022-08-17 10:49:48 +08:00
winixt
1c2900fff6 ci: 修复 release 生成 2022-08-15 15:30:24 +08:00
wanchun
c648a00e08 chore: v3.0.0-beta.17 2022-08-15 10:45:02 +08:00
harrywan
86ff19b3d1
fix(plugin-layout): 打开相同path的链接会更新页签为新的 & 正确触发onActivated ()
* feat: script setup 支持 defineRouteMeta ()

* chore(release): publish

 - @fesjs/preset-built-in@2.1.4
 - @fesjs/fes@2.1.4

* fix: 打开相同path的链接会更新route & 第一次打开会触发onActivated ()

* fix: 打开相同path的链接会更新route & 第一次打开会触发onActivated

* fix: 优化

* chore(release): publish

 - @fesjs/plugin-layout@4.2.3

Co-authored-by: qlin <haizekuo@gmail.com>
2022-08-12 10:19:27 +08:00
wanchun
6f0c1f7416 chore(release): publish
- @fesjs/plugin-layout@4.2.3
2022-08-08 10:22:15 +08:00
harrywan
864904e68d
fix: 打开相同path的链接会更新route & 第一次打开会触发onActivated ()
* fix: 打开相同path的链接会更新route & 第一次打开会触发onActivated

* fix: 优化
2022-08-08 10:21:11 +08:00
winixt
2b0defc918 chore(release): publish
- @fesjs/preset-built-in@2.1.4
 - @fesjs/fes@2.1.4
2022-08-04 19:46:52 +08:00
qlin
05d593e0f8
feat: script setup 支持 defineRouteMeta () 2022-08-04 19:45:39 +08:00
qlin
fa7789653c
feat: 升级 vite3 ()
* feat: 升级 vite3

* fix: 处理 postcss.config.js 不存在的情况
2022-08-03 20:47:50 +08:00
wanchun
68466a9ef6 chore: v3.0.0-beta.16 2022-08-01 14:45:05 +08:00
wanchun
78dc46e653 fix: plugin-qiankun修复主应用更新数据子应用使用useModel可能无法响应问题 2022-08-01 14:39:02 +08:00
wanchun
e28760e927 chore(release): publish
- @fesjs/plugin-qiankun@2.1.3
2022-08-01 14:34:07 +08:00
wanchun
c64bd4844d fix(plugin-qiankun): 修复主应用状态变更后使用useModel没有响应问题 2022-08-01 14:33:31 +08:00
harrywan
29f3cafb74
Update README.md 2022-07-28 11:37:19 +08:00
winixt
a8153d7c53 chore: v3.0.0-beta.15 2022-07-18 15:35:08 +08:00
qlin
ba73ac7ff7
fix: 路由生成支持全数字
* fix: 路由生成支持全数字

* fix: 路由生成支持全数字

* fix: 优化 layout ts

* chore: remove 403 404 page route config
2022-07-18 15:33:27 +08:00
wanchun
eade938092 chore: v3.0.0-beta.14 2022-07-15 10:26:36 +08:00
wanchun
12d43575f9 fix: route path兼容win 2022-07-15 10:26:00 +08:00
wanchun
41e67ca4a0 chore(release): publish
- @fesjs/preset-built-in@2.1.3
 - @fesjs/fes@2.1.3
2022-07-15 10:15:59 +08:00
wanchun
bcce28d567 fix: 修复win下路径问题 2022-07-15 10:15:28 +08:00
wanchun
f7ecafc1c1 docs: 更新文档 2022-07-13 16:43:42 +08:00
wanchun
153f37f7d0 docs: 更新文档 2022-07-13 16:42:45 +08:00
康月牙ritakang
938dc7bf17
Update README.md 2022-07-13 11:21:41 +08:00
wanchun
2aa97202ea feat: 页面路径中目录名为@转化为动态路径 2022-07-08 14:13:42 +08:00
wanchun
9e936067ad chore(release): publish
- @fesjs/preset-built-in@2.1.2
 - @fesjs/fes@2.1.2
2022-07-08 11:01:19 +08:00
harrywan
9b3b7e5d0c
feat: 文件目录名带@转化成动态路由 () 2022-07-08 10:19:56 +08:00
wanchun
5103f65298 chore: v3.0.0-beta.13 2022-07-04 16:10:00 +08:00
wanchun
ad235af46c Merge branch 'next' of https://github.com/WeBankFinTech/fes.js into next 2022-07-04 16:08:38 +08:00
wanchun
3e3ee6a4b4 fix: 修复layout的bug 2022-07-04 16:08:03 +08:00
winixt
ce867e522d chore(release): publish
- @fesjs/create-fes-app@2.2.1
 - @fesjs/plugin-layout@4.2.2
 - @fesjs/plugin-locale@3.0.6
 - @fesjs/plugin-qiankun@2.1.2
2022-07-01 16:21:38 +08:00
winixt
557ded5ad2 chore: update dependencies 2022-07-01 16:16:01 +08:00
winixt
da6a88d386 chore: change request declear file 2022-06-29 16:56:44 +08:00
wanchun
b3dbbe187c chore: v3.0.0-beta.12 2022-06-27 19:33:24 +08:00
wanchun
9f349343b9 feat: create-fes-app支持创建插件项目 2022-06-27 19:32:11 +08:00
wanchun
62c517bfca chore(release): publish
- @fesjs/create-fes-app@2.2.0
2022-06-27 19:16:43 +08:00
harrywan
3b8af8aacb
feat: 插件开发文档和模板 ()
* feat: 插件开发文档和模板

* docs: 更新文档
2022-06-27 17:53:24 +08:00
wanchun
d475753aeb docs: 文档 2022-06-27 12:41:26 +08:00
wanchun
223f38be79 docs: 贡献指南 2022-06-27 11:20:15 +08:00
winixt
74315c408a chore: 更改文件名 2022-06-23 19:48:00 +08:00
wanchun
18fe100084 chore: v3.0.0-beta.11 2022-06-23 09:53:56 +08:00
wanchun
dd455fba7b fix: 优化项目模板ts配置 2022-06-23 09:52:37 +08:00
qlin
dc3e0aceb1
Ts type ()
* fix: 优化类型提示

* fix: 添加 enums 接口类型声明

* feat: 配置插件api提示

Co-authored-by: wanchun <445436867@qq.com>
2022-06-22 19:24:49 +08:00
wanchun
cad33ebfe5 refactor: 重构plugin-layout 2022-06-22 14:31:52 +08:00
harrywan
a9dd94506a
refactor: 重构plugin-layout,统一配置
* docs: 更新文档

* break: plugin-layout优化api

* break: 去掉switch配置,改为使用navigation

* feat: 重构layout

* docs: 升级文档

* feat: 无logo和title时隐藏dom

* fix: 修复一些问题

* fix: 配置提示

* fix: build watch copy 路径识别问题

* docs: 文档

Co-authored-by: winixt <haizekuo@gmail.com>
2022-06-22 14:25:47 +08:00
winixt
8a67774e46 chore: 优化 template 2022-06-20 22:55:26 +08:00
winixt
7c4cd292cb chore: v3.0.0-beta.10 2022-06-16 15:44:14 +08:00
qlin
c3b3e5337f
refactor: defineRouteMeta 兼容 script setup () 2022-06-16 15:38:37 +08:00
wanchun
b2f1272203 Merge branch 'next' of https://github.com/WeBankFinTech/fes.js into next 2022-06-16 14:07:06 +08:00
wanchun
3d53594959 docs: 更新文档 2022-06-16 14:06:35 +08:00
winixt
f21677d4e4 chore: 优化 template 2022-06-16 12:36:05 +08:00
winixt
a383409816 chore: v3.0.0-beta.9 2022-06-16 11:24:01 +08:00
qlin
97bfb30f30
refactor: 优化 request 插件 ()
* refactor: 优化 request 插件

* fix: errorHandler 的顺序控制问题'
2022-06-16 11:04:26 +08:00
qlin
c628ec236c
docs: 优化 mock.js 文档 () 2022-06-15 16:15:07 +08:00
wanchun
e426de9810 docs: 更新文档思索 2022-06-15 16:09:57 +08:00
wanchun
974cf2d78a docs: 文档搜索 2022-06-15 15:36:49 +08:00
wanchun
cd950ac3e0 chore: v3.0.0-beta.8 2022-06-14 19:28:47 +08:00
wanchun
7a92a06830 refactor: 优化乾坤和layout 2022-06-14 19:28:09 +08:00
wanchun
bd3542a184 chore(release): publish
- @fesjs/plugin-qiankun@2.1.1
2022-06-08 19:28:33 +08:00
wanchun
5bacf31098 fix: 修复qiankun内存泄露 2022-06-08 19:27:59 +08:00
wanchun
2a433855f0 fix: 修复乾坤 bug 2022-06-07 20:07:26 +08:00
wanchun
1bf20e1108 chore(release): publish
- @fesjs/plugin-layout@4.2.1
 - @fesjs/plugin-qiankun@2.1.0
 - @fesjs/preset-built-in@2.1.1
 - @fesjs/fes@2.1.1
2022-06-07 17:35:56 +08:00
harrywan
c09dfeadde
Fix qiankun 内存泄漏问题 ()
* fix: 修复乾坤插件内存问题

* fix: 多页签时关闭页面需要清除缓存

* feat: 乾坤增加entry配置,用于区别同一name不同位置用法

* docs: 去掉文档

* fix: preset-build-in的route api 兼容

* fix: 修复问题

* docs: 更新w文档

* fix: 变更api
2022-06-07 17:29:24 +08:00
wanchun
d37d6b480b chore(release): publish
- @fesjs/plugin-layout@4.2.0
2022-05-30 16:49:32 +08:00
wanchun
400d254a4b feat: plugin-layout 多页签可以删除当前页面 2022-05-30 16:48:13 +08:00
wanchun
2fe0138bac Merge branch 'next' of https://github.com/WeBankFinTech/fes.js into next 2022-05-27 17:57:04 +08:00
wanchun
2d1105eedd docs: 更新常见问题 2022-05-27 17:56:52 +08:00
winixt
8b4d8be056 chore: v3.0.0-beta.7 2022-05-25 19:21:10 +08:00
winixt
bf4475f240 fix: npm 包 ts 文件丢失问题 2022-05-25 19:19:36 +08:00
winixt
74cffdf4a3 docs: 优化 runtime 文档 2022-05-25 16:28:38 +08:00
wanchun
7b5f1e3264 docs: 修复发布文档action 2022-05-25 11:49:22 +08:00
wanchun
63792444bb docs: 修复发布文档action 2022-05-25 11:44:10 +08:00
wanchun
4b1f9626fa docs: 发布到pages 2022-05-25 11:34:10 +08:00
harrywan
b9bedb96c0
docs: 触发更新文档 2022-05-25 11:16:44 +08:00
harrywan
b8835aae87
docs: 修复docs action问题 2022-05-25 11:15:18 +08:00
harrywan
27016dadcf
docs: 修复docs action 问题 2022-05-25 11:14:06 +08:00
harrywan
eb31346b4c
docs: pages发布master版本文档 2022-05-25 11:08:55 +08:00
harrywan
bfac2f0aaa
docs: 添加1.0 地址 2022-05-25 11:02:55 +08:00
wanchun
9d40f46c56 chore: v3.0.0-beta.6 2022-05-19 17:47:36 +08:00
wanchun
53c8a33aac fix: polyfill改为使用@vitejs/plugin-legacy 2022-05-19 17:47:00 +08:00
wanchun
9d29c5fa45 docs: 更新文档 2022-05-18 14:46:10 +08:00
wanchun
351067f77d chore: v3.0.0-beta.5 2022-05-18 12:53:38 +08:00
wanchun
fef2aeefae fix(builder-vite): 修复build时找不到入口js问题 2022-05-18 12:46:14 +08:00
wanchun
98d78ac845 docs: 更新文档 2022-05-18 11:14:37 +08:00
wanchun
e2c3b5e2b3 docs: 优化文档 2022-05-18 11:05:20 +08:00
wanchun
c97cb6d3dd docs: 更新文档 2022-05-18 10:56:31 +08:00
wanchun
ff59d321e4 chore: v3.0.0-beta.4 2022-05-17 19:20:06 +08:00
wanchun
c003aed099 build: 修复构建问题 2022-05-17 19:19:43 +08:00
wanchun
e2c6cd085f fix: vite忽略@fesjs/fes 2022-05-17 18:58:57 +08:00
wanchun
670aa3ca5a chore: v3.0.0-beta.3 2022-05-17 17:05:56 +08:00
wanchun
916086437b chore: v3.0.0-beta.2 2022-05-17 14:37:18 +08:00
wanchun
3b23141bab refactor: 发布的commit release -> chore 2022-05-17 14:36:40 +08:00
wanchun
5d6aed8ac0 fix: 修正包版本 2022-05-17 14:34:35 +08:00
wanchun
a0b7d5d493 chore: 添加release的commit类型 2022-05-17 14:31:58 +08:00
wanchun
45e95a0d0a fix: initialState存在非setup使用场景,不能使用provide/inject 2022-05-17 14:23:00 +08:00
wanchun
cfdfd510f3 fix: 优化模板 2022-05-17 11:28:26 +08:00
wanchun
55e5a6f15d fix: 模板优化 2022-05-17 11:25:47 +08:00
wanchun
9f159804ba docs: 处理文档构建错误 2022-05-16 19:49:28 +08:00
wanchun
8d581295d4 docs: 添加3.0文档入口 2022-05-16 19:42:40 +08:00
wanchun
395012fca5 docs: 更新文档 2022-05-16 19:33:44 +08:00
winixt
d30adf3b53 ci: 更改发布相关逻辑 2022-05-16 19:06:48 +08:00
winixt
674e5e9e76 release: v2.1.1 2022-05-16 17:56:29 +08:00
winixt
61bf2dacd3 fix: 更改发布脚本 2022-05-16 17:47:11 +08:00
wanchun
f10e9bcc77 Merge branch 'next' of https://github.com/WeBankFinTech/fes.js into next 2022-05-16 17:34:03 +08:00
wanchun
571ac92d04 docs: 文档base 2022-05-16 17:33:56 +08:00
winixt
1ffe001986 fix: 更改发布脚本 2022-05-16 17:32:03 +08:00
wanchun
dac79f09b6 docs: 修复文档问题 2022-05-16 16:34:55 +08:00
wanchun
94fe4e0689 feat: 升级版本号 2022-05-16 16:24:29 +08:00
wanchun
8a1a1fc772 feat: 统一core-js版本 2022-05-16 15:51:51 +08:00
wanchun
2bcd10ccf9 feat: 升级fes-design到0.5.0 2022-05-16 15:47:41 +08:00
wanchun
b511b12c7d docs: 更新文档 2022-05-16 15:24:27 +08:00
winixt
22161d7b91 docs: 优化文档 2022-05-16 14:48:25 +08:00
wanchun
fdfe79e65c feat: 合并master 2022-05-16 14:13:10 +08:00
wanchun
38aba6da55 feat: 合并master 2022-05-16 14:10:56 +08:00
winixt
fb3b5a6dd1 fix: 修复 webpack 修改文件重复编译问题 2022-05-14 19:15:50 +08:00
winixt
2f1c551522 feat: 优化 webpack 信息输出 2022-05-14 18:16:12 +08:00
winixt
7da7a348e2 fix: 修复vite热更新问题 2022-05-13 16:54:26 +08:00
winixt
b12f86bbbf chore: 移除上一个版本废弃的 API 2022-05-12 10:59:32 +08:00
winixt
060924e241 chore: 更改构建器名称 build > builder 2022-05-12 10:50:53 +08:00
wanchun
1bb782dfad chore(release): publish
- @fesjs/plugin-layout@4.1.0
 - @fesjs/plugin-watermark@2.1.0
 - @fesjs/preset-built-in@2.1.0
 - @fesjs/fes@2.1.0
2022-05-11 18:55:44 +08:00
wanchun
4caf8fa0fa fix: qiankun demo 2022-05-11 17:53:57 +08:00
wanchun
0580369042 refactor: 重新设计build加载方式 2022-05-11 17:50:20 +08:00
wanchun
e72b7d2665 chore: plugin-qiankun的demo 2022-05-11 16:55:28 +08:00
ocean_gao
70b034a351
feat: plugin-watermark 提供 destroyWatermark ()
* feat: 水印支持动态关闭和打开

* refactor: watermark代码规范

* feat: 水印关闭逻辑优化

* fix: watermark 导出 destroyWatermark

* refactor: 代码规范

* feat: 水印性能优化

* refactor: 代码规范

* refactor: 代码规范

* fix: 重新渲染水印
2022-05-11 10:32:44 +08:00
wanchun
1bdd2a424b Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2022-05-10 15:40:00 +08:00
wanchun
8791ff988f docs: 更新plugin-access文档 2022-05-10 15:39:55 +08:00
winixt
6c9620975b chore(release): publish
- @fesjs/plugin-layout@4.0.10
 - @fesjs/preset-built-in@2.0.25
 - @fesjs/fes@2.0.25
2022-05-09 20:34:14 +08:00
winixt
5c640250e2 fix: merge conflict 2022-05-09 20:33:22 +08:00
qlin
ad60fb5bb7
fix: 当 public 文件夹下没有可 copy 的文件会造成编译失败 () 2022-05-09 20:14:13 +08:00
wanchun
6c551e21f8 chore(release): publish
- @fesjs/plugin-qiankun@2.0.13
2022-05-09 14:08:08 +08:00
wanchun
c0cc29da44 fix: plugin-qiankun修复主应用更新props不触发update 2022-05-09 14:07:25 +08:00
wanchun
4a53145ca6 fix: 修复vite版本在win下的兼容性问题 2022-05-08 12:59:09 +08:00
wanchun
116bf5f39a feat: qiankun主应用vite改造 2022-05-06 18:18:19 +08:00
wanchun
81d3405251 feat: 优化mock 2022-05-06 17:30:23 +08:00
wanchun
5117afc9c5 feat: vite的mock也改为express语法 2022-05-06 17:15:26 +08:00
wanchun
15c93eb80e feat: layout/locale/editor/sass等插件兼容vite 2022-05-06 15:02:08 +08:00
wanchun
443879bf4f fix: 修复一些bug 2022-05-06 13:10:09 +08:00
wanchun
12418f2ffe feat: plugin-layout支持运行时配置编译时的参数 2022-05-05 16:55:39 +08:00
winixt
baff9073c4 chore(release): publish
- @fesjs/plugin-request@2.0.15
2022-04-29 15:56:30 +08:00
qlin
c946536e8e
fix: request skipErrorHandler 配置问题 ()
* fix: request skipErrorHandler 配置问题

* fix: 处理 default 异常问题?
2022-04-29 15:55:56 +08:00
wanchun
91a5d71654 chore(release): publish
- @fesjs/plugin-watermark@2.0.3
2022-04-24 09:50:57 +08:00
ocean_gao
cb40631a86
fix: watermark自定义container时样式优化 ()
* fix: watermark自定义container时样式优化

* fix: watermark支持container时样式优化
2022-04-24 09:49:03 +08:00
wanchun
83d9a5bc3f chore(release): publish
- @fesjs/plugin-access@2.0.6
 - @fesjs/plugin-qiankun@2.0.12
 - @fesjs/plugin-watermark@2.0.2
 - @fesjs/preset-built-in@2.0.24
 - @fesjs/fes@2.0.24
2022-04-20 14:12:24 +08:00
ocean_gao
ae84ba3bae
feat: watermark默认样式优化 ()
* feat: watermark默认样式优化

* feat: watermark默认样式优化

* feat: watermark默认样式优化
2022-04-20 11:13:17 +08:00
harrywan
41b843396c
feat: qiankun支持多页签keepalive ()
* fix: 判断页面权限的path统一从match中拿路由path

* fix: qiankun主应用不改rootContainer

* fix: 消除initialState为空时的warn

* refactor: modifyCreateHistroy更改为modifyCreateHistory

* fix: qiankun支持多页签keepalive
2022-04-20 10:35:16 +08:00
wanchun
2ca3951c3f fix: template需要watermark依赖 2022-04-18 15:58:11 +08:00
wanchun
3bd10aef9c chore(release): publish
- @fesjs/create-fes-app@2.1.7
 - @fesjs/plugin-layout@4.0.9
 - @fesjs/plugin-locale@3.0.5
 - @fesjs/plugin-qiankun@2.0.11
 - @fesjs/plugin-watermark@2.0.1
2022-04-18 13:39:32 +08:00
wanchun
5b85e3342b docs: 更新readme 2022-04-18 13:37:36 +08:00
harrywan
98bae6d141
feat: watermark ()
* feat: 基础功能

* feat: 支持时间戳

* refactor(plugin-watermark): 优化实现

* feat(plugin-watermark): 提供开关

* docs: 添加文档

* docs: 优化文档
2022-04-18 13:31:47 +08:00
winixt
5724cbd8f3 fix: windows 问题 2022-04-18 10:21:38 +08:00
winixt
a535345e0a refactor: 优化类型声明 2022-04-15 22:54:51 +08:00
wanchun
0e90cc2b52 docs: 更新文档 2022-04-14 13:18:39 +08:00
wanchun
f9c8ca24c0 docs: 文档action 2022-04-14 13:08:03 +08:00
wanchun
ec75e406c0 feat: 升级fes-design 2022-04-13 10:56:21 +08:00
harrywan
33805f78f4
Update README.md 2022-04-12 08:50:21 +08:00
harrywan
b053928786
Update docs.yml 2022-04-12 08:43:19 +08:00
wanchun
ee36ad05c2 docs: 去掉英文文档 2022-04-11 20:02:07 +08:00
winixt
98060fe9c5 chore(release): publish
- @fesjs/plugin-layout@4.0.8
 - @fesjs/plugin-model@2.0.5
 - @fesjs/plugin-request@2.0.14
 - @fesjs/preset-built-in@2.0.23
 - @fesjs/fes@2.0.23
2022-04-11 19:45:24 +08:00
harrywan
94c4bb6e4f
* feat(plugin-layout): layout支持运行时配置menus ()
* feat(plugin-layout): 支持运行时配置menus

* refactor(plugin-model): 去掉provide

* refactor(plugin-layout): 优化runtimeConfig,重新实现运行时menus配置方式,修复多页时setup执行两次的bug

* feat(plugin-layout): 菜单支持配置默认展开等

* refactor: 优化
2022-04-11 19:40:16 +08:00
winixt
f16579c5a1 fix: 修改缓存等级 2022-04-11 16:47:46 +08:00
winixt
e106df121c refactor: 移除 file-loader、raw-loader、url-loader,用 webpack a sset 替换 2022-04-11 15:16:29 +08:00
winixt
eea735d3a8 break: 升级 webpack-dev-server: 3.x > 4.x 2022-04-11 14:51:00 +08:00
winixt
53a8deb4f8 fix: 优化 webpack 构建时的信息输出 2022-04-10 17:43:49 +08:00
winixt
b5d28c5989 fix: vite polyfill 问题 2022-04-10 15:59:48 +08:00
winixt
0100b10567 fix: connect-history-api-fallback 挪回 webpack,vite 后续再考虑支持 2022-04-08 14:56:19 +08:00
winixt
562fc003b2 feat: 优化 release 流程 2022-04-07 17:07:13 +08:00
winixt
712f734374 docs: 优化部分文档 2022-04-06 15:52:16 +08:00
winixt
89c60426b9 chore: 移除针对 pnpm 优化的逻辑,建议加 shamefully-hoist 配置 2022-04-06 14:26:07 +08:00
winixt
8bdaad419a refactor: 修改 html 相关逻辑与问题 2022-04-05 19:44:39 +08:00
winixt
7e1c3cc07b docs: 进一步优化文档 2022-04-04 21:02:18 +08:00
winixt
4732acc233 docs: 优化编译时文档 2022-04-04 18:12:31 +08:00
winixt
ec1ba22616 refactor: 梳理构建配置 2022-04-04 16:44:50 +08:00
winixt
049c9532de feat: 完善 vite build 2022-04-04 15:32:41 +08:00
winixt
e3d49d51c8 chore: 完成部分 vite 构建相关 2022-04-03 20:00:24 +08:00
winixt
31ff10532e feat: 初步实现 vite dev 构建 2022-04-03 19:26:49 +08:00
winixt
35218f0e42 chore: 添加一些测试代码 2022-04-02 19:29:38 +08:00
winixt
40d8332030 fix: 重新梳理构建流程 2022-03-29 16:25:49 +08:00
wanchun
972518ff9c feat: enums和vuex构建配置提示 2022-03-29 14:26:05 +08:00
wanchun
abffcdb9a1 refactor: 优化乾坤插件,增加构建配置提示 2022-03-29 13:11:09 +08:00
wanchun
59ca087b23 feat: 增加乾坤构建提示 2022-03-29 11:06:45 +08:00
winixt
a366f9694a fix: 移除 getHostname、getPort、getServer 2022-03-28 21:18:40 +08:00
winixt
97b9e8fa3c refactor: 优化 resolver inner dep and declare type file 2022-03-28 21:03:13 +08:00
wanchun
0816e25905 Merge branch 'refactor_build' of https://github.com/WeBankFinTech/fes.js into refactor_build 2022-03-28 20:19:44 +08:00
wanchun
14d3f4bd0f feat: 添加一些描述文件 2022-03-28 20:19:11 +08:00
wanchun
3ffab50096 feat: 添加一些描述文件 2022-03-28 20:17:54 +08:00
winixt
023b223854 feat: 构建类型定义 2022-03-28 19:44:54 +08:00
winixt
1e2198b671 feat: 构建类型定义 2022-03-28 17:07:36 +08:00
winixt
a9ffca2262 refactor: 完成运行时类型改造 2022-03-27 20:10:28 +08:00
winixt
99db87e400 refactor: 抽离 webpack 构建 2022-03-26 20:24:14 +08:00
winixt
c04148f84d fix: run vite 2022-03-26 14:58:01 +08:00
winixt
242787c358 feat: 优化构建 2022-03-25 20:31:30 +08:00
qlin
b5184a4e7d
refactor: 优化对外的 error 结构 () 2022-03-23 11:37:59 +08:00
winixt
7cc8ea51eb chore(release): publish
- @fesjs/create-fes-app@2.1.6
 - @fesjs/compiler@2.0.5
 - @fesjs/plugin-access@2.0.5
 - @fesjs/plugin-jest@2.0.5
 - @fesjs/plugin-layout@4.0.7
 - @fesjs/plugin-locale@3.0.4
 - @fesjs/plugin-model@2.0.4
 - @fesjs/plugin-monaco-editor@2.0.0-beta.6
 - @fesjs/plugin-pinia@2.0.2
 - @fesjs/plugin-qiankun@2.0.10
 - @fesjs/plugin-request@2.0.13
 - @fesjs/plugin-vuex@2.0.5
 - @fesjs/preset-built-in@2.0.22
 - @fesjs/utils@2.0.4
 - @fesjs/fes@2.0.22
2022-03-22 12:53:21 +08:00
qlin
d17f6a6dc7
Merge pull request from WeBankFinTech/keep-alive
Keep alive
2022-03-22 12:47:15 +08:00
wanchun
0ee6ed2c83 feat: 命名 2022-03-22 12:27:17 +08:00
wanchun
3099bbd1b6 docs: 更新文档 2022-03-22 12:02:33 +08:00
wanchun
35196676d2 docs: 更新文档 2022-03-22 11:58:10 +08:00
wanchun
444ed4ba3c feat: 支持keep-alive 2022-03-22 11:32:35 +08:00
wanchun
4550c7499d Merge branch 'master' of https://github.com/WeBankFinTech/fes.js into master 2022-03-18 15:11:54 +08:00
wanchun
eec9abd0c2 docs: 更新文档 2022-03-18 15:10:07 +08:00
harrywan
5b1553ef58
feat: 页面支持tsx,提供defineRoute配置tsx和jsx的route ()
* feat: 页面支持tsx,提供defineRoute配置tsx和jsx的route

* .vue文件也支持defineRouteMeta

* feat: 改回声明用法
2022-03-09 10:27:11 +08:00
joyzhan
489112a823 chore(release): publish
- @fesjs/plugin-layout@4.0.6
 - @fesjs/plugin-windicss@2.0.8
2022-03-04 10:29:12 +08:00
qlin
d1c93bd435
feat: 优化 windicss 配置 ()
Co-authored-by: joyzhan <joyzhan@webank.com>
2022-03-03 21:45:51 +08:00
wanchun
9efb4b7838 refactor: 优化layout 2022-03-01 11:27:56 +08:00
wanchun
fe0906af4a refactor: 优化 2022-03-01 11:22:07 +08:00
winixt
2e12de3c8d chore(release): publish
- @fesjs/create-fes-app@2.1.5
 - @fesjs/plugin-layout@4.0.5
 - @fesjs/preset-built-in@2.0.21
 - @fesjs/fes@2.0.21
2022-02-23 10:12:33 +08:00
harrywan
50db7dc908
refactor: layout组件兼容性更好,升级fes-design版本 () 2022-02-22 19:02:43 +08:00
qlin
1e033d488f
fix: 编译所有 .vue | .jsx 文件,不管是否在node_modules () 2022-02-22 19:01:42 +08:00
wanchun
6d26d1aa18 refactor: layout组件兼容性更好,升级fes-design版本 2022-02-21 14:43:31 +08:00
houling
9aca54ce60
fix: fix docs ()
Co-authored-by: houling <houling@tuhu.cn>
2022-02-09 10:08:47 +08:00
wanchun
905f4bc33f chore(release): publish
- @fesjs/plugin-pinia@2.0.1
 - @fesjs/plugin-vuex@2.0.4
 - @fesjs/plugin-windicss@2.0.7
 - @fesjs/preset-built-in@2.0.20
 - @fesjs/fes@2.0.20
2022-02-08 15:21:36 +08:00
wanchun
74c544a2a1 docs: 更新包readme 2022-02-08 15:19:44 +08:00
qlin
cfdd100538
Merge pull request from WeBankFinTech/pinia
feat: plugin-pinia
2022-02-08 10:37:12 +08:00
harrywan
476b7bfe66 feat: plugin-pinia 2022-02-02 22:04:01 +08:00
qlin
2981a66218
fix: 解决 windicss 在开发环境 css 加载顺序问题 () 2022-01-26 19:34:02 +08:00
winixt
e0fe6feadf chore: update lock 2022-01-25 18:03:17 +08:00
winixt
9df527fdd2 chore(release): publish
- @fesjs/create-fes-app@2.1.4
 - @fesjs/compiler@2.0.4
 - @fesjs/plugin-jest@2.0.4
 - @fesjs/plugin-layout@4.0.4
 - @fesjs/plugin-request@2.0.12
 - @fesjs/preset-built-in@2.0.19
 - @fesjs/fes@2.0.19
2022-01-25 18:01:32 +08:00
winixt
03711c6590 chore: 更新版本依赖 2022-01-25 18:00:23 +08:00
wanchun
5346e2b350 chore(release): publish
- @fesjs/plugin-layout@4.0.3
2022-01-21 17:35:57 +08:00
wanchun
669e412532 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2022-01-21 17:35:14 +08:00
wanchun
a678db45a5 fix(plugin-layout): main需要设置z-index:0 2022-01-21 17:34:43 +08:00
winixt
eda93284ba chore: 更新 lock 2022-01-19 10:06:59 +08:00
wanchun
e8eae1e67a chore(release): publish
- @fesjs/plugin-locale@3.0.3
2022-01-18 16:00:08 +08:00
wanchun
f94b00a722 fix: plugin-locale兼容composition场景变更locale 2022-01-18 15:59:15 +08:00
wanchun
10188d1f89 chore(release): publish
- @fesjs/plugin-locale@3.0.2
 - @fesjs/plugin-request@2.0.11
 - @fesjs/preset-built-in@2.0.18
 - @fesjs/fes@2.0.18
2022-01-18 15:27:36 +08:00
wanchun
43cc5dda9c fix: 修复locale更新设置fes_locale标记问题 2022-01-18 15:23:30 +08:00
wanchun
2489b9baae docs: 更新文档 2022-01-17 10:15:20 +08:00
wanchun
f322380576 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2022-01-14 16:16:04 +08:00
wanchun
1be7455d67 docs: 更新文档 2022-01-14 16:12:37 +08:00
winixt
99c1d1c63d chore(release): publish
- @fesjs/plugin-request@2.0.10
2022-01-13 19:19:15 +08:00
winixt
4786541c56 fix: request response 问题 2022-01-13 19:18:53 +08:00
winixt
31f5a3409e chore(release): publish
- @fesjs/plugin-request@2.0.9
2022-01-13 17:09:28 +08:00
qlin
e00acc4a7e
feat: 针对请求文件的情况进行优化 () 2022-01-13 16:25:16 +08:00
wanchun
d98f326e5f chore(release): publish
- @fesjs/create-fes-app@2.1.3
 - @fesjs/plugin-access@2.0.4
 - @fesjs/plugin-layout@4.0.2
 - @fesjs/plugin-locale@3.0.1
 - @fesjs/plugin-qiankun@2.0.9
 - @fesjs/plugin-request@2.0.8
 - @fesjs/plugin-windicss@2.0.6
 - @fesjs/preset-built-in@2.0.17
 - @fesjs/fes@2.0.17
2022-01-12 19:15:29 +08:00
wanchun
1fc01ba05f fix: plugin-request 2022-01-12 19:09:16 +08:00
wanchun
8282d6a398 docs: 更新layout文档 2022-01-10 12:48:16 +08:00
winixt
9a2189b75e Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2022-01-08 15:32:24 +08:00
winixt
718040ef4c docs: 修复文档版本问题 2022-01-08 15:32:08 +08:00
wanchun
914b9b850c chore(release): publish
- @fesjs/plugin-layout@4.0.1
 - @fesjs/preset-built-in@2.0.16
 - @fesjs/fes@2.0.16
2022-01-07 17:36:55 +08:00
wanchun
a9511bfc1d Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2022-01-07 17:35:36 +08:00
wanchun
65de66c5d8 fix(plugin-layout): layout的aside宽度未跟随配置改变 2022-01-07 17:35:17 +08:00
winixt
6977055588 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2022-01-06 14:05:16 +08:00
wanchun
14a5516c6a docs: 更新文档 2022-01-06 12:57:22 +08:00
winixt
8c00d2c645 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2022-01-06 10:12:35 +08:00
wanchun
7d4ffdc93a chore(release): publish
- @fesjs/plugin-layout@4.0.0
 - @fesjs/preset-built-in@2.0.14
 - @fesjs/fes@2.0.15
2022-01-05 16:39:46 +08:00
wanchun
c998c39559 feat(plugin-layout): 菜单支持配置额外的匹配规则 2022-01-05 16:38:20 +08:00
wanchun
ab949fb6a8 feat(plugin-layout): 菜单支持配置额外的匹配规则 2022-01-05 16:38:02 +08:00
wanchun
1bfb4b1c1a feat: 当build-in版本变化时,缓存失效 2022-01-05 11:12:09 +08:00
wanchun
c8bc785a49 chore(release): publish
- @fesjs/create-fes-app@2.1.2
 - @fesjs/preset-built-in@2.0.13
 - @fesjs/fes@2.0.14
2022-01-04 19:46:42 +08:00
wanchun
084dc074d9 chore: 项目模板依赖core-js 2022-01-04 19:45:15 +08:00
winixt
5cd1b2af5d Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2022-01-04 19:38:26 +08:00
wanchun
172a3a6fe6 chore(release): publish
- @fesjs/create-fes-app@2.1.1
2022-01-04 17:50:06 +08:00
wanchun
6d2dedf44a feat: 使用最新版layout和locale 2022-01-04 17:49:16 +08:00
wanchun
299416497e feat: 使用最新版layout和locale 2022-01-04 17:48:34 +08:00
wanchun
99a2615488 Revert "Revert "ci: 去掉npm配置""
This reverts commit c707d142b9655d457247ff1648684cc0051791cd.
2022-01-04 17:32:55 +08:00
wanchun
c707d142b9 Revert "ci: 去掉npm配置"
This reverts commit 250a929816d88ff542c9fffd063571e45b687b4b.
2022-01-04 17:32:35 +08:00
wanchun
250a929816 ci: 去掉npm配置 2022-01-04 17:28:40 +08:00
wanchun
a90664af86 chore(release): publish
- @fesjs/create-fes-app@2.1.0
 - @fesjs/plugin-access@2.0.3
 - @fesjs/plugin-layout@3.0.0
 - @fesjs/plugin-locale@3.0.0
 - @fesjs/plugin-qiankun@2.0.8
 - @fesjs/preset-built-in@2.0.12
 - @fesjs/fes@2.0.13
2022-01-04 17:24:23 +08:00
wanchun
955fc633ec docs: 更新文档 2022-01-04 17:19:16 +08:00
harrywan
700b0f9747
feat: 插件改为使用fes-design 2022-01-04 16:19:17 +08:00
joyzhan
dc6acc69e0 chore(release): publish
- @fesjs/plugin-windicss@2.0.5
 - @fesjs/preset-built-in@2.0.11
 - @fesjs/fes@2.0.12
2021-12-27 22:47:39 +08:00
qlin
0402cdb18e
Merge pull request from WeBankFinTech/vue_custom_block
feat: 将 ignore vue custom block logic move to preset
2021-12-27 22:44:50 +08:00
winixt
5e5efb276a feat: 将 ignore vue custom block logic move to preset 2021-12-27 19:11:49 +08:00
winixt
d966f8c16b chore(release): publish
- @fesjs/plugin-enums@2.0.2
 - @fesjs/preset-built-in@2.0.10
 - @fesjs/fes@2.0.11
2021-12-27 11:24:36 +08:00
winixt
7e557558d7 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-12-27 11:24:11 +08:00
qlin
71ccf01c2f
Merge pull request from daotl/pr/docs-plugin-enums
更新plugin-enums中get放大发JSDoc,后两个参数为可选
2021-12-27 11:23:04 +08:00
harrywan
e02fb9203e
Merge pull request from WeBankFinTech/support_tsx
feat: app 入口文件支持 .tsx, .jsx 后缀
2021-12-27 11:03:09 +08:00
winixt
7fc5d63abd feat: app 入口文件支持 .tsx, .jsx 后缀 2021-12-27 10:47:58 +08:00
Nex Zhu
8dc0a5ee34
docs(plugin-enums): get has two optional parameters 2021-12-27 10:20:33 +08:00
winixt
abb28212df chore(release): publish
- @fesjs/create-fes-app@2.0.9
 - @fesjs/preset-built-in@2.0.9
 - @fesjs/fes@2.0.10
2021-12-22 20:16:02 +08:00
winixt
87961748e0 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-12-22 20:15:28 +08:00
qlin
a31137e937
Merge pull request from WeBankFinTech/support_ts
支持 app.ts
2021-12-22 20:15:04 +08:00
winixt
37a303c11e sdf 2021-12-22 20:10:38 +08:00
wanchun
b1af372832 docs: 更换logo 2021-12-21 15:33:06 +08:00
wanchun
46a2402805 docs: 更换logo 2021-12-21 15:31:02 +08:00
winixt
fd318c62e3 chore(release): publish
- @fesjs/plugin-layout@2.0.9
2021-12-16 16:36:49 +08:00
winixt
e2465f6b2d Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-12-16 16:34:58 +08:00
qlin
cc6efa85f5
Merge pull request from WeBankFinTech/feat-layout
feat(plugin-layout): 区域展示支持全局配置
2021-12-16 16:33:32 +08:00
wanchun
0f3a4e793a feat(plugin-layout): 区域展示支持全局配置 2021-12-16 16:25:46 +08:00
winixt
3f32354c2b chore(release): publish
- @fesjs/plugin-icon@2.0.6
 - @fesjs/plugin-windicss@2.0.4
 - @fesjs/preset-built-in@2.0.8
 - @fesjs/fes@2.0.9
2021-12-15 20:02:22 +08:00
winixt
c6dae183cb Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-12-15 20:01:32 +08:00
harrywan
9be4ebe415
Merge pull request from WeBankFinTech/router-jsx
feat: 路由生成支持 .jsx 后缀
2021-12-15 19:44:34 +08:00
harrywan
4c4ff7d278
Merge pull request from WeBankFinTech/windi_css_bug
fix: 自定义 config 不兼容 vue-loader 问题
2021-12-15 19:41:49 +08:00
winixt
7f305bc74b feat: 路由生成支持 .jsx 后缀 2021-12-15 19:38:17 +08:00
winixt
e5b1e17b26 fix: 自定义 config 不兼容 vue-loader 问题 2021-12-15 18:08:37 +08:00
winixt
f7e7b1c815 docs: 更改 request 文档 2021-12-14 20:29:49 +08:00
winixt
3a99ba26a1 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-12-14 20:28:42 +08:00
wanchun
1c2a2d4d2f docs: 更新文档 2021-12-14 19:54:26 +08:00
winixt
0f5516a114 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-12-14 11:47:16 +08:00
harrywan
16ef0d1bcf Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-12-14 11:44:44 +08:00
harrywan
0d075f0037 docs: 更新model和access文档 2021-12-14 11:42:49 +08:00
harrywan
e77e4dff81
Merge pull request from lucaszhu2zgf/patch-3
Update request.md
2021-12-14 10:35:24 +08:00
lucaszhu
736bb901ea
Update request.md 2021-12-14 10:31:57 +08:00
winixt
0236057c51 chore(release): publish
- @fesjs/plugin-windicss@2.0.3
2021-11-30 18:06:01 +08:00
winixt
2cf8b32ef6 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-11-30 18:05:24 +08:00
winixt
c9ced7e1b8 fix: windicss 配置检测 2021-11-30 18:04:21 +08:00
harrywan
2df7237980 docs: 更新readme 2021-11-24 14:15:10 +08:00
harrywan
0e9199eac0
Update README.md 2021-11-24 12:55:54 +08:00
harrywan
7ba9c677ee feat: 更新readme 2021-11-24 12:52:06 +08:00
harrywan
d69cce393c Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-11-24 12:48:33 +08:00
harrywan
24760eb2d8 feat: 更新readme 2021-11-24 12:48:24 +08:00
harrywan
058e72cbb3 feat: 更新readme 2021-11-24 12:48:20 +08:00
winixt
b86e2a73a9 docs: 更新request plugin文档 2021-11-24 11:37:28 +08:00
winixt
8d52805f4f chore(release): publish
- @fesjs/create-fes-app@2.0.8
 - @fesjs/plugin-layout@2.0.8
 - @fesjs/plugin-windicss@2.0.2
2021-11-23 20:34:10 +08:00
winixt
917d268629 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-11-23 20:33:25 +08:00
winixt
10d4f31205 fix: 添加 windi.config.js 文件到 npm 包 2021-11-23 20:33:01 +08:00
harrywan
6ac94722d4 chore(release): publish
- @fesjs/create-fes-app@2.0.7
 - @fesjs/plugin-layout@2.0.7
2021-11-23 16:31:41 +08:00
harrywan
fb6b7c339b fix(plugin-layout): 多页签标题正确显示 2021-11-23 16:30:26 +08:00
winixt
71f54368a2 chore(release): publish
- @fesjs/create-fes-app@2.0.6
 - @fesjs/compiler@2.0.3
 - @fesjs/plugin-access@2.0.2
 - @fesjs/plugin-icon@2.0.5
 - @fesjs/plugin-jest@2.0.3
 - @fesjs/plugin-layout@2.0.6
 - @fesjs/plugin-locale@2.0.4
 - @fesjs/plugin-model@2.0.3
 - @fesjs/plugin-monaco-editor@2.0.0-beta.5
 - @fesjs/plugin-qiankun@2.0.7
 - @fesjs/plugin-request@2.0.7
 - @fesjs/plugin-vuex@2.0.3
 - @fesjs/plugin-windicss@2.0.1
 - @fesjs/preset-built-in@2.0.7
 - @fesjs/utils@2.0.3
 - @fesjs/fes@2.0.8
2021-11-18 20:19:23 +08:00
winixt
510f95b071 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-11-18 20:15:32 +08:00
harrywan
cca8c79e5f
Merge pull request from WeBankFinTech/windi_css
Windi css
2021-11-18 16:55:54 +08:00
winixt
f715682ccd fix: 移除可有可无代码 2021-11-18 14:58:18 +08:00
aring
4092c46b12
Merge pull request from WeBankFinTech/fix_request_key
Fix request key
2021-11-18 14:10:23 +08:00
winixt
7ddf1b7aff feat: upgrade windicss-webpack-plugin 2021-11-18 12:10:53 +08:00
winixt
1eb20b0385 fix: generate get request url key 2021-11-18 11:09:47 +08:00
winixt
717ad973fb Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-11-18 10:50:47 +08:00
winixt
5747466c43 feat: windicss 2021-11-18 10:31:01 +08:00
winixt
895e47c857 feat: windicss 2021-11-17 22:48:56 +08:00
harrywan
2f82d4b9a8
Merge pull request from WeBankFinTech/feat_pnpm
Feat pnpm
2021-11-17 19:47:12 +08:00
winixt
67657ab9e3 feat: 优化 vue-i18n 引入 2021-11-16 22:01:26 +08:00
winixt
8528e24599 feat: 支持pnpm 2021-11-16 21:24:25 +08:00
winixt
0fac113ade feat: 支持pnpm 2021-11-16 16:45:34 +08:00
winixt
a9813c8c91 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-11-16 16:36:40 +08:00
harrywan
2af89ff0da
Merge pull request from WeBankFinTech/vue3
Vue3
2021-11-12 14:34:10 +08:00
harrywan
7a1db0259f
Merge branch 'master' into vue3 2021-11-12 14:33:12 +08:00
winixt
479a1951cd Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-11-09 16:00:39 +08:00
harrywan
ea71626028
Merge pull request from WeBankFinTech/vuex-doc
docs: 更新plugin-vuex文档
2021-11-09 15:59:19 +08:00
aringlai
fb5c2beb15 docs: 更新plugin-vuex文档 2021-11-09 15:53:41 +08:00
harrywan
8d788a0b5a chore(release): publish
- @fesjs/create-fes-app@2.0.5
 - @fesjs/plugin-icon@2.0.4
 - @fesjs/plugin-layout@2.0.5
 - @fesjs/plugin-qiankun@2.0.6
 - @fesjs/preset-built-in@2.0.6
 - @fesjs/fes@2.0.7
2021-11-08 20:36:05 +08:00
harrywan
f213d7cc49 fix(plugin-layout): 修复多页签layout设置为false依然显示的问题 2021-11-08 20:29:32 +08:00
winixt
6ffd7afd3c Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-09-14 17:37:56 +08:00
harrywan
bfe73ad941 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-09-14 17:34:50 +08:00
harrywan
83114551ed docs: 更新plugin-access文档 2021-09-14 17:34:42 +08:00
winixt
43bae47b9f chore(release): publish
- @fesjs/create-fes-app@2.0.4
 - @fesjs/plugin-icon@2.0.3
 - @fesjs/plugin-layout@2.0.4
 - @fesjs/preset-built-in@2.0.5
 - @fesjs/fes@2.0.6
2021-09-14 17:04:21 +08:00
winixt
da5e5ebc34 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-09-14 17:01:03 +08:00
winixt
57e77d54d4 fix: vue and @vue/compiler-sfc version match problem 2021-09-14 17:00:53 +08:00
harrywan
ae2241572a
Merge pull request from vimplus/master
fix(plugin-layout):修复存在二级菜单时一级菜单不显示icon
2021-09-14 16:30:51 +08:00
winixt
6ba001e481 Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-09-14 15:24:13 +08:00
erictang
8ec25398f7 fix(plugin-layout):修复存在二级菜单时一级菜单不显示icon 2021-09-14 12:31:05 +08:00
harrywan
a35bf20d3d Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-09-07 17:35:31 +08:00
winixt
8f62547d88 chore(release): publish
- @fesjs/plugin-icon@2.0.2
 - @fesjs/preset-built-in@2.0.4
 - @fesjs/fes@2.0.5
2021-09-02 18:02:08 +08:00
winixt
5d5829d909 fix: plugin-icon 压缩问题 2021-09-02 18:00:55 +08:00
qlin
2a42a079f8
Merge pull request from hkc452/master
fix: 修复 watch 池为空
2021-09-02 17:55:49 +08:00
hkc452
06fc778bf9
Update generateFiles.js 2021-09-01 21:50:07 +08:00
hkc452
111451a3d2 fix:回收数组 2021-09-01 15:05:48 +08:00
hkc452
0d1c71767a fix: 修复 watch 池为空 2021-09-01 14:59:04 +08:00
harrywan
2823c8771c
Merge pull request from WeBankFinTech/ts
feat: 编译支持 ts
2021-08-26 10:45:53 +08:00
harrywan
f46e442ddf fix: 修复qiankun的demo 2021-08-25 19:53:49 +08:00
winixt
37ab86c7b3 feat: 编译支持 ts 2021-08-25 16:47:52 +08:00
winixt
657175a39e chore(release): publish
- @fesjs/create-fes-app@2.0.3
 - @fesjs/compiler@2.0.2
 - @fesjs/plugin-jest@2.0.2
 - @fesjs/plugin-layout@2.0.3
 - @fesjs/plugin-locale@2.0.3
 - @fesjs/plugin-model@2.0.2
 - @fesjs/plugin-monaco-editor@2.0.0-beta.4
 - @fesjs/plugin-qiankun@2.0.5
 - @fesjs/plugin-request@2.0.6
 - @fesjs/plugin-vuex@2.0.2
 - @fesjs/preset-built-in@2.0.3
 - @fesjs/utils@2.0.2
 - @fesjs/fes@2.0.4
2021-08-20 12:17:48 +08:00
winixt
5a5d809522 fix: export Generator 2021-08-20 12:11:50 +08:00
winixt
47e07173ad Merge branch 'master' of https://github.com/WeBankFinTech/fes.js 2021-08-20 12:05:29 +08:00
harrywan
89c43b106f
Merge pull request from WeBankFinTech/fix_layout_menu
fix: 解决 layout menu 空菜单问题 + env 环境覆盖问题
2021-08-20 10:36:04 +08:00
winixt
afd5497f79 fix: 解决 layout menu 空菜单问题 + env 环境覆盖问题 2021-08-20 10:08:58 +08:00
harrywan
1c6cadf411 chore(release): publish
- @fesjs/create-fes-app@2.0.2
 - @fesjs/compiler@2.0.1
 - @fesjs/plugin-access@2.0.1
 - @fesjs/plugin-enums@2.0.1
 - @fesjs/plugin-icon@2.0.1
 - @fesjs/plugin-jest@2.0.1
 - @fesjs/plugin-layout@2.0.2
 - @fesjs/plugin-locale@2.0.2
 - @fesjs/plugin-model@2.0.1
 - @fesjs/plugin-monaco-editor@2.0.0-beta.3
 - @fesjs/plugin-qiankun@2.0.4
 - @fesjs/plugin-request@2.0.5
 - @fesjs/plugin-vuex@2.0.1
 - @fesjs/preset-built-in@2.0.2
 - @fesjs/runtime@2.0.2
 - @fesjs/utils@2.0.1
 - @fesjs/fes@2.0.3
2021-08-18 14:38:15 +08:00
harrywan
8e39dcf2c2 fix: 检测vue和@vue/compiler-sfc的版本,保证一致 2021-08-18 14:23:37 +08:00
107 changed files with 6652 additions and 2087 deletions
.eslintignore
.vscode
CHANGELOG.mdREADME.en-US.mdREADME.md
docs
.vitepress/configs/sidebar
guide
index.md
public
reference
config
plugin/plugins
eslint.config.jspackage.json
packages
create-fes-app
package.json
templates/app/pc
fes-builder-vite
fes-builder-webpack
fes-compiler
fes-plugin-access
fes-plugin-icon
fes-plugin-layout
fes-plugin-locale
fes-plugin-login
fes-plugin-model
fes-plugin-monaco-editor
fes-plugin-pinia
fes-plugin-qiankun
examples
webpack-main
webpack-micro
package.json
src
main/runtime
micro/runtime
fes-plugin-request
fes-plugin-swc
fes-plugin-vuex
fes-plugin-watermark
fes-preset-built-in
fes-runtime
fes-template-vite
fes-template
fes-utils

@ -1,4 +0,0 @@
**/*.ts
lib
node_modules

@ -31,5 +31,8 @@
"source": "./fixtures/output/**/*.*",
"target": "./fixtures/input/<base>"
}
],
"cSpell.words": [
"unref"
]
}

File diff suppressed because it is too large Load Diff

@ -16,21 +16,21 @@ An excellent front-end solution
</div>
- document - [http://fesjs.mumblefe.cn/](http://fesjs.mumblefe.cn/)
- changelog - [CHANGELOG.md](./CHANGELOG.md)
- document - [http://fesjs.mumblefe.cn/](http://fesjs.mumblefe.cn/)
- changelog - [CHANGELOG.md](./CHANGELOG.md)
# Pain points
Before developing a front-end project, we may need to do the following preparations
- Set up a development environment
- Conventional code specification
- Encapsulate API requests
- Configure routing
- Realize layout, menu, navigation
- Realize login
- authority management
- ...
- Set up a development environment
- Conventional code specification
- Encapsulate API requests
- Configure routing
- Realize layout, menu, navigation
- Realize login
- authority management
- ...
In addition to the preparation work, there are many similar business types. For example, most of the middle and back-end applications are workbenches, additions, deletions, changes, permissions, charts, etc. If each project is completely processed manually, it will not only take time, but over time there may be multiple technology stacks and development specifications, leading to inconsistent development processes and making historical projects more and more difficult to maintain. So we need a complete solution to manage the entire process from development to deployment.
@ -40,14 +40,14 @@ Fes.js is an excellent front-end application solution. Fes.js is based on Vue 3.
It mainly has the following functions:
- 🚀 **fast** , Built-in routing, development, construction, etc., and provide plug-ins such as testing, layout, permissions, internationalization, state management, API requests, data dictionary, SvgIcon, etc., which can meet most of the daily development needs.
- 🧨 **easy** , Based on Vue.js 3.0, easy to get started. Carry out the idea of "Convention is better than configuration", design plug-ins as much as possible to replace configuration with conventions, and provide a unified plug-in configuration entry, which is simple, concise and flexible. Provide a consistent API entry, a consistent experience, and easier learning.
- 🚀 **fast** , Built-in routing, development, construction, etc., and provide plug-ins such as testing, layout, permissions, internationalization, state management, API requests, data dictionary, SvgIcon, etc., which can meet most of the daily development needs.
- 🧨 **easy** , Based on Vue.js 3.0, easy to get started. Carry out the idea of "Convention is better than configuration", design plug-ins as much as possible to replace configuration with conventions, and provide a unified plug-in configuration entry, which is simple, concise and flexible. Provide a consistent API entry, a consistent experience, and easier learning.
- 💪 **strong** , Only need to care about the content of the page, reduce the chance of writing BUG! Provide unit testing and coverage testing capabilities to ensure project quality.
- 💪 **strong** , Only need to care about the content of the page, reduce the chance of writing BUG! Provide unit testing and coverage testing capabilities to ensure project quality.
- 📦 **expanded** , Drawing lessons from Umi, it implements a complete life cycle and plug-in mechanism. The plug-in can manage the compile time and runtime of the project, and the capabilities can be encapsulated through the plug-in, and run in an orderly manner in Fes.js.
- 📦 **expanded** , Drawing lessons from Umi, it implements a complete life cycle and plug-in mechanism. The plug-in can manage the compile time and runtime of the project, and the capabilities can be encapsulated through the plug-in, and run in an orderly manner in Fes.js.
- 📡 **future** , While meeting demand, we will not stop exploring new technologies. Vue3.0 has been used to improve application performance, webpack5 has been used to improve construction performance and implement microservices, and new technologies such as vite will be explored in the future.
- 📡 **future** , While meeting demand, we will not stop exploring new technologies. Vue3.0 has been used to improve application performance, webpack5 has been used to improve construction performance and implement microservices, and new technologies such as vite will be explored in the future.
## Plugins
@ -57,7 +57,7 @@ It mainly has the following functions:
| [@fesjs/plugin-enums](http://fesjs.mumblefe.cn/reference/plugin/plugins/enums.html#%E4%BB%8B%E7%BB%8D) | Provide unified enumeration access and rich functions to handle enumeration |
| [@fesjs/plugin-icon](http://fesjs.mumblefe.cn/reference/plugin/plugins/icon.html#%E4%BB%8B%E7%BB%8D) | svg file is automatically registered as a component |
| [@fesjs/plugin-jest](http://fesjs.mumblefe.cn/reference/plugin/plugins/jest.html#%E5%90%AF%E7%94%A8%E6%96%B9%E5%BC%8F) | Based on `Jest`, provide unit testing and coverage testing capabilities |
| [ @fesjs/plugin-layout](http://fesjs.mumblefe.cn/reference/plugin/plugins/layout.html) | Simple configuration to have a layout, including navigation and sidebar |
| [@fesjs/plugin-layout](http://fesjs.mumblefe.cn/reference/plugin/plugins/layout.html) | Simple configuration to have a layout, including navigation and sidebar |
| [@fesjs/plugin-locale](http://fesjs.mumblefe.cn/reference/plugin/plugins/locale.html#%E4%BB%8B%E7%BB%8D) | Based on `Vue I18n`, providing internationalization capabilities |
| [@fesjs/plugin-model](http://fesjs.mumblefe.cn/reference/plugin/plugins/model.html#%E4%BB%8B%E7%BB%8D) | Simple data management solution |
| [@fesjs/plugin-request](http://fesjs.mumblefe.cn/reference/plugin/plugins/request.html#%E5%90%AF%E7%94%A8%E6%96%B9%E5%BC%8F) | Based on the request encapsulated by `Axios`, built-in functions such as preventing repeated requests, request throttling, and error handling |
@ -97,15 +97,17 @@ npm install
npm run dev
```
## Start On Cloud IDE
## Project Demo
[https://idegithub.com/WeBankFinTech/fes.js](https://idegithub.com/WeBankFinTech/fes.js)
| Project | Description |
|----------------------------------------- | ----------------------------------------- |
| <img src="https://docs.icegl.cn/logo.png" width="100px"> | [threejs webgl three three.js tres.js tvt.js](https://gitee.com/ice-gl/icegl-three-vue-tres) |
## Feedback
| Github Issue | WeChat group | Fes.js 开源运营小助手 |
| ------------------------------------ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [@fesjs/fes.js/issues](../../issues) | <img src="https://i.loli.net/2020/09/11/2XhKtPZd6NFVbDE.png" width="250" /> | <img src="https://i.loli.net/2020/09/16/sxwr62CKhmYOUyV.jpg" height="250"/> |
| [@fesjs/fes.js/issues](../../issues) | <img src="https://wanchun-1252303708.cos.ap-nanjing.myqcloud.com/WeChatb7bcfb33e47b8949ced831b8e79ffb0b.jpg" height="250"/> |
## Contributing
@ -127,4 +129,4 @@ In order for the Fes.js open source project to run better, and to give back to t
The output of experience can also help your system accumulate your own projects, sort out your work ideas, and also help your technology blog to promote. Good practice cases will have the opportunity to be invited to participate in the project community technical meeting to share, hurry up and participate.
Please stamp: https://mp.weixin.qq.com/s/nV4NG_OUUrdgtft8g_IW4g
Please stamp: <https://mp.weixin.qq.com/s/nV4NG_OUUrdgtft8g_IW4g>

@ -8,7 +8,7 @@
<div align="center">
一个优秀的前端解决方案
一个好用的前端应用解决方案
[![GitHub issues](https://img.shields.io/github/issues/WeBankFinTech/fes.js.svg?style=flat-square)](../../issues)
[![MIT](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](http://opensource.org/licenses/MIT)
@ -17,21 +17,21 @@
</div>
- 使用文档 - [http://fesjs.mumblefe.cn/](http://fesjs.mumblefe.cn/)
- 更新日志 - [CHANGELOG.md](./CHANGELOG.md)
- 使用文档 - [http://fesjs.mumblefe.cn/](http://fesjs.mumblefe.cn/)
- 更新日志 - [CHANGELOG.md](./CHANGELOG.md)
# 痛点
在开发一个前端项目之前,我们可能需要做如下准备工作:
- 搭建开发环境
- 约定代码规范
- 封装 API 请求
- 配置路由
- 实现布局、菜单、导航
- 实现登录
- 权限管理
- ...
- 搭建开发环境
- 约定代码规范
- 封装 API 请求
- 配置路由
- 实现布局、菜单、导航
- 实现登录
- 权限管理
- ...
除了准备工作之外,还会遇到很多相似的业务类型,比如中后台应用大多都是工作台、增删改查、权限、图表等。如果每次项目都完全手动处理一遍,不仅耗费时间,久而久之可能会存在多种技术栈、开发规范,导致开发流程不统一,历史项目越来越难维护。所以我们需要一套完整的解决方案,管理开发到部署整个流程。
@ -41,14 +41,14 @@ Fes.js 是一个好用的前端应用解决方案。提供覆盖编译构建到
它主要具备以下功能:
- 🚀 **快速** 内置了路由、开发、构建等并且提供测试、布局、权限、国际化、状态管理、API 请求、数据字典、SvgIcon 等插件,可以满足大部分日常开发需求。
- 🧨 **简单** ,基于 Vue.js 3.0,上手简单。贯彻“约定优于配置”思想,设计插件上尽可能用约定替代配置,同时提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的 API 入口,一致化的体验,学习起来更轻松。
- 🚀 **快速** 内置了路由、开发、构建等并且提供测试、布局、权限、国际化、状态管理、API 请求、数据字典、SvgIcon 等插件,可以满足大部分日常开发需求。
- 🧨 **简单** ,基于 Vue.js 3.0,上手简单。贯彻“约定优于配置”思想,设计插件上尽可能用约定替代配置,同时提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的 API 入口,一致化的体验,学习起来更轻松。
- 💪 **健壮** ,只需要关心页面内容,减少写 BUG 的机会!提供单元测试、覆盖测试能力保障项目质量。
- 💪 **健壮** ,只需要关心页面内容,减少写 BUG 的机会!提供单元测试、覆盖测试能力保障项目质量。
- 📦 **可扩展** ,借鉴 Umi 实现了完整的生命周期和插件化机制,插件可以管理项目的编译时和运行时,能力均可以通过插件封装进来,在 Fes.js 中协调有序的运行。
- 📦 **可扩展** ,借鉴 Umi 实现了完整的生命周期和插件化机制,插件可以管理项目的编译时和运行时,能力均可以通过插件封装进来,在 Fes.js 中协调有序的运行。
- 📡 **面向未来** ,在满足需求的同时,我们也不会停止对新技术的探索。已使用 Vue3.0 来提升应用性能,已使用 webpack5 和 vite 提升构建性能和实现微服务。
- 📡 **面向未来** ,在满足需求的同时,我们也不会停止对新技术的探索。已使用 Vue3.0 来提升应用性能,已使用 webpack5 和 vite 提升构建性能和实现微服务。
## 插件
@ -58,7 +58,7 @@ Fes.js 是一个好用的前端应用解决方案。提供覆盖编译构建到
| [@fesjs/plugin-enums](http://fesjs.mumblefe.cn/reference/plugin/plugins/enums.html#%E4%BB%8B%E7%BB%8D) | 提供统一的枚举存取及丰富的函数来处理枚举 |
| [@fesjs/plugin-icon](http://fesjs.mumblefe.cn/reference/plugin/plugins/icon.html#%E4%BB%8B%E7%BB%8D) | svg 文件自动注册为组件 |
| [@fesjs/plugin-jest](http://fesjs.mumblefe.cn/reference/plugin/plugins/jest.html#%E5%90%AF%E7%94%A8%E6%96%B9%E5%BC%8F) | 基于 `Jest`,提供单元测试、覆盖测试能力 |
| [ @fesjs/plugin-layout](http://fesjs.mumblefe.cn/reference/plugin/plugins/layout.html) | 简单的配置即可拥有布局,包括导航以及侧边栏 |
| [@fesjs/plugin-layout](http://fesjs.mumblefe.cn/reference/plugin/plugins/layout.html) | 简单的配置即可拥有布局,包括导航以及侧边栏 |
| [@fesjs/plugin-locale](http://fesjs.mumblefe.cn/reference/plugin/plugins/locale.html#%E4%BB%8B%E7%BB%8D) | 基于 `Vue I18n`,提供国际化能力 |
| [@fesjs/plugin-model](http://fesjs.mumblefe.cn/reference/plugin/plugins/model.html#%E4%BB%8B%E7%BB%8D) | 简易的数据管理方案 |
| [@fesjs/plugin-request](http://fesjs.mumblefe.cn/reference/plugin/plugins/request.html#%E5%90%AF%E7%94%A8%E6%96%B9%E5%BC%8F) | 基于 `Axios` 封装的 request内置防止重复请求、请求节流、错误处理等功能 |
@ -99,15 +99,19 @@ npm install
npm run dev
```
## 在 Cloud IDE 中预览
## 项目样例
[https://idegithub.com/WeBankFinTech/fes.js](https://idegithub.com/WeBankFinTech/fes.js)
使用 fes.js 构建的优秀项目,欢迎联系。
| 项目 | 描述 |
|----------------------------------------- | ----------------------------------------- |
| <img src="https://docs.icegl.cn/logo.png" width="100px"> | [三维可视化项目快速落地の开源框架](https://gitee.com/ice-gl/icegl-three-vue-tres) |
## 反馈
| Github Issue | Fes.js 开源运营小助手 |
| ------------------------------------ | ------------------------------------------------------------------------------------------------ |
| [@fesjs/fes.js/issues](../../issues) | <img src="https://cos-1254145788.cos.ap-guangzhou.myqcloud.com/WechatIMG104.jpeg" height="250"/> |
| [@fesjs/fes.js/issues](../../issues) | <img src="https://wanchun-1252303708.cos.ap-nanjing.myqcloud.com/WeChatb7bcfb33e47b8949ced831b8e79ffb0b.jpg" height="250"/> |
## 参与共建
@ -128,4 +132,4 @@ npm run dev
为了 Fes.js 开源项目更好的运转,同时回馈开源社区,社区推出有奖征文活动!欢迎大家投递实践经验,给社区用户,更广泛的开发者提供借鉴。
经验输出也可以帮助到你系统沉淀自有项目,梳理工作思路,也能够帮助你的技术博客做宣传。优秀的实践案例将有机会邀请参与项目社区技术会议分享,赶快来参与吧。
请戳https://mp.weixin.qq.com/s/nV4NG_OUUrdgtft8g_IW4g
请戳:<https://mp.weixin.qq.com/s/nV4NG_OUUrdgtft8g_IW4g>

@ -1,4 +1,3 @@
export const zh = {
'/guide/': [
{
@ -6,12 +5,12 @@ export const zh = {
items: [
{
text: '介绍',
link: '/guide/index.md'
link: '/guide/index.md',
},
{
text: '快速上手',
link: '/guide/getting-started.md'
}
link: '/guide/getting-started.md',
},
],
},
{
@ -19,35 +18,44 @@ export const zh = {
items: [
{
text: '目录结构',
link: '/guide/directory-structure.md'
},{
link: '/guide/directory-structure.md',
},
{
text: 'Vite 和 Webpack 双构建',
link: '/guide/builder.md'
},{
link: '/guide/builder.md',
},
{
text: '编译时配置',
link: '/guide/config.md'
},{
link: '/guide/config.md',
},
{
text: '运行时配置',
link: '/guide/runtime-config.md'
},{
link: '/guide/runtime-config.md',
},
{
text: '环境变量',
link: '/guide/env.md'
},{
link: '/guide/env.md',
},
{
text: '路由',
link: '/guide/route.md'
},{
link: '/guide/route.md',
},
{
text: '插件',
link: '/guide/plugin.md'
},{
link: '/guide/plugin.md',
},
{
text: 'HTML 模板',
link: '/guide/template.md'
},{
link: '/guide/template.md',
},
{
text: 'Mock 数据',
link: '/guide/mock.md'
},{
text: '从 2.0.x 迁移到 3.0.x',
link: '/guide/upgrade3.md'
}
link: '/guide/mock.md',
},
{
text: '从 2.x 迁移到 3.x',
link: '/guide/upgrade3.md',
},
],
},
{
@ -55,102 +63,102 @@ export const zh = {
items: [
{
text: '使用图片',
link: '/guide/image.md'
link: '/guide/image.md',
},
{
text: '使用 css',
link: '/guide/css.md'
link: '/guide/css.md',
},
{
text: '静态资源',
link: '/guide/public.md'
}
link: '/guide/public.md',
},
],
},
{
text: '贡献指南',
link: '/guide/contributing.md'
link: '/guide/contributing.md',
},
{
text: '常见问题',
link: '/guide/faq.md'
link: '/guide/faq.md',
},
],
'/reference/plugin/': [
{
text: '介绍',
link: '/reference/plugin/index.md'
link: '/reference/plugin/index.md',
},
{
text: 'Plugins',
items: [
{
text: '@fesjs/plugin-access',
link: '/reference/plugin/plugins/access.md'
link: '/reference/plugin/plugins/access.md',
},
{
text: '@fesjs/plugin-enums',
link: '/reference/plugin/plugins/enums.md'
link: '/reference/plugin/plugins/enums.md',
},
{
text: '@fesjs/plugin-icon',
link: '/reference/plugin/plugins/icon.md'
link: '/reference/plugin/plugins/icon.md',
},
{
text: '@fesjs/plugin-jest',
link: '/reference/plugin/plugins/jest.md'
link: '/reference/plugin/plugins/jest.md',
},
{
text: '@fesjs/plugin-layout',
link: '/reference/plugin/plugins/layout.md'
link: '/reference/plugin/plugins/layout.md',
},
{
text: '@fesjs/plugin-locale',
link: '/reference/plugin/plugins/locale.md'
link: '/reference/plugin/plugins/locale.md',
},
{
text: '@fesjs/plugin-model',
link: '/reference/plugin/plugins/model.md'
link: '/reference/plugin/plugins/model.md',
},
{
text: '@fesjs/plugin-request',
link: '/reference/plugin/plugins/request.md'
link: '/reference/plugin/plugins/request.md',
},
{
text: '@fesjs/plugin-vuex',
link: '/reference/plugin/plugins/vuex.md'
link: '/reference/plugin/plugins/vuex.md',
},
{
text: '@fesjs/plugin-qiankun',
link: '/reference/plugin/plugins/qiankun.md'
link: '/reference/plugin/plugins/qiankun.md',
},
{
text: '@fesjs/plugin-windicss',
link: '/reference/plugin/plugins/windicss.md'
link: '/reference/plugin/plugins/windicss.md',
},
{
text: '@fesjs/plugin-sass',
link: '/reference/plugin/plugins/sass.md'
link: '/reference/plugin/plugins/sass.md',
},
{
text: '@fesjs/plugin-editor',
link: '/reference/plugin/plugins/editor.md'
link: '/reference/plugin/plugins/editor.md',
},
{
text: '@fesjs/plugin-pinia',
link: '/reference/plugin/plugins/pinia.md'
link: '/reference/plugin/plugins/pinia.md',
},
{
text: '@fesjs/plugin-watermark',
link: '/reference/plugin/plugins/watermark.md'
link: '/reference/plugin/plugins/watermark.md',
},
{
text: '@fesjs/plugin-login',
link: '/reference/plugin/plugins/login.md'
link: '/reference/plugin/plugins/login.md',
},
{
text: '@fesjs/plugin-swc',
link: '/reference/plugin/plugins/swc.md'
link: '/reference/plugin/plugins/swc.md',
},
],
},
@ -158,10 +166,10 @@ export const zh = {
text: '插件开发',
items: [{
text: '插件介绍',
link: '/reference/plugin/dev/index.md'
link: '/reference/plugin/dev/index.md',
}, {
text: '插件API',
link: '/reference/plugin/dev/api.md'
link: '/reference/plugin/dev/api.md',
}],
},
],

@ -6,12 +6,12 @@ import { withBase } from 'vitepress'
## 依赖环境
首先得有 [Node.js](https://nodejs.org/),并确保 node 版本是 12.13 或以上。
首先得有 [Node.js](https://nodejs.org/),并确保 node 版本是 `v18.12.0` 或以上。
```bash
# 打印 node 版本
node -v
v12.13.0
v18.12.0
```
推荐使用 [pnpm](https://pnpm.io/installation) 管理 npm 依赖

@ -1,28 +1,29 @@
# 从 2.0.x 迁移到 3.0.x
# 从 2.x 迁移到 3.x
## 版本 3.0.x 的 break
## 版本 3.x 的 break
1. 编译时的 [base](../reference/config/index.md/#base) 配置,移到了 [router.base](../reference/config/index.md/#router) 下。
2. [webpack-dev-server](https://github.com/webpack/webpack-dev-server) 从 `v3.x` 升级到了 `v4.x`,如果遇到配置不兼容,可以查看[webpack-dev-server 3.x 升级 4.x](https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md)。
3. [layout 插件](../reference/plugin/plugins/layout.md#_4-x-升级到-5-x) 有一些属性变更
3. [request 插件](../reference/plugin/plugins/request.md#_2-x-升级到-3-x) 有一些参数变更
1. 环境要求 `node >= v18.12.0`
2. 编译时的 [base](../reference/config/index.md/#base) 配置,移到了 [router.base](../reference/config/index.md/#router) 下
3. [webpack-dev-server](https://github.com/webpack/webpack-dev-server) 从 `v3.x` 升级到了 `v5.x`,如果遇到配置不兼容,可以查看[webpack-dev-server 3.x 升级 4.x](https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md)、[webpack-dev-server 4.x 升级 5.x](https://github.com/webpack/webpack-dev-server/blob/master/migration-v5.md)
4. [layout 插件](../reference/plugin/plugins/layout.md#_4-x-升级到-5-x) 有一些属性变更
5. [request 插件](../reference/plugin/plugins/request.md#_2-x-升级到-3-x) 有一些参数变更,升级请使用最新版本
## 继续使用 Webpack
1. 添加 Webpack 构建依赖包: `npm i @fesjs/builder-webpack -D`
2. 如果设置了 `publicPath: './'`,请更改为 `publicPath: ''`
3. 如果有,`public/index.html` 文件挪到项目根目录,移除 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) 相关配置,具体模版变量使用请查看[HTML 模版](../guide/template.html)
1. 添加 Webpack 构建依赖包: `npm i @fesjs/builder-webpack -D`
2. `dev``publicPath` 配置不能为 `./`,请更改为 `auto`
3. 将 html 模版文件从 `public/index.html` 挪到项目根目录,移除 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) 相关配置,具体模版变量使用请查看[HTML 模版](../guide/template.html)
## 换成 Vite
1. 安装依赖包 `npm i @fesjs/builder-vite`
2. 将 Webpack 相关的配置换成 Vite具体可查看[配置](../reference/config/index.md)
3. 将 html 模版文件从 `public/index.html` 挪到项目根目录,如果有相应的 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) 配置,需要改成 [vite-plugin-html](https://github.com/vbenjs/vite-plugin-html) 的写法
4. 将 `require` 等 Vite 不支持的代码,改写成 Vite 支持的方式
1. 安装依赖包 `npm i @fesjs/builder-vite`
2. 将 Webpack 相关的配置换成 Vite具体可查看[配置](../reference/config/index.md)
3. 将 html 模版文件从 `public/index.html` 挪到项目根目录,如果有相应的 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) 配置,需要改成 [vite-plugin-html](https://github.com/vbenjs/vite-plugin-html) 的写法
4. 将 `require` 等 Vite 不支持的代码,改写成 Vite 支持的方式
## 插件
插件都需要升级到 `3.0.x` 版本,新版添加了兼容`builder`的逻辑,但是提供的接口和配置没有变化,只需要升级版本即可使用。
插件都需要升级到 `3.x` 版本,新版添加了兼容`builder`的逻辑,但是提供的接口和配置没有变化,只需要升级版本即可使用。
- [@fesjs/plugin-layout](../reference/plugin/plugins/layout.md) 需要升级到`5.0.x`版本。
- [@fesjs/plugin-locale](../reference/plugin/plugins/locale.md) 需要升级到`4.0.x`版本。

@ -64,6 +64,6 @@ npm run dev
| Github Issue | Fes.js 开源运营小助手 |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| [@fesjs/fes.js/issues](https://github.com/WeBankFinTech/fes.js/issues) | <img src="https://cos-1254145788.cos.ap-guangzhou.myqcloud.com/WechatIMG104.jpeg" height="250"/> |
| [@fesjs/fes.js/issues](https://github.com/WeBankFinTech/fes.js/issues) | <img src="https://wanchun-1252303708.cos.ap-nanjing.myqcloud.com/WeChatb7bcfb33e47b8949ced831b8e79ffb0b.jpg" height="250"/> |
</HomeContent>

Binary file not shown.

After

(image error) Size: 58 KiB

@ -93,6 +93,22 @@ export default {
};
```
### console
- 类型: `object`
- 默认值:`{}`
- 详情:
用于控制应用启动的时候在 console 中打印的信息,目前仅支持 version
- 示例:
```js
export default {
console: {
version: true
}
};
```
### define
- 类型: `object`

@ -8,16 +8,16 @@ import { withBase } from 'vitepress'
为了进一步降低研发成本,我们将布局利用 `fes.js` 插件的方式内置,只需通过简单的配置即可拥有布局,包括导航以及侧边栏。从而做到用户无需关心布局。
- 侧边栏菜单数据根据路由中的配置自动生成。
- 布局,提供 `side``top``mixin``left-right`种布局。
- 主题,提供 `light``dark` 两种主题。
- 默认实现对路由的 404、403 处理。
- 搭配 [@fesjs/plugin-access](./access.html) 插件使用,可以完成对路由的权限控制。
- 搭配 [@fesjs/plugin-locale](./locale.html) 插件使用,提供切换语言的能力。
- 支持自定义头部或者侧边栏区域。
- 菜单支持配置 icon。
- 菜单标题支持国际化。
- 可配置页面是否需要 layout。
- 侧边栏菜单数据根据路由中的配置自动生成。
- 布局,提供 `side``top``mixin``left-right``top-left-right`种布局。
- 主题,提供 `light``dark` 两种主题。
- 默认实现对路由的 404、403 处理。
- 搭配 [@fesjs/plugin-access](./access.html) 插件使用,可以完成对路由的权限控制。
- 搭配 [@fesjs/plugin-locale](./locale.html) 插件使用,提供切换语言的能力。
- 支持自定义头部或者侧边栏区域。
- 菜单支持配置 icon。
- 菜单标题支持国际化。
- 可配置页面是否需要 layout。
## 启用方式
@ -34,7 +34,7 @@ import { withBase } from 'vitepress'
## 布局类型
配置参数是 `navigation`, 布局有三种类型 `side``mixin``top``left-right` 默认是 `side`
配置参数是 `navigation`, 布局有五种类型 `side``mixin``top``left-right``top-left-right` 默认是 `side`
### side
@ -53,9 +53,12 @@ import { withBase } from 'vitepress'
### left-right
<!-- ![mixin](/mixin.png) -->
<!-- ![mixin](/left-right.png) -->
<img :src="withBase('left-right.png')" alt="left-right">
<!-- ![mixin](/top-left-right.png) -->
<img :src="withBase('top-left-right.png')" alt="top-left-right">
### 页面个性化
可以为页面单独设置布局类型:
@ -127,7 +130,14 @@ export default {
}, {
name: 'simpleList'
}],
// 403 页面配置
403: {
title: '没有访问权限,请联系管理人员',
},
// 404 页面配置
404: {
title: '哎呀!这个页面找不到了',
}
},
};
```
@ -179,58 +189,58 @@ export function layout(layoutConfig, { initialState }) {
### footer
- **类型**`String`
- **默认值**`null`
- **类型**`String`
- **默认值**`null`
- **详情**:页面底部的文字。
- **详情**:页面底部的文字。
### theme
- **类型**`String`
- **默认值**`dark`
- **类型**`String`
- **默认值**`dark`
- **详情**:主题,可选有 `dark``light`
- **详情**:主题,可选有 `dark``light`
### navigation
- **类型**`String`
- **默认值**`side`
- **类型**`String`
- **默认值**`side`
- **详情**:页面布局类型,可选有 `side``top``mixin`
- **详情**:页面布局类型,可选有 `side``top``mixin`
### navigationOnError
- **类型**`String``Function`
- **类型**`String``Function`
- **详情**:指定 `403``404` 时,页面的布局类型。值同 `navigation`。也支持函数返回。
- **详情**:指定 `403``404` 时,页面的布局类型。值同 `navigation`。也支持函数返回。
### isFixedHeader
- **类型**`Boolean`
- **默认值**`false`
- **类型**`Boolean`
- **默认值**`false`
- **详情**:是否固定头部,不跟随页面滚动。
- **详情**:是否固定头部,不跟随页面滚动。
### isFixedSidebar
- **类型**`Boolean`
- **默认值**`true`
- **类型**`Boolean`
- **默认值**`true`
- **详情**:是否固定 sidebar不跟随页面滚动。
- **详情**:是否固定 sidebar不跟随页面滚动。
### title
- **类型**`String`
- **默认值**:默认为 [编译时配置 title](../../../reference/config/#title)
- **类型**`String`
- **默认值**:默认为 [编译时配置 title](../../../reference/config/#title)
- **详情**:产品名。
- **详情**:产品名,当配置为"$"开头时,开启国际化,使用`$`后面的内容去匹配语言设置
### logo
- **类型**`String`
- **默认值**:默认提供 `fes.js` 的 Logo
- **类型**`String`
- **默认值**:默认提供 `fes.js` 的 Logo
- **详情**Logo 的链接,例如在 public/logo.png 放了一个 logo可以这么配置([BASE_URL 来自这里](../../../guide/env#process-env))
- **详情**Logo 的链接,例如在 public/logo.png 放了一个 logo可以这么配置([BASE_URL 来自这里](../../../guide/env#process-env))
```js
export const layout = {
@ -240,25 +250,29 @@ export const layout = {
### multiTabs
- **类型**`boolean`
- **默认值**`false`
- **类型**`boolean`
- **默认值**`false`
- **详情**:是否开启多页。
- **详情**:是否开启多页。可通过 tabReload: false 控制标签页是否重新加载。
### menus
- **类型**`[] | () => Ref<[]> | () => []`
- **默认值**`[]`
- **类型**`[] | () => Ref<[]> | () => []`
- **默认值**`[]`
- **详情**:菜单配置
- **详情**:菜单配置
子项具体配置如下:
- **name**:菜单的名称。通过匹配 `name` 和路由元信息 [meta](../../../guide/route.md#扩展路由元信息) 中的 `name`,把菜单和路由关联起来, 然后使用路由元信息补充菜单配置,比如 `title``path`  等。
- **name**:菜单的名称。通过匹配 `name` 和路由元信息 [meta](../../../guide/route.md#扩展路由元信息) 中的 `name`,把菜单和路由关联起来, 然后使用路由元信息补充菜单配置,比如 `title``path`  等。
- **path**:菜单的路径,可配置第三方地址。
- **path**:菜单的路径,可配置第三方地址。
- **match (v4.0.0+**:额外匹配的路径,当前路由命中匹配规则时,此菜单高亮。
- **query**:同 vue-router 的 query 参数。
- **params**:同 vue-router 的 params 参数。
- **match (v4.0.0+**:额外匹配的路径,当前路由命中匹配规则时,此菜单高亮。
```
{
@ -267,17 +281,17 @@ export const layout = {
}
```
- **title**:菜单的标题。
- **title**:菜单的标题。
- 如果同时使用[国际化插件](./locale.md),而且`title`的值以`$`开头,则使用`$`后面的内容去匹配语言设置。
- 如果同时使用[国际化插件](./locale.md),而且`title`的值以`$`开头,则使用`$`后面的内容去匹配语言设置。
- title 支持配置函数,对应 Fes Design 中 Menu 组件的`label`插槽。仅在运行时配置中支持。
- title 支持配置函数,对应 Fes Design 中 Menu 组件的`label`插槽。仅在运行时配置中支持。
- **icon**: 菜单的图标,只一级标题展示图标。
- **icon**: 菜单的图标,只一级标题展示图标。
- 图标使用[fes-design icon](https://fes-design-4gvn317r3b6bfe17-1254145788.ap-shanghai.app.tcloudbase.com/zh/components/icon.html),编译时配置使用组件名称,我们会自动引入组件。
- 图标使用[fes-design icon](https://fes-design-4gvn317r3b6bfe17-1254145788.ap-shanghai.app.tcloudbase.com/zh/components/icon.html),编译时配置使用组件名称,我们会自动引入组件。
- 图标使用本地或者远程 svg 图片。
- 图标使用本地或者远程 svg 图片。
```js
{
@ -285,7 +299,8 @@ export const layout = {
}
```
- **children**:子菜单配置。
- **children**:子菜单配置。
- **_blank**:是否在新的窗口打开页面,默认 http 开头的链接在新窗口打开
:::tip
函数类型仅在运行时可用,可以实现动态变更菜单。
@ -293,42 +308,42 @@ export const layout = {
### menuProps
- **类型**`Object`
- **默认值**`{}`
- **类型**`Object`
- **默认值**`{}`
- **详情**:菜单的配置:
- **详情**:菜单的配置:
- **defaultExpandAll**:是否默认展开全部菜单。
- **defaultExpandAll**:是否默认展开全部菜单。
- **expandedKeys**:配置默认展开的菜单,需要传子项是菜单路径的数组。
- **expandedKeys**:配置默认展开的菜单,需要传子项是菜单路径的数组。
- **accordion**:是否只保持一个子菜单的展开。
- **accordion**:是否只保持一个子菜单的展开。
### sideWidth
- **类型**`Number`
- **默认值**`200`
- **类型**`Number`
- **默认值**`200`
- **详情**sidebar 的宽度
- **详情**sidebar 的宽度
### renderCustom
- **类型** `()=> VNodes`
- **默认值**`null`
- **类型** `()=> VNodes`
- **默认值**`null`
- **详情** 自定义区域内容,仅运行时。
- **详情** 自定义区域内容,仅运行时。
### unAccessHandler
- **类型**`({ to, from, next})=> void`
- **默认值**`null`
- **类型**`({ to, from, next})=> void`
- **默认值**`null`
- **详情**:仅运行时,当进入某个路由时,如果路由对应的页面不属于可见资源列表,则会暂停进入,调用 `unAccessHandler` 函数。
- **参数**
- routercreateRouter 创建的路由实例
- to 准备进入的路由
- from离开的路由
- next [next 函数](https://next.router.vuejs.org/zh/guide/advanced/navigation-guards.html#%E5%8F%AF%E9%80%89%E7%9A%84%E7%AC%AC%E4%B8%89%E4%B8%AA%E5%8F%82%E6%95%B0-next)
- **详情**:仅运行时,当进入某个路由时,如果路由对应的页面不属于可见资源列表,则会暂停进入,调用 `unAccessHandler` 函数。
- **参数**
- routercreateRouter 创建的路由实例
- to 准备进入的路由
- from离开的路由
- next [next 函数](https://next.router.vuejs.org/zh/guide/advanced/navigation-guards.html#%E5%8F%AF%E9%80%89%E7%9A%84%E7%AC%AC%E4%B8%89%E4%B8%AA%E5%8F%82%E6%95%B0-next)
比如:
@ -350,15 +365,15 @@ export const layout = {
### noFoundHandler
- **类型**`({ to, from, next})=> void`
- **默认值**`null`
- **类型**`({ to, from, next})=> void`
- **默认值**`null`
- **详情**:仅运行时,当进入某个路由时,如果路由对应的页面不存在,则会调用 `noFoundHandler` 函数。
- **参数**
- routercreateRouter 创建的路由实例
- to 准备进入的路由
- from离开的路由
- next [next 函数](https://next.router.vuejs.org/zh/guide/advanced/navigation-guards.html#%E5%8F%AF%E9%80%89%E7%9A%84%E7%AC%AC%E4%B8%89%E4%B8%AA%E5%8F%82%E6%95%B0-next)
- **详情**:仅运行时,当进入某个路由时,如果路由对应的页面不存在,则会调用 `noFoundHandler` 函数。
- **参数**
- routercreateRouter 创建的路由实例
- to 准备进入的路由
- from离开的路由
- next [next 函数](https://next.router.vuejs.org/zh/guide/advanced/navigation-guards.html#%E5%8F%AF%E9%80%89%E7%9A%84%E7%AC%AC%E4%B8%89%E4%B8%AA%E5%8F%82%E6%95%B0-next)
比如:
@ -376,7 +391,7 @@ export const layout = {
## API
### useTabTitle
### useTabTitle建议使用useLayout
类型定义如下:
@ -397,6 +412,18 @@ titleRef.value = 'changed';
</script>
```
### useLayout
类型定义如下:
```ts
function useLayout(options: { title?: string }): { title: Ref<string>; reloadTab: () => void; closeTab: () => void };
```
- title: 更新当前页签的标题
- reloadTab重载当前页签
- closeTab关闭当前页签
## 4.x 升级到 5.x
1. 个性化 layout 配置改为使用传入 navigation

@ -69,11 +69,9 @@ export default {
想了解更多语言信息配置、匹配规则,请参考 [Vue I18n](https://vue-i18n.intlify.dev/guide/essentials/syntax.html) 文档。
### 多层配置
如果国际化内容较多,希望模块化配置,则可以这样:
```
如果国际化内容较多,希望模块化配置,则可以这样:
src
├── locales
│ ├── zh-CN.js
@ -84,6 +82,7 @@ src
└── pages
│ └── index.vue
└── app.js
```
插件会把相同语言的配置合并在一起!
@ -115,37 +114,49 @@ export default {
#### locale
- **类型**`String`
- **默认值**`zh-CN`
- **类型**`String`
- **默认值**`zh-CN`
- **详情**:当前的语言。
- **详情**:当前的语言。
#### fallbackLocale
- **类型**`String`
- **默认值**`zh-CN`
- **类型**`String`
- **默认值**`zh-CN`
- **详情**:兜底的语言,如果当前语言找不到配置,则使用默认语言,需要保证默认语言配置文件存在。
- **详情**:兜底的语言,如果当前语言找不到配置,则使用默认语言,需要保证默认语言配置文件存在。
#### baseNavigator
- **类型**`Boolean`
- **默认值**`true`
- **类型**`Boolean`
- **默认值**`true`
- **详情**:开启浏览器语言检测。
- **详情**:开启浏览器语言检测。
默认情况下,当前语言环境的识别按照:`localStorage``fes_locale` 值 > 浏览器检测 > `default` 设置的默认语言 > `zh-CN` 中文。
#### legacy
- **类型**`Boolean`
- **默认值**`false`
- **类型**`Boolean`
- **默认值**`false`
- **详情**:用户是否需要 Legacy API 模式
- **详情**:用户是否需要 Legacy API 模式
### 运行时配置
暂无。
## onLocaleChange
当语言环境发生变化时,会触发此函数。
```js
import { defineRuntimeConfig } from '@fesjs/fes';
export default defineRuntimeConfig({
onLocaleChange: ({ t, locale }) => {
}
});
```
## API
@ -159,16 +170,16 @@ import { locale } from '@fesjs/fes';
#### locale.messages
- **类型**`Object`
- **详情**:当前的配置的语言信息。
- **类型**`Object`
- **详情**:当前的配置的语言信息。
#### locale.setLocale
- **类型**`Function`
- **详情**:设置当前的语言。
- **参数**
- locale语言的名称应该是符合 `<lang>-<COUNTRY>` 规范的名称。
- **返回值**`null`
- **类型**`Function`
- **详情**:设置当前的语言。
- **参数**
- locale语言的名称应该是符合 `<lang>-<COUNTRY>` 规范的名称。
- **返回值**`null`
```js
import { locale } from '@fesjs/fes';
@ -177,12 +188,12 @@ locale.setLocale({ locale: 'en-US' });
#### locale.addLocale
- **类型**`Function`
- **详情**:手动添加语言配置。
- **参数**
- locale语言的名称符合 `<lang>-<COUNTRY>` 规范的名称。
- messages, 语言信息。
- **返回值**`null`
- **类型**`Function`
- **详情**:手动添加语言配置。
- **参数**
- locale语言的名称符合 `<lang>-<COUNTRY>` 规范的名称。
- messages, 语言信息。
- **返回值**`null`
```js
import { locale } from '@fesjs/fes';
@ -191,10 +202,10 @@ locale.addLocale({ locale: 'ja-JP', messages: { test: 'テスト' } });
#### locale.getAllLocales
- **类型**`Function`
- **详情**:获取当前获得所有国际化文件的列表,默认会在 locales 文件夹下寻找类似 `en-US.js` 文件。
- **参数**null
- **返回值**`Array`
- **类型**`Function`
- **详情**:获取当前获得所有国际化文件的列表,默认会在 locales 文件夹下寻找类似 `en-US.js` 文件。
- **参数**null
- **返回值**`Array`
```js
import { locale } from '@fesjs/fes';

@ -2,7 +2,6 @@
import antfu from '@antfu/eslint-config';
export default await antfu({
files: ['**/*.js', '**/*.jsx', '**/*.vue', '**/*.ts'],
// TODO: 使用 ignore 代替 cli 命令中的配置
stylistic: {
indent: 4,

@ -1,8 +1,9 @@
{
"name": "fes.js",
"type": "module",
"version": "3.1.6",
"version": "3.4.11",
"private": true,
"packageManager": "pnpm@8.6.6",
"description": "一个好用的前端管理台快速开发框架",
"preferGlobal": true,
"workspaces": [
@ -39,18 +40,18 @@
"semver": "^7.3.6"
},
"devDependencies": {
"@antfu/eslint-config": "^2.6.2",
"@antfu/eslint-config": "^3.8.0",
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"chokidar": "^3.5.3",
"commitizen": "^4.3.0",
"commitizen": "^4.3.1",
"cz-conventional-changelog": "^3.3.0",
"deepmerge": "^4.2.2",
"eslint": "^8.56.0",
"eslint": "^9.13.0",
"fs-extra": "^11.1.1",
"lint-staged": "^15.2.0",
"simple-git-hooks": "^2.9.0",
"typescript": "^5.0.4",
"typescript": "^5.6.3",
"vitepress": "1.0.0-alpha.73",
"vue": "^3.3.4",
"yargs-parser": "^21.1.1"

@ -1,39 +1,39 @@
{
"name": "@fesjs/create-fes-app",
"version": "3.0.2",
"description": "create a app base on fes.js",
"main": "lib/index.js",
"files": [
"lib",
"bin",
"templates/**/*"
],
"bin": {
"create-fes-app": "bin/create-fes-app.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/create-fes-app"
},
"keywords": [
"fes"
],
"sideEffects": false,
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1",
"fs-extra": "^11.1.1",
"inquirer": "^7.3.3",
"readline": "^1.3.0",
"validate-npm-package-name": "^3.0.0"
}
"name": "@fesjs/create-fes-app",
"version": "3.0.6",
"description": "create a app base on fes.js",
"main": "lib/index.js",
"files": [
"lib",
"bin",
"templates/**/*"
],
"bin": {
"create-fes-app": "bin/create-fes-app.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/create-fes-app"
},
"keywords": [
"fes"
],
"sideEffects": false,
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.3",
"fs-extra": "^11.1.1",
"inquirer": "^7.3.3",
"readline": "^1.3.0",
"validate-npm-package-name": "^3.0.0"
}
}

@ -17,8 +17,8 @@
},
"dependencies": {
"@fesjs/fes": "^3.0.0",
"@fesjs/plugin-access": "^3.0.0",
"@fesjs/plugin-layout": "^5.0.0",
"@fesjs/plugin-access": "^3.1.9",
"@fesjs/plugin-layout": "^5.4.3",
"@fesjs/plugin-model": "^3.0.0",
"@fesjs/plugin-enums": "^3.0.0",
"@fesjs/fes-design": "^0.8.0",
@ -27,4 +27,4 @@
"core-js": "^3.29.1"
},
"private": true
}
}

@ -1,6 +1,6 @@
{
"name": "@fesjs/builder-vite",
"version": "4.0.2",
"version": "4.0.5",
"description": "@fesjs/builder-vite",
"author": "qlin",
"license": "MIT",
@ -25,12 +25,12 @@
"access": "public"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.8",
"@fesjs/fes": "^3.1.12",
"core-js": "^3.29.1"
},
"dependencies": {
"@babel/core": "^7.23.3",
"@fesjs/utils": "^3.0.1",
"@fesjs/utils": "^3.0.3",
"@rollup/pluginutils": "^5.1.0",
"@vitejs/plugin-basic-ssl": "^1.0.2",
"@vitejs/plugin-legacy": "^5.2.0",

@ -25,7 +25,7 @@ export default async (api, args) => {
args: {},
});
const isHTTPS = !!(process.env.HTTPS || args.https);
const isHTTPS = !!(process.env.HTTPS || args.https || api.config.viteOption.server?.https);
const bundleConfig = deepmerge(getInnerCommonConfig(api), {
mode: 'development',

@ -1,6 +1,6 @@
{
"name": "@fesjs/builder-webpack",
"version": "3.0.12",
"version": "3.1.0",
"description": "@fesjs/builder-webpack",
"author": "qlin",
"license": "MIT",
@ -26,7 +26,7 @@
"access": "public"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.10",
"@fesjs/fes": "^3.1.17",
"core-js": "^3.29.1"
},
"dependencies": {
@ -38,7 +38,7 @@
"@babel/plugin-transform-runtime": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@fesjs/utils": "^3.0.1",
"@fesjs/utils": "^3.0.3",
"@vue/babel-plugin-jsx": "^1.2.2",
"ajv": "^8.12.0",
"autoprefixer": "^10.4.14",
@ -52,7 +52,7 @@
"fs-extra": "^11.1.1",
"get-folder-size": "^2.0.1",
"html-webpack-plugin": "^5.5.0",
"html-webpack-tags-plugin": "^3.0.0",
"html-webpack-tags-plugin": "^3.0.2",
"less": "^4.1.3",
"less-loader": "^11.1.0",
"mini-css-extract-plugin": "^2.8.1",
@ -66,7 +66,7 @@
"webpack": "^5.90.3",
"webpack-5-chain": "^8.0.1",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-dev-server": "^4.15.1",
"webpackbar": "^5.0.2"
"webpack-dev-server": "^5.1.0",
"webpackbar": "^7.0.0"
}
}

@ -1,19 +1,28 @@
import { extname } from 'path';
import { extname } from 'node:path';
import historyFallback from 'connect-history-api-fallback';
const ASSET_EXT_NAMES = ['.ico', '.png', '.jpg', '.jpeg', '.gif', '.svg'];
const proxyMiddleware = (api) => (req, res, next) => {
const proxyConfig = api.config.proxy;
if (proxyConfig && Object.keys(proxyConfig).some((path) => req.url.startsWith(path))) {
return next();
}
if (ASSET_EXT_NAMES.includes(extname(req.url))) {
return next();
}
function proxyMiddleware(api) {
return (req, res, next) => {
const proxyConfig = api.config.proxy;
if (proxyConfig) {
if (Array.isArray(proxyConfig)) {
if (proxyConfig.some(item => item.context.some(path => path && req.url.startsWith(path)))) {
return next();
}
}
else if (Object.keys(proxyConfig).some(path => req.url.startsWith(path))) {
return next();
}
}
if (ASSET_EXT_NAMES.includes(extname(req.url))) {
return next();
}
const history = historyFallback();
history(req, res, next);
};
const history = historyFallback();
history(req, res, next);
};
}
export default proxyMiddleware;

@ -1,6 +1,23 @@
import WebpackDevServer from 'webpack-dev-server';
import webpack from 'webpack';
import { chalk } from '@fesjs/utils';
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
function formatProxy(proxy) {
if (!proxy) {
return [];
}
if (Array.isArray(proxy)) {
return proxy;
}
return Object.keys(proxy).map((apiPath) => {
return {
context: [apiPath],
...proxy[apiPath],
};
});
}
export function startDevServer({ webpackConfig, host, port, proxy, https, beforeMiddlewares, afterMiddlewares, customerDevServerConfig }) {
const options = {
@ -10,6 +27,7 @@ export function startDevServer({ webpackConfig, host, port, proxy, https, before
client: {
logging: 'error',
overlay: false,
progress: true,
webSocketURL: {
hostname: host,
port,
@ -27,12 +45,20 @@ export function startDevServer({ webpackConfig, host, port, proxy, https, before
...(customerDevServerConfig || {}),
port,
host,
proxy,
proxy: formatProxy(proxy),
};
const compiler = webpack(webpackConfig);
const server = new WebpackDevServer(options, compiler);
console.log(chalk.green('Server: '), chalk.blue(`${options.server}://${options.host}:${options.port}`));
if (options.host === '0.0.0.0') {
// eslint-disable-next-line no-console
console.log(chalk.green(' ➜ Local: '), chalk.cyan(`${options.server}://127.0.0.1:${options.port}`));
// eslint-disable-next-line no-console
console.log(chalk.gray(' ➜ Network: '), chalk.gray(`${options.server}://${options.host}:${options.port}`));
}
else {
// eslint-disable-next-line no-console
console.log(chalk.green(' ➜ :Local: '), chalk.cyan(`${options.server}://${options.host}:${options.port}`));
}
server.startCallback((err) => {
if (err) {
console.error(err);

@ -1,5 +1,6 @@
import path from 'path';
import fs from 'fs';
import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import { cleanTmpPathExceptCache, getBundleAndConfigs } from '../../common/buildDevUtils';
import connectHistoryMiddleware from './connectHistoryMiddleware';

@ -1,13 +1,13 @@
import { join } from 'node:path';
import { existsSync } from 'node:fs';
import Config from 'webpack-5-chain';
import { join } from 'node:path';
import webpack from 'webpack';
import Config from 'webpack-5-chain';
import createCssWebpackConfig from './css';
import getBabelOpts from './getBabelOpts';
import createVueWebpackConfig from './vue';
import createDefineWebpackConfig from './define';
import createMinimizerWebpackConfig from './minimizer';
import getBabelOpts from './getBabelOpts';
import createHtmlWebpackConfig from './html';
import createMinimizerWebpackConfig from './minimizer';
import createVueWebpackConfig from './vue';
const DEFAULT_EXCLUDE_NODE_MODULES = [
'vue',
@ -124,12 +124,14 @@ export default async function getConfig({ api, cwd, config, env, entry = {}, mod
webpackConfig.module
.rule('esm')
.test(/\.m?jsx?$/)
.resolve.set('fullySpecified', false);
.resolve
.set('fullySpecified', false);
webpackConfig.module
.rule('js')
.test(/\.(js|mjs|jsx|ts|tsx)$/)
.exclude.add((filepath) => {
.exclude
.add((filepath) => {
// always transpile js in vue files
if (/(\.vue|\.jsx)$/.test(filepath)) { return false; }
@ -147,9 +149,11 @@ export default async function getConfig({ api, cwd, config, env, entry = {}, mod
webpackConfig.module
.rule('js-in-node_modules')
.test(/\.(js|mjs)$/)
.include.add(/node_modules/)
.include
.add(/node_modules/)
.end()
.exclude.add((filepath) => {
.exclude
.add((filepath) => {
if (transpileDepRegex && transpileDepRegex.test(filepath)) { return true; }
return false;

@ -1,37 +1,36 @@
{
"name": "@fesjs/compiler",
"version": "3.0.2",
"description": "@fesjs/compiler",
"main": "lib/index.js",
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-compiler"
},
"keywords": [
"fes"
],
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/register": "^7.22.15",
"@fesjs/utils": "^3.0.1",
"commander": "^7.0.0",
"dotenv": "8.2.0",
"joi": "17.3.0",
"set-value": "3.0.2",
"tapable": "^2.2.0"
}
"name": "@fesjs/compiler",
"version": "3.0.6",
"description": "@fesjs/compiler",
"author": "qlin",
"license": "MIT",
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-compiler"
},
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"keywords": [
"fes"
],
"main": "lib/index.js",
"files": [
"lib"
],
"publishConfig": {
"access": "public"
},
"dependencies": {
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/register": "^7.22.15",
"@fesjs/utils": "^3.0.3",
"commander": "^7.0.0",
"dotenv": "8.2.0",
"joi": "17.3.0",
"tapable": "^2.2.0"
}
}

@ -1,17 +1,16 @@
import { lodash } from '@fesjs/utils';
import set from 'set-value';
export function updateUserConfigWithKey({
key,
value,
userConfig
userConfig,
}) {
set(userConfig, key, value);
lodash.set(userConfig, key, value);
}
export function getUserConfigWithKey({
key,
userConfig
userConfig,
}) {
return lodash.get(userConfig, key);
}

@ -1,6 +1,6 @@
{
"name": "@fesjs/plugin-access",
"version": "3.1.4",
"version": "3.1.9",
"description": "@fesjs/plugin-access",
"main": "lib/index.js",
"files": [
@ -28,11 +28,11 @@
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1",
"@fesjs/utils": "^3.0.3",
"lodash-es": "^4.17.21"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.9",
"@fesjs/fes": "^3.1.13",
"vue": "^3.2.47",
"vue-router": "^4.0.1"
},

@ -1,7 +1,7 @@
import { reactive, unref, computed, inject } from "vue";
import createDirective from "./createDirective";
import { computed, reactive, unref } from "vue";
import { isPlainObject } from "{{{ lodashPath }}}";
import createComponent from "./createComponent";
import {isPlainObject} from "{{{ lodashPath }}}";
import createDirective from "./createDirective";
function isPromise(obj) {
return (
@ -20,12 +20,23 @@ const state = reactive({
const rolePromiseList = [];
const accessPromiseList = [];
// 预设的 accessId且不会被移除
const presetAccessIds = []
const setPresetAccess = (access) => {
const accessIds = Array.isArray(access) ? access : [access];
presetAccessIds.push(...accessIds.filter(id => !presetAccessIds.includes(id)));
}
const getAllowAccessIds = () => {
const result = [...presetAccessIds, ...state.currentAccessIds];
const roleAccessIds = state.roles[state.currentRoleId];
if (Array.isArray(roleAccessIds) && roleAccessIds.length > 0) {
return state.currentAccessIds.concat(roleAccessIds);
result.push(...roleAccessIds);
}
return state.currentAccessIds;
return result;
};
const _syncSetAccessIds = (promise) => {
@ -134,8 +145,13 @@ export const install = (app) => {
app.component("Access", createComponent(useAccess));
};
export const hasAccessSync = (path) => {
return match(unref(path), getAllowAccessIds());
}
export const access = {
hasAccess,
hasAccessSync,
isDataReady,
setRole,
getRole: () => {
@ -144,12 +160,9 @@ export const access = {
setAccess,
match,
getAccess: getAllowAccessIds,
setPresetAccess,
};
export const hasAccessSync = (path) => {
return match(unref(path), getAllowAccessIds());
}
export const useAccess = (path) => {
const allowPageIds = computed(getAllowAccessIds);
const result = computed(() => {

@ -13,7 +13,10 @@ export default function createDirective(useAccess) {
beforeMount(el) {
const ctx = {};
ctx.watch = (path) => {
el._display = el._display || el.style.display;
// el._display = el._display || el.style.display; // 这种只能获取到行内样式 会导致保存不了组件加载时的初始display
if (!el._display) {
el._display = window.getComputedStyle(el).display
}
const access = useAccess(path);
setDisplay(el, access);
return watch(access, () => {

@ -3,10 +3,14 @@ import type { Ref } from 'vue';
export const access: {
hasAccess: (accessId: string | number) => Promise<boolean>;
hasAccessSync: (accessId: string | number) => boolean;
isDataReady: () => boolean;
setRole: (roleId: string | Promise<string>) => void;
getRole: () => string;
setAccess: (accessIds: Array<string | number> | Promise<Array<string | number>>) => void;
getAccess: () => string[];
match: (path: string, accessIds: string[]) => boolean;
setPresetAccess: (accessId: string | string[]) => void;
};
export function useAccess(accessId: string | number): Ref<boolean>;

@ -1,38 +1,38 @@
{
"name": "@fesjs/plugin-icon",
"version": "3.0.0",
"description": "@fesjs/plugin-icon",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-icon"
},
"keywords": [
"fes"
],
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@fesjs/fes": "^3.0.0",
"vue": "^3.2.47"
},
"dependencies": {
"svgo": "^3.0.2"
},
"typings": "./types.d.ts"
"name": "@fesjs/plugin-icon",
"version": "4.0.0",
"description": "@fesjs/plugin-icon",
"author": "qlin",
"license": "MIT",
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-icon"
},
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"keywords": [
"fes"
],
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@fesjs/fes": "^3.0.0",
"vue": "^3.2.47"
},
"dependencies": {
"svgo": "^3.0.2"
},
"typings": "./types.d.ts"
}

@ -1,5 +1,5 @@
import { extname, basename } from 'path';
import { statSync, readFileSync } from 'fs';
import { basename, extname } from 'node:path';
import { readFileSync, statSync } from 'node:fs';
import { optimize } from 'svgo';
const presetDefault = [
@ -15,7 +15,7 @@ const presetDefault = [
{
name: 'removeAttrs',
params: {
attrs: '(fill|stroke|class)',
attrs: '(class)',
},
},
];

@ -1,8 +1,8 @@
import { computed } from 'vue';
// eslint-disable-next-line
import icons from '../icons';
const noop = () => {};
function noop() {}
export default {
name: 'FesIcon',
@ -19,9 +19,9 @@ export default {
const svgStyle = computed(() =>
props.rotate
? {
msTransform: `rotate(${props.rotate}deg)`,
transform: `rotate(${props.rotate}deg)`,
}
msTransform: `rotate(${props.rotate}deg)`,
transform: `rotate(${props.rotate}deg)`,
}
: null,
);
const svgCls = computed(() => ({

@ -29,6 +29,7 @@
&[tabindex] {
cursor: pointer;
}
&--spin {
display: inline-block;
animation: loadingCircle 1s infinite linear;
@ -46,5 +47,5 @@
transform: rotate(360deg);
}
}
}

@ -1,6 +1,6 @@
{
"name": "@fesjs/plugin-layout",
"version": "5.1.10",
"version": "5.4.6",
"description": "@fesjs/plugin-layout",
"author": "harrywan",
"license": "MIT",
@ -28,14 +28,15 @@
"access": "public"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.9",
"@fesjs/fes": "^3.1.17",
"@fesjs/fes-design": ">=0.7.0",
"vue": "^3.2.47",
"vue-router": "^4.0.1"
},
"dependencies": {
"@fesjs/utils": "^3.0.1",
"@vueuse/core": "^10.7.0"
"@fesjs/utils": "^3.0.3",
"@vueuse/core": "^10.7.0",
"dompurify": "^3.1.7"
},
"typings": "./types.d.ts"
}

@ -30,6 +30,13 @@ export default (api) => {
const absRuntimeFilePath = join(namespace, 'runtime.js');
api.register({
key: 'addExtraLocales',
fn: () => [
join(api.paths.absTmpPath, namespace, 'locales'),
],
});
api.onGenerateFiles(async () => {
// .fes配置
const userConfig = {
@ -115,6 +122,7 @@ export default (api) => {
return [
{
path: '/',
name: 'fesLayout',
component: winPath(join(api.paths.absTmpPath || '', absFilePath)),
children: routes,
},

@ -1,4 +1,4 @@
const getMetaByName = (config, name) => {
function getMetaByName(config, name) {
let res = {};
if (Array.isArray(config)) {
for (let i = 0; i < config.length; i++) {
@ -17,9 +17,9 @@ const getMetaByName = (config, name) => {
}
}
return res;
};
}
const fillMenuByRoute = (menuConfig, routeConfig, dep = 0) => {
function fillMenuByRoute(menuConfig, routeConfig, dep = 0) {
dep += 1;
if (dep > 3) {
console.warn('[plugin-layout]: 菜单层级最好不要超出三层!');
@ -44,6 +44,6 @@ const fillMenuByRoute = (menuConfig, routeConfig, dep = 0) => {
});
}
return arr;
};
}
export default fillMenuByRoute;

@ -1,6 +1,6 @@
import { plugin } from '@@/core/coreExports';
export const transTitle = (name) => {
export function transTitle(name) {
if (!/^\$\S+$/.test(name)) {
return name;
}
@ -10,10 +10,10 @@ export const transTitle = (name) => {
return t(name.slice(1));
}
return name;
};
}
export const transform = (menus) =>
menus.map((menu) => {
export function transform(menus) {
return menus.map((menu) => {
const copy = {
...menu,
label: transTitle(menu.label),
@ -23,3 +23,4 @@ export const transform = (menus) =>
}
return copy;
});
}

@ -1,8 +1,10 @@
import DOMPurify from 'dompurify';
const isStr = function (str) {
return typeof str === 'string';
};
export const isValid = (elm) => {
export function isValid(elm) {
if (elm.nodeType === 1) {
if (elm.nodeName.toLowerCase() === 'script') {
return false;
@ -22,11 +24,11 @@ export const isValid = (elm) => {
}
}
return true;
};
}
export const validateContent = (svgContent) => {
export function validateContent(svgContent) {
const div = document.createElement('div');
div.innerHTML = svgContent;
div.innerHTML = DOMPurify.sanitize(svgContent);
// setup this way to ensure it works on our buddy IE
for (let i = div.childNodes.length - 1; i >= 0; i--) {
@ -46,4 +48,4 @@ export const validateContent = (svgContent) => {
}
}
return '';
};
}

@ -1,8 +1,9 @@
export const flatNodes = (nodes = []) =>
nodes.reduce((res, node) => {
export function flatNodes(nodes = []) {
return nodes.reduce((res, node) => {
res.push(node);
if (node.children) {
res = res.concat(flatNodes(node.children));
}
return res;
}, []);
}

@ -1,3 +1,2 @@
export { default as Page } from './views/page.vue';
export { useTabTitle } from './useTitle';
export * from './useLayout';

@ -0,0 +1,6 @@
export default {
pluginLayout: {
closeOtherPage: 'Close Other Page',
reloadPage: 'Reload Page',
},
};

@ -0,0 +1,6 @@
export default {
pluginLayout: {
closeOtherPage: '关闭其他页签',
reloadPage: '刷新当前页签',
},
};

@ -8,13 +8,8 @@ if (!accessApi) {
export const access = (memo) => {
const runtimeConfig = getConfig();
const accessIds = accessApi.getAccess();
if (!accessIds.includes('/403')) {
accessApi.setAccess(accessIds.concat('/403'));
}
if (!accessIds.includes('/404')) {
accessApi.setAccess(accessIds.concat('/404'));
}
accessApi.setPresetAccess(['/403', '/404']);
return {
unAccessHandler({ router, to, from, next }) {
if (runtimeConfig.unAccessHandler && typeof runtimeConfig.unAccessHandler === 'function') {

@ -1,12 +1,31 @@
import { createSharedComposable } from '@vueuse/core';
import { shallowReactive } from 'vue';
import { inject, ref } from 'vue';
function _useLayout() {
const state = shallowReactive({
closeTab: () => {},
});
import { useRoute } from '@@/core/coreExports';
return state;
export const PLUGIN_LAYOUT_TITLE_KEY = Symbol('PLUGIN_LAYOUT_TITLE_KEY');
export const PLUGIN_LAYOUT_KEY = Symbol('PLUGIN_LAYOUT_KEY');
export function useTabTitle(title) {
const titleMap = inject(PLUGIN_LAYOUT_TITLE_KEY);
if (!titleMap) {
console.warn('[plugin-layout]: 未正确获取到titleMap');
return;
}
const route = useRoute();
const titleRef = ref(title);
const path = route.path;
titleMap.set(path, titleRef);
return titleRef;
}
export const useLayout = createSharedComposable(_useLayout);
export function useLayout(options) {
const parent = inject(PLUGIN_LAYOUT_KEY, { reloadTab: () => void 0, closeTab: () => void 0 });
const titleRef = useTabTitle(options?.title);
return {
...parent,
title: titleRef,
};
}

@ -1,18 +0,0 @@
import { reactive, ref } from 'vue';
import { useRoute } from '@@/core/coreExports';
const cache = reactive(new Map());
export const getTitle = path => cache.get(path);
export const deleteTitle = patch => cache.delete(patch);
export function useTabTitle(title) {
const route = useRoute();
const titleRef = ref(title);
const path = route.path;
cache.set(path, titleRef);
return titleRef;
}

@ -1,8 +1,10 @@
<template>
<Wrapper :iconSrc="img403" title="没有访问权限,请联系管理人员" subTitle="" />
<Wrapper :icon-src="img403" :title="title" sub-title="" />
</template>
<script>
import { defineComponent } from 'vue';
import { computed, defineComponent } from 'vue';
import getConfig from '../helpers/getConfig';
import img403 from '../assets/403.png';
import Wrapper from './components/Wrapper.vue';
@ -11,8 +13,13 @@ export default defineComponent({
Wrapper,
},
setup() {
const config = getConfig();
const title = computed(() => {
return config['403']?.title || '没有访问权限,请联系管理人员';
});
return {
img403,
title,
};
},
});

@ -1,9 +1,11 @@
<template>
<Wrapper :iconSrc="img404" title="哎呀!这个页面找不到了" subTitle="" />
<Wrapper :icon-src="img404" :title="title" sub-title="" />
</template>
<script>
import { defineComponent } from 'vue';
import { computed, defineComponent } from 'vue';
import img404 from '../assets/404.png';
import getConfig from '../helpers/getConfig';
import Wrapper from './components/Wrapper.vue';
export default defineComponent({
@ -11,8 +13,14 @@ export default defineComponent({
Wrapper,
},
setup() {
const config = getConfig();
const title = computed(() => {
return config['404']?.title || '哎呀!这个页面找不到了';
});
return {
img404,
title,
};
},
});

@ -11,8 +11,8 @@
>
<div class="layout-logo">
<img v-if="logo" :src="logo" class="logo-img">
<div v-if="title" class="logo-name">
{{ title }}
<div v-if="transformedTitle" class="logo-name">
{{ transformedTitle }}
</div>
</div>
<LayoutMenu
@ -58,8 +58,8 @@
<div>
<div class="layout-logo">
<img v-if="logo" :src="logo" class="logo-img">
<div v-if="title" class="logo-name">
{{ title }}
<div v-if="transformedTitle" class="logo-name">
{{ transformedTitle }}
</div>
</div>
<LayoutMenu
@ -98,8 +98,8 @@
<FHeader ref="headerRef" class="layout-header" :inverted="theme === 'dark'" :fixed="currentFixedHeaderRef">
<div class="layout-logo">
<img v-if="logo" :src="logo" class="logo-img">
<div v-if="title" class="logo-name">
{{ title }}
<div v-if="transformedTitle" class="logo-name">
{{ transformedTitle }}
</div>
</div>
<LayoutMenu
@ -127,12 +127,65 @@
</FFooter>
</FLayout>
</template>
<template v-else-if="currentNavigation === 'top-left-right'">
<FHeader ref="headerRef" class="layout-header" :inverted="theme === 'dark'" :fixed="currentFixedHeaderRef">
<div class="layout-logo">
<img v-if="logo" :src="logo" class="logo-img">
<div v-if="transformedTitle" class="logo-name">
{{ transformedTitle }}
</div>
</div>
<LayoutMenu
class="layout-menu"
:menus="rootMenus"
mode="horizontal"
:inverted="theme === 'dark'"
/>
<div class="layout-header-custom">
<slot name="renderCustom" :menus="menus" />
</div>
<template v-if="locale">
<slot name="locale" />
</template>
</FHeader>
<FLayout v-if="activeSubMenus.length" :embedded="!multiTabs" :fixed="currentFixedHeaderRef" :style="headerStyleRef">
<FAside v-model:collapsed="collapsedRef" :inverted="theme === 'dark'" :fixed="isFixedSidebar" :width="`${sideWidth}px`" collapsible class="layout-aside">
<LayoutMenu
class="layout-menu"
:menus="activeSubMenus"
:collapsed="collapsedRef"
mode="vertical"
:expanded-keys="menuProps?.expandedKeys"
:default-expand-all="menuProps?.defaultExpandAll"
:accordion="menuProps?.accordion"
:inverted="theme === 'dark'"
/>
</FAside>
<FLayout :embedded="!multiTabs" :fixed="isFixedSidebar" :style="sideStyleRef">
<FMain class="layout-main">
<MultiTabProvider :multi-tabs="multiTabs" />
</FMain>
<FFooter v-if="footer" class="layout-footer">
{{ footer }}
</FFooter>
</FLayout>
</FLayout>
<FLayout v-else :embedded="!multiTabs" :fixed="currentFixedHeaderRef" :style="headerStyleRef">
<FMain class="layout-main">
<MultiTabProvider :multi-tabs="multiTabs" />
</FMain>
<FFooter v-if="footer" class="layout-footer">
{{ footer }}
</FFooter>
</FLayout>
</template>
<template v-else-if="currentNavigation === 'mixin'">
<FHeader ref="headerRef" class="layout-header" :fixed="currentFixedHeaderRef" :inverted="theme === 'dark'">
<div class="layout-logo">
<img v-if="logo" :src="logo" class="logo-img">
<div v-if="title" class="logo-name">
{{ title }}
<div v-if="transformedTitle" class="logo-name">
{{ transformedTitle }}
</div>
</div>
<div class="layout-header-custom">
@ -177,6 +230,8 @@ import { useRoute, useRouter } from '@@/core/coreExports';
import { FAside, FFooter, FHeader, FLayout, FMain } from '@fesjs/fes-design';
import { computed, nextTick, ref, watch } from 'vue';
import defaultLogo from '../assets/logo.png';
import { flatNodes } from '../helpers/utils';
import { transTitle } from '../helpers/pluginLocale';
import LayoutMenu from './Menu.vue';
import MultiTabProvider from './MultiTabProvider.vue';
@ -215,7 +270,7 @@ export default {
},
navigation: {
type: String,
default: 'side', // side / top / mixin //
default: 'side', // side / top / mixin //top-left-right //
},
navigationOnError: {
type: [String, Function], // 403, 404 navigation
@ -248,6 +303,10 @@ export default {
const route = useRoute();
const router = useRouter();
const transformedTitle = computed(() => {
return transTitle(props.title);
});
const currentNavigation = computed(() => {
if (route.meta.layout && route.meta.layout.navigation !== undefined) {
return route.meta.layout.navigation;
@ -282,6 +341,56 @@ export default {
},
);
const rootMenus = computed(() => {
return props.menus.map((menu) => {
const { children, match, ...others } = menu;
let { path, query, params } = menu;
const flatChildren = flatNodes(children || []);
if (!menu.path) {
const firstChild = flatChildren.find(item => item.path);
if (firstChild) {
path = firstChild.path;
query = firstChild.query;
params = firstChild.params;
}
}
return {
...others,
path,
query,
params,
match: (match || [])
.concat(...flatChildren.map(item => []
.concat(item.match || [])
.concat(item.path)),
),
_children: children,
};
});
});
const activeRootMenu = computed(() => {
const matchRootMenus = rootMenus.value.filter((menu) => {
const match = menu.match;
if (!match || !Array.isArray(match)) {
return false;
}
return match.some((str) => {
const reg = new RegExp(str);
return reg.test(route.path);
});
});
return matchRootMenus[0] ?? null;
});
const activeSubMenus = computed(() => {
if (!activeRootMenu.value) {
return [];
}
return activeRootMenu.value._children || [];
});
return {
headerRef,
headerHeightRef,
@ -291,6 +400,9 @@ export default {
headerStyleRef,
sideStyleRef,
currentNavigation,
rootMenus,
activeSubMenus,
transformedTitle,
};
},
};

@ -1,7 +1,7 @@
<template>
<FMenu
v-model:expandedKeys="expandedKeysRef"
:model-value="activePath"
v-model:expanded-keys="expandedKeysRef"
v-model="activeMenu"
:inverted="inverted"
:mode="mode"
:options="transformedMenus"
@ -12,9 +12,9 @@
</template>
<script>
import { computed, h, ref, watch } from 'vue';
import { FMenu } from '@fesjs/fes-design';
import { useRoute, useRouter } from '@@/core/coreExports';
import { FMenu } from '@fesjs/fes-design';
import { computed, h, nextTick, ref, watch } from 'vue';
import { transform as transformByAccess } from '../helpers/pluginAccess';
import { transform as transformByLocale } from '../helpers/pluginLocale';
import { flatNodes } from '../helpers/utils';
@ -79,6 +79,7 @@ export default {
const router = useRouter();
const transformedMenus = computed(() => transformByLocale(transformByAccess(transform(props.menus))));
const menuArray = computed(() => flatNodes(transformedMenus.value));
const activePath = computed(() => {
const matchMenus = menuArray.value.filter((menu) => {
const match = menu.match;
@ -96,6 +97,12 @@ export default {
return matchMenus[0].path;
});
const activeMenu = ref(activePath.value);
watch(activePath, () => {
activeMenu.value = activePath.value;
});
const expandedKeysRef = ref(props.expandedKeys);
watch(
@ -125,11 +132,32 @@ export default {
const onMenuClick = (e) => {
const path = e.value;
if (/^https?:\/\//.test(path)) {
const currentMenu = menuArray.value.find(item => item.value === path);
if (currentMenu._blank) {
const resolved = router.resolve({
path,
query: currentMenu?.query || {},
params: currentMenu?.params || {},
});
// TODO
nextTick(() => {
activeMenu.value = activePath.value;
});
window.open(resolved.href, '_blank');
}
else if (/^https?:\/\//.test(path)) {
// TODO
nextTick(() => {
activeMenu.value = activePath.value;
});
window.open(path, '_blank');
}
else if (/^\//.test(path)) {
router.push(path);
router.push({
path,
query: currentMenu?.query || {},
params: currentMenu?.params || {},
});
}
else {
console.warn('[plugin-layout]: 菜单的path只能是以http(s)开头的网址或者路由地址');
@ -137,6 +165,7 @@ export default {
};
return {
activeMenu,
activePath,
expandedKeysRef,
transformedMenus,

@ -1,11 +1,11 @@
<script lang="jsx">
import { ref, onBeforeMount, isVNode } from 'vue';
// eslint-disable-next-line import/extensions
import { isVNode, onBeforeMount, ref } from 'vue';
import Icons from '../icons';
import { validateContent } from '../helpers/svg';
const urlReg = /^((https?|ftp|file):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/;
const isUrlResource = (name) => urlReg.test(name) || name.includes('.svg');
const isUrlResource = name => urlReg.test(name) || name.includes('.svg');
export default {
props: {
@ -25,7 +25,8 @@ export default {
});
}
});
} else {
}
else {
AIconComponent.value = Icons[props.icon];
}
}
@ -39,13 +40,14 @@ export default {
return <AIconComponent.value />;
}
if (AText.value) {
return <span class={'fes-layout-icon'} innerHTML={AText.value}></span>;
return <span class="fes-layout-icon" innerHTML={AText.value}></span>;
}
return null;
};
},
};
</script>
<style>
.fes-layout-icon {
display: inline-block;

@ -7,12 +7,12 @@
type="card"
class="layout-content-tabs"
@close="handleCloseTab"
@update:modelValue="switchPage"
@update:model-value="switchPage"
>
<FTabPane v-for="page in pageList" :key="page.path" :value="page.path" :closable="pageList.length > 1">
<template #tab>
{{ page.title }}
<ReloadOutlined v-show="route.path === page.path" class="layout-tabs-close-icon" @click="reloadPage(page.path)" />
<ReloadOutlined v-if="page.tabReload" v-show="route.path === page.path" class="layout-tabs-close-icon" @click="reloadPage(page.path)" />
</template>
</FTabPane>
<template #suffix>
@ -27,13 +27,12 @@
</template>
<script>
import { computed, ref, unref } from 'vue';
import { computed, provide, reactive, ref, unref } from 'vue';
import { FDropdown, FTabPane, FTabs } from '@fesjs/fes-design';
import { MoreOutlined, ReloadOutlined } from '@fesjs/fes-design/icon';
import { useRoute, useRouter } from '@@/core/coreExports';
import { plugin, useRoute, useRouter } from '@@/core/coreExports';
import { transTitle } from '../helpers/pluginLocale';
import { deleteTitle, getTitle } from '../useTitle';
import { useLayout } from '../useLayout';
import { PLUGIN_LAYOUT_KEY, PLUGIN_LAYOUT_TITLE_KEY } from '../useLayout';
import Page from './page.vue';
let i = 0;
@ -54,7 +53,14 @@ export default {
const pageRef = ref();
const route = useRoute();
const router = useRouter();
const layoutState = useLayout();
const titleCache = reactive(new Map());
provide(PLUGIN_LAYOUT_TITLE_KEY, titleCache);
const getTitle = path => titleCache.get(path);
const deleteTitle = patch => titleCache.delete(patch);
const createPage = (_route) => {
const computedTitle = computed(() => {
@ -67,30 +73,50 @@ export default {
name: _route.meta.name ?? _route.name,
title: computedTitle,
key: getKey(),
tabReload: _route.meta.tabReload ?? true,
};
};
const pageList = ref([createPage(router.currentRoute.value)]);
const actions = [
{
value: 'closeOtherPage',
label: '关闭其他页签',
},
{
value: 'reloadPage',
label: '刷新当前页签',
},
];
const actions = computed(() => {
const sharedLocale = plugin.getShared('locale');
if (sharedLocale) {
const { t } = sharedLocale.locale;
return [
{
value: 'closeOtherPage',
label: t('pluginLayout.closeOtherPage'),
},
{
value: 'reloadPage',
label: t('pluginLayout.reloadPage'),
},
];
}
return [
{
value: 'closeOtherPage',
label: '关闭其他页签',
},
{
value: 'reloadPage',
label: '刷新当前页签',
},
];
});
const findPage = path => pageList.value.find(item => unref(item.path) === unref(path));
router.beforeEach((to) => {
const page = findPage(to.path);
if (!page)
if (!page) {
pageList.value = [...pageList.value, createPage(to)];
}
else
else {
page.route = to;
}
return true;
});
@ -109,15 +135,20 @@ export default {
const handleCloseTab = async (targetKey) => {
targetKey = targetKey || route.path;
const selectedPage = findPage(targetKey);
if (!selectedPage) {
return;
}
const list = [...pageList.value];
const index = list.indexOf(selectedPage);
if (route.path === selectedPage.path) {
if (list.length > 1) {
if (list.length - 1 === index)
if (list.length - 1 === index) {
await switchPage(list[index - 1].path);
}
else
else {
await switchPage(list[index + 1].path);
}
}
}
list.splice(index, 1);
@ -125,12 +156,12 @@ export default {
pageRef.value.removeKeepAlive(selectedPage.name);
deleteTitle(selectedPage.path);
};
layoutState.closeTab = handleCloseTab;
const reloadPage = (path) => {
const selectedPage = findPage(path || unref(route.path));
if (selectedPage)
if (selectedPage) {
selectedPage.key = getKey();
}
};
const closeOtherPage = (path) => {
const selectedPage = findPage(path || unref(route.path));
@ -139,8 +170,9 @@ export default {
};
const getPageKey = (_route) => {
const selectedPage = findPage(_route.path);
if (selectedPage)
if (selectedPage) {
return selectedPage.key;
}
return '';
};
@ -156,6 +188,11 @@ export default {
}
};
provide(PLUGIN_LAYOUT_KEY, {
closeTab: handleCloseTab,
reloadTab: reloadPage,
});
return {
pageRef,
route,

@ -22,12 +22,14 @@ interface Menu {
children?: Menu[];
}
type Navigation = 'side' | 'mixin' | 'top' | 'left-right';
type Navigation = 'side' | 'mixin' | 'top' | 'left-right' | 'top-left';
export const Page: Component;
export function useTabTitle(title: string | Ref<string>): void;
export function useLayout(options: { title?: string }): { title: Ref<string>; reloadTab: () => void; closeTab: () => void };
interface LayoutRuntimeConfig {
footer?: string;
theme?: 'dark' | 'light';

@ -1,6 +1,6 @@
{
"name": "@fesjs/plugin-locale",
"version": "4.2.2",
"version": "4.4.0",
"description": "@fesjs/plugin-locale",
"main": "lib/index.js",
"files": [
@ -28,12 +28,12 @@
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1",
"@fesjs/utils": "^3.0.3",
"vue-i18n": "^9.0.0",
"lodash-es": "^4.17.21"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.9",
"@fesjs/fes": "^3.1.12",
"@fesjs/fes-design": ">=0.7.0",
"vue": "^3.2.47"
},

@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { join } from 'path';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { name } from '../package.json';
const namespace = 'plugin-locale';
@ -24,6 +24,8 @@ export default (api) => {
api.addRuntimePluginKey(() => 'locale');
api.addRuntimePluginKey(() => 'onLocaleChange');
const absoluteFilePath = join(namespace, 'core.js');
const absRuntimeFilePath = join(namespace, 'runtime.js');
@ -32,10 +34,17 @@ export default (api) => {
return join(api.paths.absSrcPath, api.config.singular ? 'locale' : 'locales');
}
api.register({
key: 'addExtraLocales',
fn: () => [
getLocaleFileBasePath(),
],
});
// 监听 locale 文件改变,重新生成文件
api.addTmpGenerateWatcherPaths(getLocaleFileBasePath);
api.onGenerateFiles(() => {
api.onGenerateFiles(async () => {
// .fes配置
const userConfig = {
locale: 'zh-CN', // default locale
@ -45,9 +54,13 @@ export default (api) => {
...api.config.locale,
};
const localeConfigFileBasePath = getLocaleFileBasePath();
const additionalLocales = await api.applyPlugins({
key: 'addExtraLocales',
type: api.ApplyPluginsType.add,
initialValue: [],
});
const { files, locales } = getLocales(localeConfigFileBasePath);
const { files, locales } = getLocales(additionalLocales);
const { baseNavigator, ...otherConfig } = userConfig;
@ -55,7 +68,7 @@ export default (api) => {
path: join(namespace, 'locales.js'),
content: Mustache.render(readFileSync(join(__dirname, 'runtime/locales.js.tpl'), 'utf-8'), {
REPLACE_IMPORTS: files,
REPLACE_LOCALES: locales.map((item) => ({
REPLACE_LOCALES: locales.map(item => ({
locale: item.locale,
importNames: item.importNames.join(', '),
})),

@ -8,7 +8,7 @@
import { isRef, unref } from 'vue';
import { createI18n, useI18n } from '{{{ VUE_I18N_PATH }}}';
import locales from './locales'
import { plugin, ApplyPluginsType } from '@@/core/coreExports';
const defaultOptions = {{{REPLACE_DEFAULT_OPTIONS}}};
@ -19,18 +19,22 @@ const getDefaultLocale = () => {
if (fes_locale) {
return {
locale: fes_locale,
fallbackLocale: fes_locale,
fallbackLocale: defaultOptions.fallbackLocale,
};
}
if (BASE_NAVIGATOR) {
return {
locale: window.navigator.language,
fallbackLocale: window.navigator.language,
};
const keys = locales.map(item=> item.locale);
const findKey = keys.find(item=> item.includes(window.navigator.language))
if(findKey){
return {
locale: findKey,
fallbackLocale: defaultOptions.fallbackLocale,
};
}
}
return {
locale: 'zh-CN',
fallbackLocale: 'zh-CN',
locale: defaultOptions.locale,
fallbackLocale: defaultOptions.fallbackLocale,
};
};
@ -47,6 +51,8 @@ const i18n = createI18n({
messages,
});
const t = i18n.global.t;
window.localStorage.setItem("fes_locale", unref(i18n.global.locale));
const setLocale = ({ locale }) => {
if (isRef(i18n.global.locale)) {
@ -55,6 +61,11 @@ const setLocale = ({ locale }) => {
i18n.global.locale = locale;
}
window.localStorage.setItem("fes_locale", locale);
plugin.applyPlugins({
key: 'onLocaleChange',
type: ApplyPluginsType.event,
args: { i18n, t, locale: unref(i18n.global.locale) },
});
};
const getLocale = () => {
@ -78,19 +89,20 @@ const getAllLocales = () => {
const install = (app) => {
app.use(i18n);
plugin.applyPlugins({
key: 'onLocaleChange',
type: ApplyPluginsType.event,
args: { i18n, t, locale: unref(i18n.global.locale) },
});
};
const t = (key) => {
return i18n.global.t(key)
}
const locale = {
setLocale,
getLocale,
addLocale,
getAllLocales,
messages,
t
t,
};
export { useI18n, locale, install };

@ -126,7 +126,7 @@ export default {
title: 'Nyelv',
},
'hy-AM': {
lang: 'hu-HU',
lang: 'hy-AM',
label: 'Հայերեն',
icon: '🇦🇲',
title: 'Լեզու',
@ -162,7 +162,7 @@ export default {
title: 'Ziman',
},
'kn-IN': {
lang: 'zh-TW',
lang: 'kn-IN',
label: 'ಕನ್ನಡ',
icon: '🇮🇳',
title: 'ಭಾಷೆ',

@ -1,6 +1,6 @@
import { plugin } from '@@/core/coreExports';
// eslint-disable-next-line import/extensions
import { useI18n, locale, install } from './core';
import { install, locale, useI18n } from './core';
import SelectLang from './views/SelectLang.vue';
// 共享出去

@ -1,11 +1,11 @@
<template>
<FTooltip v-model="isOpened" popperClass="lang-popper" mode="popover">
<FTooltip v-model="isOpened" popper-class="lang-popper" mode="popover">
<div class="lang-icon">
<LanguageOutlined />
</div>
<template #content>
<FScrollbar height="274" class="lang-container">
<div v-for="item in configs" :key="item.lang" :class="['lang-option', item.lang === locale && 'is-selected']" @click="handleSelect(item)">
<div v-for="item in configs" :key="item.lang" class="lang-option" :class="[item.lang === locale && 'is-selected']" @click="handleSelect(item)">
<span>{{ item.icon }}</span>
<span>{{ item.label }}</span>
</div>
@ -15,12 +15,12 @@
</template>
<script>
import { FTooltip, FScrollbar } from '@fesjs/fes-design';
import { FScrollbar, FTooltip } from '@fesjs/fes-design';
import { LanguageOutlined } from '@fesjs/fes-design/icon';
import { useI18n } from 'vue-i18n';
import { computed, ref } from 'vue';
import langUConfigMap from '../langUConfigMap';
// eslint-disable-next-line import/extensions
import { locale as _locale } from '../core';
export default {
@ -55,11 +55,13 @@ export default {
},
};
</script>
<style>
.fes-tooltip.fes-tooltip-popover.lang-popper {
padding: 0;
}
</style>
<style lang="less" scoped>
.lang-icon {
display: flex;

@ -1,4 +1,4 @@
import { join, basename } from 'path';
import { basename, join } from 'node:path';
import { glob, winPath } from '@fesjs/utils';
const ignore = /\.(d\.ts|\.test\.(js|ts))$/;
@ -15,30 +15,32 @@ const getRouteName = function (path) {
.replace(/\[...([a-zA-Z]*)\]/, 'FUZZYMATCH-$1');
};
export function getLocales(cwd) {
export function getLocales(cwdArray) {
const map = {};
const files = [];
glob.sync('**/*.js', {
cwd,
})
.filter((file) => !ignore.test(file))
.forEach((fileName) => {
const locale = basename(fileName, '.js');
const importName = getRouteName(fileName).replace('.js', '');
const result = {
importName,
// import语法的路径必须处理win
path: winPath(join(cwd, fileName)),
};
files.push(result);
if (!map[locale]) {
map[locale] = [];
}
map[locale].push(importName);
});
cwdArray.forEach((cwd) => {
glob.sync('**/*.js', {
cwd,
})
.filter(file => !ignore.test(file))
.forEach((fileName) => {
const locale = basename(fileName, '.js');
const importName = getRouteName(fileName).replace('.js', '');
const result = {
importName,
// import语法的路径必须处理win
path: winPath(join(cwd, fileName)),
};
files.push(result);
if (!map[locale]) {
map[locale] = [];
}
map[locale].push(importName);
});
});
return {
locales: Object.keys(map).map((key) => ({ locale: key, importNames: map[key] })),
locales: Object.keys(map).map(key => ({ locale: key, importNames: map[key] })),
files,
};
}

@ -1,3 +1,5 @@
import type { VueI18n } from 'vue-i18n';
export { useI18n } from 'vue-i18n';
export const locale: {
@ -5,6 +7,7 @@ export const locale: {
addLocale: ({ locale, messages }: { locale: string; messages: object }) => void;
getAllLocales: () => string[];
messages: Record<string, object>;
t: VueI18n['t'];
};
declare module '@fesjs/fes' {
@ -18,4 +21,7 @@ declare module '@fesjs/fes' {
}
| false;
}
interface PluginRuntimeConfig {
onLocaleChange: (params: { t: VueI18n['t']; locale: string }) => void;
}
}

@ -1,36 +1,36 @@
{
"name": "@fesjs/plugin-login",
"version": "3.0.0",
"description": "@fesjs/plugin-login",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-login"
},
"keywords": [
"fes"
],
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@fesjs/fes": "^3.0.0",
"@fesjs/plugin-request": "^3.0.0",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
"name": "@fesjs/plugin-login",
"version": "3.0.2",
"description": "@fesjs/plugin-login",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-login"
},
"keywords": [
"fes"
],
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@fesjs/fes": "^3.0.0",
"@fesjs/plugin-request": "^4.0.0-rc.3",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
}

@ -1,8 +1,12 @@
import { request } from '@@/core/pluginExports';
import { ApplyPluginsType, getRouter, plugin } from '@fesjs/fes';
let config;
function getLoginConfig() {
if (config) return config;
if (config) {
return config;
}
config = plugin.applyPlugins({
key: 'login',
type: ApplyPluginsType.modify,
@ -14,38 +18,67 @@ function getLoginConfig() {
return config;
}
const defaultExport = {
onRouterCreated({ router }) {
const { hasLogin, loginPath } = getLoginConfig();
if (hasLogin && loginPath) {
let isAuthenticated;
router.beforeEach(async (to, from, next) => {
if (to.path !== loginPath && !isAuthenticated) {
isAuthenticated = await hasLogin();
if (!isAuthenticated) {
return next({ path: loginPath });
}
}
next();
});
}
},
};
// ACCESS
export function request(memo) {
if (!memo.responseInterceptors) {
memo.responseInterceptors = [];
}
memo.responseInterceptors.push([
(response) => response,
(error) => {
if (request.version) {
defaultExport.request = (memo) => {
const config = getLoginConfig();
if (config.ignore401Redirect) {
return memo;
}
const errorHandler = memo.errorHandler;
memo.errorHandler = (error) => {
if (error?.response?.status === 401) {
const router = getRouter();
const { loginPath } = getLoginConfig();
router.push({ path: loginPath });
}
throw error;
},
]);
return memo;
errorHandler && errorHandler(error);
};
return memo;
};
}
else {
defaultExport.request = (memo) => {
const config = getLoginConfig();
if (config.ignore401Redirect) {
return memo;
}
if (!memo.responseInterceptors) {
memo.responseInterceptors = [];
}
memo.responseInterceptors.push([
response => response,
(error) => {
if (error?.response?.status === 401) {
const router = getRouter();
const { loginPath } = getLoginConfig();
router.push({ path: loginPath });
}
throw error;
},
]);
return memo;
};
}
export function onRouterCreated({ router }) {
const { hasLogin, loginPath } = getLoginConfig();
if (hasLogin && loginPath) {
let isAuthenticated;
router.beforeEach(async (to, from, next) => {
if (to.path !== loginPath && !isAuthenticated) {
isAuthenticated = await hasLogin();
if (!isAuthenticated) {
return next({ path: loginPath });
}
}
next();
});
}
}
export default defaultExport;

@ -1,38 +1,38 @@
{
"name": "@fesjs/plugin-model",
"version": "3.0.1",
"description": "@fesjs/plugin-model",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-model"
},
"keywords": [
"fes"
],
"author": "harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.4",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
"name": "@fesjs/plugin-model",
"version": "3.0.3",
"description": "@fesjs/plugin-model",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-model"
},
"keywords": [
"fes"
],
"author": "harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.3"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.12",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
}

@ -1,40 +1,40 @@
{
"name": "@fesjs/plugin-monaco-editor",
"version": "3.0.1",
"description": "@fesjs/plugin-monaco-editor",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-monaco-editor"
},
"keywords": [
"fes"
],
"author": "harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1",
"lodash-es": "^4.17.21",
"monaco-editor": "^0.36.1",
"monaco-editor-webpack-plugin": "^7.0.1",
"vite-plugin-monaco-editor": "^1.1.0"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.4",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
"name": "@fesjs/plugin-monaco-editor",
"version": "3.0.3",
"description": "@fesjs/plugin-monaco-editor",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-monaco-editor"
},
"keywords": [
"fes"
],
"author": "harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.3",
"lodash-es": "^4.17.21",
"monaco-editor": "^0.36.1",
"monaco-editor-webpack-plugin": "^7.0.1",
"vite-plugin-monaco-editor": "^1.1.0"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.12",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
}

@ -1,39 +1,39 @@
{
"name": "@fesjs/plugin-pinia",
"version": "3.0.1",
"description": "@fesjs/plugin-pinia",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-pinia"
},
"keywords": [
"fes"
],
"author": "harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.4",
"pinia": "^2.0.11",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
"name": "@fesjs/plugin-pinia",
"version": "3.0.3",
"description": "@fesjs/plugin-pinia",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-pinia"
},
"keywords": [
"fes"
],
"author": "harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.3"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.12",
"pinia": "^2.0.11",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
}

@ -1 +1,2 @@
PORT=9000
HOST=127.0.0.1

@ -1 +1,2 @@
PORT=9001
HOST=127.0.0.1

@ -1,50 +1,50 @@
{
"name": "@fesjs/plugin-qiankun",
"version": "3.1.1",
"description": "@fesjs/plugin-qiankun",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"start": "npm-run-all --parallel start:*",
"start:vite-main": "cd ./examples/vite-main && fes dev",
"start:vite-micro": "cd ./examples/vite-micro && fes dev",
"start:webpack-main": "cd ./examples/webpack-main && fes dev",
"start:webpack-micro": "cd ./examples/webpack-micro && fes dev"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-qiankun"
},
"keywords": [
"fes"
],
"author": "michaelxxie、harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1",
"address": "^1.1.2",
"lodash-es": "^4.17.21",
"qiankun": "^2.7.0",
"vite-plugin-qiankun": "^1.0.15"
},
"devDependencies": {
"npm-run-all": "^4.1.5"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.4",
"@fesjs/fes-design": ">=0.7.20",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
"name": "@fesjs/plugin-qiankun",
"version": "3.1.6",
"description": "@fesjs/plugin-qiankun",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"start": "npm-run-all --parallel start:*",
"start:vite-main": "cd ./examples/vite-main && fes dev",
"start:vite-micro": "cd ./examples/vite-micro && fes dev",
"start:webpack-main": "cd ./examples/webpack-main && fes dev",
"start:webpack-micro": "cd ./examples/webpack-micro && fes dev"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-qiankun"
},
"keywords": [
"fes"
],
"author": "michaelxxie、harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.3",
"address": "^1.1.2",
"lodash-es": "^4.17.21",
"qiankun": "^2.7.0",
"vite-plugin-qiankun": "^1.0.15"
},
"devDependencies": {
"npm-run-all": "^4.1.5"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.13",
"@fesjs/fes-design": ">=0.7.20",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
}

@ -9,7 +9,7 @@ import {
shallowRef,
} from "vue";
import { loadMicroApp } from "{{{QIANKUN}}}";
import { mergeWith, cloneDeep, isEqual } from "{{{LODASH_ES}}}";
import { mergeWith, cloneDeep, isEqual, concat } from "{{{LODASH_ES}}}";
// eslint-disable-next-line import/extensions
import { getMasterOptions } from "./masterOptions";
@ -66,7 +66,7 @@ export const MicroApp = defineComponent({
return {};
});
const propsConfigRef = shallowRef({});
watch(

@ -3,9 +3,12 @@ import { cloneDeep } from 'lodash-es'
let initState = reactive({});
const setModelState = (props) => {
// 使用深拷贝去掉主应用数据和子应用数据的引用关系,避免出现副作用。
Object.keys(initState).forEach(p=>{
delete initState[p]
})
Object.assign(initState, cloneDeep(props))
};
export default () => initState;
export { setModelState };
export { setModelState };

@ -1,39 +1,39 @@
{
"name": "@fesjs/plugin-request",
"version": "4.0.0-rc.1",
"description": "@fesjs/plugin-request",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-request"
},
"keywords": [
"fes"
],
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.4",
"vue": "^3.2.37"
},
"dependencies": {
"@fesjs/utils": "^3.0.1",
"@qlin/request": "^0.1.2"
},
"typings": "./types.d.ts"
"name": "@fesjs/plugin-request",
"version": "4.0.1",
"description": "@fesjs/plugin-request",
"author": "qlin",
"license": "MIT",
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-request"
},
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"keywords": [
"fes"
],
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.12",
"vue": "^3.2.37"
},
"dependencies": {
"@fesjs/utils": "^3.0.3",
"@qlin/request": "^0.3.1"
},
"typings": "./types.d.ts"
}

@ -1,4 +1,4 @@
import { join } from 'path';
import { join } from 'node:path';
import { name } from '../package.json';
export default (api) => {
@ -9,7 +9,9 @@ export default (api) => {
let generatedOnce = false;
api.onGenerateFiles(() => {
if (generatedOnce) return;
if (generatedOnce) {
return;
}
generatedOnce = true;
api.copyTmpFiles({
namespace,

@ -1,39 +1,44 @@
import { ApplyPluginsType, plugin } from '@fesjs/fes';
import { ref, shallowRef } from 'vue';
import { createRequest } from '@qlin/request';
import { ref, shallowRef } from 'vue';
function getRequestInstance() {
const defaultConfig = plugin.applyPlugins({
key: 'request',
type: ApplyPluginsType.modify,
initialValue: {
timeout: 10000,
responseType: 'json',
},
});
return createRequest(defaultConfig);
}
// 不能立马初始化,用户配置可能还没准备好
let currentRequest;
export const rawRequest = (url, data, options = {}) => {
if (typeof options === 'string') {
options = {
method: options,
};
}
function _rawRequest(url, data, options = {}) {
if (!currentRequest) {
currentRequest = getRequestInstance();
}
return currentRequest(url, data, options);
};
}
export const request = async (url, data, options = {}) => {
// 代理 request 上的属性
export const rawRequest = new Proxy(_rawRequest, {
get(_, key) {
if (!currentRequest) {
currentRequest = getRequestInstance();
}
return currentRequest[key];
},
});
export async function request(url, data, options = {}) {
const response = await rawRequest(url, data, options);
return response.data;
};
}
request.version = '4.0.0';
@ -41,14 +46,15 @@ function isPromiseLike(obj) {
return !!obj && typeof obj === 'object' && typeof obj.then === 'function';
}
export const useRequest = (url, data, options = {}) => {
export function useRequest(url, data, options = {}) {
const loadingRef = ref(true);
const errorRef = ref(null);
const dataRef = shallowRef(null);
let promise;
if (isPromiseLike(url)) {
promise = url;
} else {
}
else {
promise = request(url, data, options);
}
promise
@ -66,4 +72,4 @@ export const useRequest = (url, data, options = {}) => {
error: errorRef,
data: dataRef,
};
};
}

@ -1,40 +1,40 @@
{
"name": "@fesjs/plugin-swc",
"version": "3.0.3",
"description": "@fesjs/plugin-swc",
"main": "lib/index.js",
"types": "types.d.ts",
"files": [
"lib",
"types.d.ts"
],
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-swc"
},
"keywords": [
"fes"
],
"author": "RiESAEX",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1",
"@swc/core": "^1.3.49",
"@swc/css": "^0.0.20",
"css-minimizer-webpack-plugin": "^5.0.0",
"swc-loader": "^0.2.3",
"swc-plugin-vue-jsx": "^0.2.2",
"terser-webpack-plugin": "^5.3.7"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.4"
}
"name": "@fesjs/plugin-swc",
"version": "3.0.5",
"description": "@fesjs/plugin-swc",
"main": "lib/index.js",
"types": "types.d.ts",
"files": [
"lib",
"types.d.ts"
],
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-swc"
},
"keywords": [
"fes"
],
"author": "RiESAEX",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.3",
"@swc/core": "^1.3.49",
"@swc/css": "^0.0.20",
"css-minimizer-webpack-plugin": "^5.0.0",
"swc-loader": "^0.2.3",
"swc-plugin-vue-jsx": "^0.2.2",
"terser-webpack-plugin": "^5.3.7"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.12"
}
}

@ -1,39 +1,39 @@
{
"name": "@fesjs/plugin-vuex",
"version": "3.0.1",
"description": "@fesjs/plugin-vuex",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-vuex"
},
"keywords": [
"fes"
],
"author": "aringlai",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.4",
"vue": "^3.2.47",
"vuex": "^4.0.0"
},
"typings": "./types.d.ts"
"name": "@fesjs/plugin-vuex",
"version": "3.0.3",
"description": "@fesjs/plugin-vuex",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-vuex"
},
"keywords": [
"fes"
],
"author": "aringlai",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.3"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.12",
"vue": "^3.2.47",
"vuex": "^4.0.0"
},
"typings": "./types.d.ts"
}

@ -1,12 +1,15 @@
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
import { join } from 'node:path';
import { parser, winPath } from '@fesjs/utils';
import { readdirSync, readFileSync, statSync } from 'fs';
import { join } from 'path';
/**
* 获取文件夹所有JS文件路径
* @param {string} dir
*/
function getDirFilePaths(dir) {
if (!existsSync(dir)) {
return [];
}
const dirs = readdirSync(dir);
let pathList = [];
for (const name of dirs) {
@ -14,7 +17,8 @@ function getDirFilePaths(dir) {
const info = statSync(path);
if (info.isDirectory()) {
pathList = pathList.concat(getDirFilePaths(path));
} else if (path.endsWith('.js')) {
}
else if (path.endsWith('.js')) {
pathList.push(path);
}
}
@ -29,8 +33,8 @@ function pathToHump(path, root) {
return path
.replace(root, '')
.replace('.js', '')
.replace(RegExp('(/|\\.|-|_)\\S', 'g'), (text) => text[1].toUpperCase())
.replace(/\S/, (text) => text.toLowerCase());
.replace(RegExp('(/|\\.|-|_)\\S', 'g'), text => text[1].toUpperCase())
.replace(/\S/, text => text.toLowerCase());
}
/**
@ -45,7 +49,7 @@ function getModelTypes(ast, name, namespace = '') {
getters: {},
};
let namespaced = false;
if (ast.type !== 'ObjectExpression') return types;
if (ast.type !== 'ObjectExpression') { return types; }
ast.properties.forEach((node) => {
if (node.key.name === 'namespaced' && node.value.value) {
namespaced = true;
@ -56,7 +60,6 @@ function getModelTypes(ast, name, namespace = '') {
if (namespaced) {
type = types[node.key.name][name];
if (!type) {
// eslint-disable-next-line no-multi-assign
type = types[node.key.name][name] = {};
}
}
@ -77,7 +80,8 @@ function getModelTypes(ast, name, namespace = '') {
...subTypes[key],
...types[key][name],
};
} else {
}
else {
types[key] = {
...subTypes[key],
...types[key],
@ -112,8 +116,9 @@ function parseModel(paths = [], root) {
sourceType: 'module',
plugins: ['jsx', 'typescript'],
});
ast = ast.program.body.filter((body) => body.type === 'ExportDefaultDeclaration')[0];
} catch (err) { }
ast = ast.program.body.filter(body => body.type === 'ExportDefaultDeclaration')[0];
}
catch (err) { }
if (ast) {
const { mutations, actions, getters } = getModelTypes(ast.declaration, moduleName);
MUTATION_TYPES = {
@ -155,9 +160,10 @@ export function parseStore(root) {
const modelPaths = [];
const pluginPaths = [];
paths.forEach((path) => {
if (path.indexOf('plugin') > -1) {
if (path.includes('plugin')) {
pluginPaths.push(path);
} else {
}
else {
modelPaths.push(path);
}
});

@ -1,39 +1,39 @@
{
"name": "@fesjs/plugin-watermark",
"version": "3.0.1",
"description": "@fesjs/plugin-watermark",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-watermark"
},
"keywords": [
"fes"
],
"author": "harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.1",
"lodash-es": "^4.17.21"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.4",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
"name": "@fesjs/plugin-watermark",
"version": "3.0.3",
"description": "@fesjs/plugin-watermark",
"main": "lib/index.js",
"files": [
"lib",
"types.d.ts"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-plugin-watermark"
},
"keywords": [
"fes"
],
"author": "harrywan",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@fesjs/utils": "^3.0.3",
"lodash-es": "^4.17.21"
},
"peerDependencies": {
"@fesjs/fes": "^3.1.12",
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
}

@ -1,6 +1,6 @@
{
"name": "@fesjs/preset-built-in",
"version": "3.1.8",
"version": "3.1.14",
"description": "@fesjs/preset-built-in",
"author": "qlin",
"license": "MIT",
@ -29,13 +29,13 @@
"vue": "^3.2.47"
},
"dependencies": {
"@fesjs/compiler": "^3.0.2",
"@fesjs/runtime": "^3.0.0",
"@fesjs/utils": "^3.0.1",
"@fesjs/compiler": "^3.0.6",
"@fesjs/runtime": "^3.0.1",
"@fesjs/utils": "^3.0.3",
"@vue/compiler-sfc": "^3.3.4",
"@wll8/better-mock": "0.3.3-alpha",
"envinfo": "^7.7.3",
"express": "^4.17.3",
"mockjs": "^1.1.0"
"express": "^4.17.3"
},
"typings": "./types.d.ts"
}

@ -16,6 +16,7 @@ export default function () {
require.resolve('./plugins/features/alias'),
require.resolve('./plugins/features/autoprefixer'),
require.resolve('./plugins/features/define'),
require.resolve('./plugins/features/console'),
require.resolve('./plugins/features/dynamicImport'),
require.resolve('./plugins/features/globalCSS'),
require.resolve('./plugins/features/inlineLimit'),

@ -12,6 +12,8 @@ import DefaultContainer from './defaultContainer.vue';
{{{ entryCodeAhead }}}
{{{ CONSOLE }}}
const renderClient = (opts = {}) => {
const { plugin, routes, rootElement } = opts;
const rootContainer = plugin.applyPlugins({

@ -13,6 +13,15 @@ export function importsToStr(imports) {
});
}
function getConsoleInfo(config, pkg) {
if (config.console?.version) {
return `
console.log('%c[${pkg.name}]%c${pkg.version}', 'background-color: #1677ff; border-top-left-radius: 6px; border-bottom-left-radius: 6px; color: white; padding: 4px', 'background-color: #42b983; border-top-right-radius: 6px; border-bottom-right-radius: 6px; color: white; padding: 4px');
`;
}
return '';
}
export default function (api) {
const {
utils: { Mustache },
@ -24,6 +33,7 @@ export default function (api) {
path: 'fes.js',
content: Mustache.render(fesTpl, {
enableTitle: api.config.title !== false,
CONSOLE: getConsoleInfo(api.config, api.pkg),
defaultTitle: api.config.title || 'fes.js',
runtimePath,
rootElement: `#${api.config.mountElementId || 'app'}`,

@ -0,0 +1,13 @@
export default (api) => {
api.describe({
key: 'console',
config: {
default: {
version: false,
},
schema(joi) {
return joi.object().description('output info in console, default version');
},
},
});
};

@ -122,7 +122,7 @@ export default (api) => {
api.logger.info('mock.js should export Function');
return;
}
const mockjs = require('mockjs');
const mockjs = require('@wll8/better-mock');
initFunction({ cgiMock, mockjs, utils });
} catch (err) {
api.logger.error('mock.js run fail!');

@ -1,8 +1,8 @@
import { Component, DefineComponent, Component, App } from 'vue';
import { RouteRecordRaw, Router, RouterHistory, createMemoryHistory, createWebHashHistory, createWebHistory } from 'vue-router';
import type { App, Component, DefineComponent } from 'vue';
import type { createMemoryHistory, createWebHashHistory, createWebHistory, Router, RouteRecordRaw, RouterHistory } from 'vue-router';
// @ts-ignore
import { Plugin } from '@fesjs/runtime';
import type { Plugin } from '@fesjs/runtime';
interface BeforeRenderConfig {
loading: Component;
@ -44,6 +44,9 @@ declare module '@fesjs/fes' {
interface PluginBuildConfig {
globalCSS?: 'beforeImports' | 'afterImports';
alias?: Record<string, string>;
console?: {
version?: boolean;
};
autoprefixer?: {
/** environment for `Browserslist` */
env?: string;
@ -86,10 +89,10 @@ declare module '@fesjs/fes' {
dynamicImport?: boolean;
inlineLimit?: number;
mock?:
| boolean
| {
prefix?: string;
};
| boolean
| {
prefix?: string;
};
mountElementId?: string;
plugins?: string[];
presets?: string[];

@ -1,37 +1,37 @@
{
"name": "@fesjs/runtime",
"version": "3.0.0",
"description": "@fesjs/runtime",
"main": "es/index.js",
"module": "es/index.js",
"files": [
"lib",
"es",
"types.d.ts"
],
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-runtime"
},
"keywords": [
"fes"
],
"sideEffects": false,
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"vue": "^3.2.47"
},
"dependencies": {
"vue-router": "^4.0.1"
},
"typings": "./types.d.ts"
"name": "@fesjs/runtime",
"version": "3.0.1",
"description": "@fesjs/runtime",
"main": "es/index.js",
"module": "es/index.js",
"files": [
"lib",
"es",
"types.d.ts"
],
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-runtime"
},
"keywords": [
"fes"
],
"sideEffects": false,
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"vue": "^3.2.47"
},
"dependencies": {
"vue-router": "^4.0.1"
},
"typings": "./types.d.ts"
}

@ -1,4 +1,4 @@
export { Plugin } from './es/index'
export { Plugin } from './es/index';
export {
useRoute,
@ -15,7 +15,7 @@ export {
} from 'vue-router';
export interface ApplyPluginsType {
compose: 'compose',
event: 'event',
modify: 'modify'
compose: 'compose';
event: 'event';
modify: 'modify';
};

@ -54,6 +54,7 @@ export default defineBuildConfig({
{
title: '子菜单',
path: '/menuTest',
query: { id: 1 },
},
],
},

@ -23,8 +23,9 @@ export const beforeRender = {
};
export const layout = {
logo: `${process.env.BASE_URL}wine-outline.svg`,
renderCustom: (props) => {
// eslint-disable-next-line node/prefer-global/process
logo: `${process.env.BASE_URL}logo.png`,
renderCustom: () => {
return <UserCenter />;
},
};

@ -8,6 +8,9 @@ export default defineBuildConfig({
define: {
__DEV__: false,
},
console: {
version: true,
},
html: {
title: '海贼王',
},
@ -33,7 +36,7 @@ export default defineBuildConfig({
},
},
layout: {
title: 'Fes.js',
title: '$home',
footer: 'Created by MumbleFE',
multiTabs: true,
navigation: 'mixin',
@ -47,6 +50,7 @@ export default defineBuildConfig({
{
name: 'editor',
icon: '/wine-outline.svg',
_blank: true,
},
{
title: '$externalLink',
@ -70,6 +74,7 @@ export default defineBuildConfig({
},
{
name: 'pinia',
_blank: true,
},
],
menuProps: {

@ -3,6 +3,11 @@ import { ref, watch } from 'vue';
import PageLoading from '@/components/pageLoading.vue';
import UserCenter from '@/components/userCenter.vue';
export function onLocaleChange({ locale, t }) {
//
console.log(locale, t);
}
export const beforeRender = {
loading: <PageLoading />,
action() {
@ -20,24 +25,29 @@ export const beforeRender = {
},
};
export const layout = (layoutConfig, { initialState }) => ({
...layoutConfig,
renderCustom: (props) => {
console.log(props);
return <UserCenter />;
},
menus: () => {
const menusRef = ref(layoutConfig.menus);
watch(
() => initialState.userName,
() => {
menusRef.value = [
{
name: 'store',
},
];
},
);
return menusRef;
},
});
export function layout(layoutConfig, { initialState }) {
return {
...layoutConfig,
403: {
title: 'hello word',
},
renderCustom: (props) => {
console.log(props);
return <UserCenter />;
},
menus: () => {
const menusRef = ref(layoutConfig.menus);
watch(
() => initialState.userName,
() => {
menusRef.value = [
{
name: 'store',
},
];
},
);
return menusRef;
},
};
}

@ -5,5 +5,5 @@ html, body {
.page {
height: 1000px;
background-image: url('~@/images/hello.png');
background: url("@/images/hello.png");
}

@ -4,6 +4,6 @@ export default {
externalLink: 'externalLink',
mock: 'mock',
test: {
b: 1,
test: 'test',
},
};

@ -4,6 +4,6 @@ export default {
externalLink: '外部链接',
mock: '代理',
test: {
b: 1,
test: '测试',
},
};

@ -13,7 +13,7 @@ import { FButton } from '@fesjs/fes-design';
defineRouteMeta({
name: 'index',
title: '$home',
title: '$test.test',
});
console.log('123123'.replaceAll('123', '234'));
@ -27,6 +27,5 @@ function go() {
<style lang="less">
.page {
height: 1000px;
background-image: url('@/images/hello.png');
}
</style>

@ -1,19 +1,23 @@
<template>
<div class="page">menuTest: {{ route.params }} <input style="border: 1px solid red" /></div>
<div class="page">
menuTest: {{ route.params }} <input style="border: 1px solid red">
</div>
</template>
<config>
{
"title": "menuTest-详情"
}
</config>
<script>
import { useRoute, useTabTitle } from '@fesjs/fes';
import { useLayout, useRoute } from '@fesjs/fes';
export default {
components: {},
setup() {
const route = useRoute();
const title = useTabTitle(`详情-${route.params?.id}`);
const { title } = useLayout({ title: `详情-${route.params?.id}` });
setTimeout(() => {
title.value = `详情-${route.params?.id}-changed`;

@ -2,17 +2,25 @@
<div class="page">
menuTest-index
<div style="display: flex; flex-direction: column">
<router-link to="/menuTest/1">Go to 1</router-link>
<router-link to="/menuTest/2">Go to 2</router-link>
<router-link to="/menuTest/3">Go to 3</router-link>
<router-link to="/menuTest/1">
Go to 1
</router-link>
<router-link to="/menuTest/2">
Go to 2
</router-link>
<router-link to="/menuTest/3">
Go to 3
</router-link>
</div>
</div>
</template>
<config>
{
"title": "menuTest"
}
</config>
<script>
export default {
components: {},

@ -1,7 +1,10 @@
<template>
<div>{{ store.counter }}</div>
<FButton class="m-2" @click="store.increment">Button</FButton>
<FButton class="m-2" @click="store.increment">
Button
</FButton>
</template>
<config>
{
"name": "pinia",
@ -11,6 +14,7 @@
}
}
</config>
<script>
import { FButton } from '@fesjs/fes-design';
import { useStore } from '@/store/main';

@ -1,31 +1,30 @@
{
"compilerOptions": {
"outDir": "build/dist",
"module": "esnext",
"target": "esnext",
"lib": ["esnext", "dom"],
"sourceMap": true,
"baseUrl": ".",
"jsx": "preserve",
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"allowJs": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"strict": true,
"paths": {
"@/*": ["./src/*"],
"@@/*": ["./src/.fes/*"]
}
},
"include": [
"src/**/*",
".fes.js",
".fes.*.js"
],
"exclude": ["node_modules", "build", "dist", "scripts", "src/.fes/*", "webpack", "jest"]
"compilerOptions": {
"target": "esnext",
"jsx": "preserve",
"lib": ["esnext", "dom"],
"experimentalDecorators": true,
"baseUrl": ".",
"module": "esnext",
"moduleResolution": "node",
"paths": {
"@/*": ["./src/*"],
"@@/*": ["./src/.fes/*"]
},
"allowJs": true,
"strict": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"outDir": "build/dist",
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"include": [
"src/**/*",
".fes.js",
".fes.*.js"
],
"exclude": ["node_modules", "build", "dist", "scripts", "src/.fes/*", "webpack", "jest"]
}

@ -1,46 +1,46 @@
{
"name": "@fesjs/utils",
"version": "3.0.1",
"description": "@fesjs/utils",
"main": "lib/index.js",
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-utils"
},
"keywords": [
"fes"
],
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@babel/generator": "^7.21.3",
"@babel/parser": "^7.21.3",
"@babel/traverse": "^7.21.3",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
"crequire": "^1.8.1",
"debug": "^4.3.2",
"deepmerge": "^4.2.2",
"glob": "^9.3.2",
"lodash": "^4.17.21",
"mkdirp": "^2.1.6",
"mustache": "^4.2.0",
"pkg-up": "^3.1.0",
"portfinder": "^1.0.32",
"resolve": "^1.20.0",
"rimraf": "^4.4.1",
"semver": "^7.3.5",
"yargs-parser": "^21.1.1"
}
"name": "@fesjs/utils",
"version": "3.0.3",
"description": "@fesjs/utils",
"main": "lib/index.js",
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
"directory": "packages/fes-utils"
},
"keywords": [
"fes"
],
"author": "qlin",
"license": "MIT",
"bugs": {
"url": "https://github.com/WeBankFinTech/fes.js/issues"
},
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@babel/generator": "^7.21.3",
"@babel/parser": "^7.21.3",
"@babel/traverse": "^7.21.3",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
"crequire": "^1.8.1",
"debug": "^4.3.2",
"deepmerge": "^4.2.2",
"glob": "^9.3.2",
"lodash": "^4.17.21",
"mkdirp": "^2.1.6",
"mustache": "^4.2.0",
"pkg-up": "^3.1.0",
"portfinder": "^1.0.32",
"resolve": "^1.20.0",
"rimraf": "^4.4.1",
"semver": "^7.3.5",
"yargs-parser": "^21.1.1"
}
}

Some files were not shown because too many files have changed in this diff Show More