Compare commits

...

179 Commits

Author SHA1 Message Date
Soybean
ead48f4502 chore(projects): release v0.10.4 2023-09-20 23:42:22 +08:00
Soybean
305d95672a chore(deps): update deps 2023-09-20 23:40:51 +08:00
Soybean
8a792c7d63 Merge pull request #278 from eltociear/patch-1
docs(projects): update README.md
2023-09-20 23:31:05 +08:00
Ikko Eltociear Ashimine
93ed5ad085 docs(projects): update README.md
github -> GitHub
2023-09-20 14:35:47 +09:00
Soybean
41f23386b2 fix(projects): fix reload button animate 2023-09-07 23:25:30 +08:00
Soybean
c91644b829 feat(projects): add plugin-web-update-notification 2023-09-06 01:27:39 +08:00
Soybean
073fd16bd7 refactor(projects): update soybean domain 2023-09-06 01:07:29 +08:00
Soybean
f92ee770e0 refactor(projects): add reCacheRoute method 2023-09-06 00:34:48 +08:00
Soybean
1e6d52357e Merge pull request #272 from linjiangl/main
chore(projects): When tab is switched, keep the page without refreshing
2023-09-06 00:18:04 +08:00
Soybean
751ded44f3 chore(deps): update deps 2023-09-06 00:14:35 +08:00
Soybean
8567f3e34e Merge pull request #271 from lapislazulisch/dynamicRoute
Dynamic route
2023-08-31 00:31:40 +08:00
linjiangl
83f2514403 chore(projects): When tab is switched, keep the page without refreshing 2023-08-24 16:26:49 +08:00
lapislazulisch
ad6ac7222c fix(components): 修复动态路由home页404 2023-08-23 16:03:19 +08:00
lapislazulisch
3ae1952624 fix(components): 修复动态路由主页404 2023-08-23 16:00:17 +08:00
lapislazulisch
3db549af40 fix:动态路由首页404 2023-08-23 15:41:40 +08:00
Soybean
94179ae552 Merge pull request #269 from snowords/main
Update Docker deployment method and git hooks init command
2023-08-11 16:49:32 +08:00
muzzyh
7f35e87ed8 docs(projects): update git hooks init command 2023-08-11 14:47:47 +08:00
muzzyh
00da0009ef docs(projects): update Docker deployment method 2023-08-11 11:08:05 +08:00
Soybean
cffc30afa3 chore(projects): correct word spell & eslint fix code 2023-08-04 01:55:00 +08:00
Soybean
24cf1d9284 style(projects): prettier format code 2023-08-04 01:39:12 +08:00
Soybean
9296e6987d chore(deps): update deps 2023-08-04 01:37:21 +08:00
Soybean
809fa85706 perf(hooks): perf useHookTable 2023-07-26 00:50:21 +08:00
Soybean
b3ae7605d3 feat(hooks): add useHookTable 2023-07-24 00:59:45 +08:00
Soybean
864ec4737d fix(projects): correct the lang file name & add recommend vscode plugin i18n-ally 2023-07-23 20:31:59 +08:00
Soybean
854d0bcf20 feat(projects): new i18n function $t & login page and setting drawer config i18n 2023-07-23 20:29:39 +08:00
Soybean
458e387b68 chore(projects): correct the word spell 2023-07-19 23:44:18 +08:00
Soybean
56c770c49d chore(projects): update VSCode setting 2023-07-19 23:28:32 +08:00
Soybean
946447394d chore(projects): update pnpm-lock.yaml 2023-07-19 23:25:29 +08:00
Soybean
44ba3273cb chore(deps): update deps 2023-07-19 23:15:27 +08:00
Soybean
0f7b9d5e2b fix(styles): 用户管理页面布局自适应屏幕高度 (fixed #253) 2023-07-19 23:14:33 +08:00
Soybean
8a3f66db7b Merge pull request #260 from eAliwei/issues/255
feat(auth): 防止多次刷新token
2023-07-15 01:06:43 +08:00
liwei
0eaa327d47 feat(auth): 防止多次刷新token 2023-07-13 21:34:34 +08:00
Soybean
08e0cf5ad5 chore(projects): update deps & fix eslint code 2023-07-09 13:40:33 +08:00
Soybean
d7aea9d11c chore(projects): update package.json 2023-07-07 01:50:05 +08:00
Soybean
135ce77288 chore(deps): update deps 2023-07-07 01:49:02 +08:00
Soybean
19141a73d2 docs(projects): update README.md logo 2023-07-07 01:33:34 +08:00
Soybean
9d1051b0bd chore(projects): update deps and fix swiper 2023-07-05 01:54:30 +08:00
Soybean
c46a5920e5 refactor(projects): 生产环境缓存主题变更为sessionStorage 2023-07-05 01:41:57 +08:00
Soybean
43ac23f113 style(projects): update default theme color 2023-07-05 01:37:29 +08:00
Soybean
13f6cd8ef4 fix(projects): fix set tab title (fixed #256) 2023-06-27 22:48:04 +08:00
Soybean
0e6d289128 chore(deps): update deps 2023-06-27 22:24:08 +08:00
Soybean
bba68bff29 chore(deps): update deps 2023-06-25 07:55:39 +08:00
Soybean
6e0cce4d49 feat(projects): add switch for customize darkmode transition 2023-06-20 22:33:22 +08:00
Soybean
d3ebe95076 perf(projects): add type declaration for document startViewTransition 2023-06-20 22:07:21 +08:00
Soybean
cbda4a38a3 style(projects): unify card border radius, 16px to 8px 2023-06-20 00:17:18 +08:00
Soybean
3318041b92 perf(hooks): perf use-table 2023-06-19 23:43:16 +08:00
Soybean
af53ec7625 feat(projects): add websocket demo 2023-06-18 22:24:21 +08:00
Soybean
de2829fde7 chore(projects): release v0.10.3 2023-06-15 19:26:12 +08:00
Soybean
c1bee4046c chore(projects): add vite-plugin-vue-devtools 2023-06-15 19:25:32 +08:00
Soybean
473095b01b fix(styles): fix toggle-lang bg 2023-06-15 01:00:14 +08:00
Soybean
e6abf93457 chore(deps): update deps 2023-06-14 23:59:43 +08:00
Soybean
882f281482 chore(deps): decrease vite-plugin-page-route 2023-06-12 13:35:05 +08:00
Soybean
0b2f68ac04 chore(projects): update deps & update package.json 2023-06-12 01:30:50 +08:00
Soybean
2ca2b766f8 fix(projects): fix userRoleOptions 2023-06-10 12:05:57 +08:00
Soybean
da611fb10b perf(projects): use transformObjectToOption to generate option of object labels 2023-06-08 23:56:27 +08:00
Soybean
eb8e49e23c perf(projects): remove useless code 2023-06-08 23:38:14 +08:00
Soybean
0907d38c06 chore(projects): update deps & update unocss deprecated api exclude 2023-06-08 23:05:08 +08:00
Soybean
2a9b725c6a docs(projects): update CHANGELOG.md by regenerate changelog 2023-06-07 22:50:59 +08:00
Soybean
8f24a94ed3 docs(projects): update README.md 2023-06-07 02:22:13 +08:00
Soybean
4eefc95baa docs(projects): update README.md picture url 2023-06-07 02:16:18 +08:00
Soybean
1681c34a52 docs(projects): update README.md 2023-06-07 02:06:40 +08:00
Soybean
47ab0184b7 chore(deps): update deps 2023-06-07 01:48:55 +08:00
Soybean
58591f660a chore(projects): update @soybeanjs/cli and generate total changelog 2023-06-07 01:46:09 +08:00
Soybean
3c7e1cf442 docs(projects): update README.md 2023-06-05 02:13:15 +08:00
Soybean
055d4cce33 docs(projects): generate full CHANGELOG.md 2023-06-05 02:00:59 +08:00
Soybean
a3dfe61a7b chore(projects): remove bumpp & add release script 2023-06-05 01:57:23 +08:00
Soybean
f9d47c081f chore(deps): update deps 2023-06-05 01:55:09 +08:00
Soybean
ff5bf62989 docs(projects): CHANGELOG.md 2023-05-31 18:25:40 +00:00
Soybean
1f6d079644 chore: release v0.10.2 2023-06-01 02:24:57 +08:00
Soybean
5c085a1986 fix(components): fix mix-menu layout when the locale is English (fixed 241) 2023-06-01 02:24:26 +08:00
Soybean
9a23817473 chore(projects): update deps and use soy lint-staged replace lint-staged 2023-06-01 02:10:07 +08:00
Soybean
56ea8937f6 docs(projects): fix README.md: example image link 2023-05-31 09:28:34 +08:00
Soybean
4f51263501 docs(projects): update README.md: update example image url [更新示例图片的链接] 2023-05-31 02:32:06 +08:00
Soybean
bb2eab60f4 docs(projects): CHANGELOG.md 2023-05-30 18:20:40 +00:00
Soybean
44e4c04811 chore: release v0.10.1 2023-05-31 02:19:56 +08:00
Soybean
b5839eab26 docs(projects): update README.md 2023-05-31 02:18:19 +08:00
Soybean
780ac75bf6 chore(projects): add switch for pageRoute plugin [添加自动生成路由的插件的开关] 2023-05-31 01:52:57 +08:00
Soybean
a252138594 docs(projects): CHANGELOG.md 2023-05-30 17:47:56 +00:00
Soybean
270a055072 chore: release v0.10.0 2023-05-31 01:47:13 +08:00
Soybean
08e194efe9 perf(projects): move changing document title by locale to global event of composables & add appLoading unmount 2023-05-31 01:44:49 +08:00
Soybean
5f6caab338 docs(projects): update CHANGELOG.md 2023-05-31 01:35:04 +08:00
Soybean
5aaa318142 chore(projects): remove useless packages, update lint-staged config, add githublogen 2023-05-31 01:33:46 +08:00
Soybean
cebbef680f chore(deps): update deps 2023-05-31 01:08:31 +08:00
Soybean
0abde46ef4 fix(projects): hide the drawer when it is initial mobile mode [初始化时为移动端布局则隐藏侧边栏] fixed #238 2023-05-26 13:08:35 +08:00
Soybean
f2b518ed26 feat(projects): support mobile layout [支持移动端布局] 2023-05-26 03:27:41 +08:00
Soybean
c6207f35e1 Merge pull request #237 from abstain23/fix-i18n
fix(projects): 修复面包屑导航下拉菜单语言显示问题
2023-05-25 21:13:45 +08:00
cc
ee8fa04814 fix(projects): 修复面包屑导航下拉菜单语言显示问题 2023-05-25 21:11:42 +08:00
Soybean
7b746fa053 perf(projects): complete dynamic route translate [补充动态路由的翻译] 2023-05-24 23:17:29 +08:00
Soybean
b7fea53107 Merge pull request #234 from chhinsras/main
Add Khmer Translation
2023-05-24 23:03:23 +08:00
Chhin Sras
f89f3e6a38 Added Khmer Translation 2023-05-24 21:07:35 +07:00
Chhin Sras
a0da2f6e16 Delete actions-template-sync.yml 2023-05-24 15:52:05 +07:00
Chhin Sras
3b5380e0d1 Update Sras.md 2023-05-24 15:38:43 +07:00
Chhin Sras
35276bfe41 Update and rename .github/workflows/actions-template-sync.yml to actions-template-sync.yml 2023-05-24 15:30:10 +07:00
Chhin Sras
215c1ecbd9 Update and rename sync-from-template.yml to actions-template-sync.yml 2023-05-24 15:24:51 +07:00
Chhin Sras
1698b21d7a Create Sras.md 2023-05-24 15:18:35 +07:00
Chhin Sras
ca1e66be47 Rename sync-from-template to sync-from-template.yml 2023-05-24 15:13:58 +07:00
Chhin Sras
22bf2823e8 Update and rename actions-template-sync to sync-from-template 2023-05-24 15:12:03 +07:00
Chhin Sras
32e98f1b3a Create actions-template-sync 2023-05-24 15:06:44 +07:00
Soybean
c1c4335ce7 build(projects): update deps and fix style [升级依赖&修复代码格式] 2023-05-24 00:17:00 +08:00
Soybean
6c50662280 Merge pull request #233 from fast-crud/优化README.md
优化readme.md
2023-05-24 00:12:44 +08:00
xiaojunnuo
f3a1707b94 docs(projects): readme.md 二次开发的项目内容换行 2023-05-23 17:52:06 +08:00
xiaojunnuo
6ea755f2a8 docs(projects): 优化README.md 2023-05-23 17:43:00 +08:00
Soybean
a989b44a15 docs(projects): update README.md [更新README.md] 2023-05-22 23:04:57 +08:00
Soybean
40f8587fd6 build(deps): update deps [升级依赖] 2023-05-21 22:35:30 +08:00
Soybean
9f5638f16d fix(projects): add prod mockjs switch [添加生产模式的mockjs的开关] 2023-05-17 07:55:12 +08:00
Soybean
9b19f96ff6 fix(projects): fix mockjs [修复mockjs] 2023-05-16 22:29:35 +08:00
Soybean
15da557892 Merge pull request #230 from kirklin/fix_tsconfig
fix(projects): tsconfig missing isolatedModules
2023-05-16 19:36:04 +08:00
Soybean
2d23c9a2e6 Merge pull request #229 from kirklin/vue3.3
refactor(projects): upgrade vue3.3, official support defineOptions
2023-05-16 19:34:16 +08:00
Kirk Lin
ab49afd3db fix(projects): tsconfig missing isolatedModules 2023-05-16 17:39:05 +08:00
Kirk Lin
86a370fd69 refactor(projects): upgrade vue3.3, official support defineOptions 2023-05-16 17:32:38 +08:00
Soybean
36fc74ce07 Merge pull request #226 from abstain23/feat/theme-transtion
feat(projects): 增加主题切换过渡效果
2023-05-14 16:49:26 +08:00
cc
8da8843fd0 feat(projects): 增加主题切换过渡效果 2023-05-14 16:35:38 +08:00
Soybean
f68285fbe5 feat(projects): add menu translate [翻译菜单] 2023-05-13 14:20:06 +08:00
Soybean
85b8ef8f88 Merge pull request #225 from abstain23/feat-i18n
feat(projects): 增加i18n支持翻译菜单,tab,title
2023-05-13 13:12:28 +08:00
cc
3d48aa8bbe feat(projects): 增加i18n支持翻译菜单,tab,title 2023-05-13 12:58:35 +08:00
Soybean
a765da6e28 docs(projects): update README.md [更新README.md] 2023-05-10 22:23:18 +08:00
Soybean
c57640acd0 fix(projects): fix better-mock usage [修复better-mock用法] 2023-05-06 19:41:55 +08:00
Soybean
c264216053 build(deps): update deps [升级依赖] 2023-05-06 19:35:54 +08:00
Soybean
9d3c732993 refactor(projects): use better-mock replace mockjs [用better-mock替换mockjs] 2023-05-06 19:34:31 +08:00
Soybean
34f023c4b1 build(projects): update deps and fix type error [升级依赖并修复类型问题] 2023-05-04 19:02:20 +08:00
Soybean
5a4f842774 docs(projects): update README.md [更新README.md] 2023-04-26 08:40:07 +08:00
Soybean
bae1767141 build(deps): update deps [升级依赖] 2023-04-26 08:32:54 +08:00
Soybean
5957833a4f fix(projects): fix router guide [修复路由跳转异常] fixed #216 2023-04-21 00:46:03 +08:00
Soybean
397092c21f docs(projects): update README.md [更新README.md] 2023-04-20 01:41:07 +08:00
Soybean
f309003e67 refactor(projects): remove page examples: tree [去除tree相关示例页面] 2023-04-20 01:37:52 +08:00
Soybean
eaf3678758 build(deps): update deps and remove vite-plugin-html [升级依赖,去除vite-plugin-html] 2023-04-20 01:32:53 +08:00
Soybean
f2e82da7c8 build(deps): update deps [升级依赖] 2023-04-19 09:10:36 +08:00
Soybean
211ae1f905 refactor(projects): update useTable 2023-04-04 19:19:13 +08:00
Soybean
db629593c6 build(deps): update deps 2023-04-02 12:57:36 +08:00
Soybean
80d58cce2b Merge pull request #210 from SonyLeo/feature/tree
Feature/tree
2023-04-02 12:56:00 +08:00
small_happy
a0f55aca69 feat(components): Add routing data related to tree components and page display optimization 2023-04-02 10:45:51 +08:00
small_happy
d203a3586c feat(components): Add tree related component instances 2023-04-02 10:07:50 +08:00
Soybean
f74a6424d0 docs(projects): add qq to README.md [文档添加QQ群] 2023-03-15 18:14:25 +08:00
Soybean
209ef3d890 style(projects): per style [完善样式] 2023-03-15 09:01:06 +08:00
Soybean
b549b32cbb Merge pull request #205 from yanbowe/main
feat(projects): fix to top [返回顶部功能适配新布局]
2023-03-14 22:31:41 +08:00
燕博文
54e2cb51cf feat(projects): 返回顶部功能适配新布局 2023-03-14 13:50:23 +08:00
Soybean
42e6de395f build(projects): remove old layout,tab package [去除旧的布局和页签依赖] 2023-03-14 00:34:47 +08:00
Soybean
c0066b22b0 chore(release): 0.9.9 2023-03-13 23:55:02 +08:00
Soybean
aaef0bec27 docs(projects): update README.md 2023-03-13 23:51:28 +08:00
Soybean
912c3531c5 feat(projects): new layout,tab and add update theme settings 2023-03-13 23:47:39 +08:00
Soybean
488e6e3204 feat(projects): custom unocss colors support opacity 2023-03-13 20:52:26 +08:00
Soybean
f73e3f648d fix(projects): fix github bug-report 2023-03-13 19:52:40 +08:00
Soybean
36e5feac98 build(projects): update deps, add prettier format command 2023-03-12 22:47:00 +08:00
Soybean
cc13fcc8aa feat(hooks): add useNaiveTable 2023-03-10 08:32:39 +08:00
Soybean
7f748f2a61 Merge pull request #200 from guuuuo/main
fix(utils): make AxiosRequestConfig optional for request.handleDelete()
2023-03-08 12:27:48 +08:00
guuuuo
4a6fec8af0 fix(utils): make AxiosRequestConfig optional for request.handleDelete() 2023-03-08 01:30:33 +00:00
Soybean
e2b320ad27 refactor(projects): rename union key 2023-03-08 06:41:42 +08:00
Soybean
21d5214247 refactor(projects): remove enum 2023-03-08 06:41:10 +08:00
Soybean
44b544745d Merge pull request #199 from elliotxiang/main
proxy fail fix
2023-03-07 16:04:02 +08:00
elliotliu
5499a559c8 proxy fail fix
修复代理地址缺少/导致代理失败
2023-03-07 15:51:53 +08:00
elliotliu
ebe2c56348 proxy fail fix
修改代理地址缺少/导致代理失败问题
2023-03-07 15:51:07 +08:00
Soybean
8debfe7e95 refactor(projects): update service and proxy config 2023-03-07 07:58:37 +08:00
Soybean
1ef1b6bda9 docs(projects): update README.md 2023-03-07 07:36:38 +08:00
Soybean
fb46d7ec7c style(projects): format yaml 2023-03-06 21:07:02 +08:00
Soybean
cea600f12c refactor(projects): all file and folder use kebab-case 2023-03-06 21:06:36 +08:00
Soybean
bf2f617255 fix(projects): fix pwa logo 2023-03-06 13:33:51 +08:00
Soybean
cf8c7cb258 docs(projects): update README.md 2023-03-06 13:22:43 +08:00
Soybean
4e87f0b665 Merge pull request #198 from lixin59/issue/fix-bug-repo-style
chore(projects): 修复issue模板格式问题
2023-03-05 00:33:13 +08:00
lixin59
d8baba586b chore(projects): 修复issue模板格式问题 2023-03-04 21:39:26 +08:00
Soybean
3cff2eb4ce Merge pull request #195 from lixin59/issue/add-github-action
chore(projects): add github action
2023-03-04 00:44:05 +08:00
lixin
f355a698ad chore(projects): add github action 2023-03-03 17:40:26 +08:00
Soybean
c3d0b74c75 Merge pull request #194 from taisha/main
fix(components): refresh cached routes
2023-03-02 08:20:41 +08:00
alue_mobile
b0f98e4bfa fix(components): refresh cached routes 2023-03-01 13:56:04 +08:00
Soybean
506ffb8adf Merge pull request #182 from Shadowsight9/main
fix(projects): the length of routes children list should greater than 0
2023-02-19 19:33:53 +08:00
HuangZheng
e1afc10b80 fix(projects): the length of routes children list should greater than 0 2023-02-19 17:04:55 +08:00
Soybean
960b436c79 Merge pull request #180 from sunhao1256/main
fix(projects): not only `/login` claim dynamic path scenario
2023-02-14 12:11:44 +08:00
sunhao1256
6059891556 fix(projects): not only /login claim dynamic path scenario , but also others , eg:/user/1 2023-02-13 16:57:54 +08:00
Soybean
3503dff663 build(projects): update unocss config 2023-02-13 01:40:07 +08:00
Soybean
61998886ac build(deps): update deps 2023-02-13 01:39:43 +08:00
Soybean
608d7fb34d build(projects): update vscode config 2023-02-13 01:39:17 +08:00
Soybean
6bb6d9f71e Merge pull request #179 from sunhao1256/main
fix(projects): sortRoutes recursively
2023-02-13 01:20:26 +08:00
sunhao1256
918894147a fix(projects): sortRoutes recursively 2023-02-12 13:13:03 +08:00
Soybean
0b5afda287 fix(projects): fix eslint svg cause incorrect icon render 2023-02-10 02:55:42 +08:00
Soybean
a8a6ed97b9 build(projects): perf logo 2023-02-10 02:24:52 +08:00
Soybean
919376b77c Merge pull request #178 from yanbowe/main
fix(components): 修复iconSelect选择器点击事件失效
2023-02-09 23:58:41 +08:00
燕博文
7e505f9b96 fix(components): 修复iconSelect选择器点击事件失效 2023-02-09 10:59:34 +08:00
Soybean
de517be613 Merge pull request #177 from taisha/fix-tab
fix(components): 页面跳转被拦截, 则会出现 tab 页签与页面不一致的问题
2023-02-09 00:43:18 +08:00
刘璐
bd5dd2cf28 fix(components): 页面跳转被拦截, 则会出现 tab 页签与页面不一致的问题 2023-02-08 22:29:54 +08:00
Soybean
da521b35e6 build(projects): update deps and fix project config 2023-02-03 00:39:43 +08:00
294 changed files with 10087 additions and 8353 deletions

8
.env
View File

@@ -13,8 +13,8 @@ VITE_AUTH_ROUTE_MODE=static
VITE_ROUTE_HOME_PATH=/dashboard/analysis VITE_ROUTE_HOME_PATH=/dashboard/analysis
# iconify图标作为组件的前缀 # iconify图标作为组件的前缀
VITE_ICON_PREFFIX=icon VITE_ICON_PREFIX=icon
# 本地SVG图标作为组件的前缀, 请注意一定要包含 VITE_ICON_PREFFIX # 本地SVG图标作为组件的前缀, 请注意一定要包含 VITE_ICON_PREFIX
# 格式 {VITE_ICON_PREFFIX}-{本地图标集合名称} # 格式 {VITE_ICON_PREFIX}-{本地图标集合名称}
VITE_ICON_LOCAL_PREFFIX=icon-local VITE_ICON_LOCAL_PREFIX=icon-local

View File

@@ -4,22 +4,13 @@ type ServiceEnv = Record<ServiceEnvType, ServiceEnvConfig>;
/** 不同请求服务的环境配置 */ /** 不同请求服务的环境配置 */
const serviceEnv: ServiceEnv = { const serviceEnv: ServiceEnv = {
dev: { dev: {
url: 'http://localhost:8080', url: 'http://localhost:8080'
urlPattern: '/url-pattern',
secondUrl: 'http://localhost:8081',
secondUrlPattern: '/second-url-pattern'
}, },
test: { test: {
url: 'http://localhost:8080', url: 'http://localhost:8080'
urlPattern: '/url-pattern',
secondUrl: 'http://localhost:8081',
secondUrlPattern: '/second-url-pattern'
}, },
prod: { prod: {
url: 'http://localhost:8080', url: 'http://localhost:8080'
urlPattern: '/url-pattern',
secondUrl: 'http://localhost:8081',
secondUrlPattern: '/second-url-pattern'
} }
}; };
@@ -27,10 +18,13 @@ const serviceEnv: ServiceEnv = {
* 获取当前环境模式下的请求服务的配置 * 获取当前环境模式下的请求服务的配置
* @param env 环境 * @param env 环境
*/ */
export function getServiceEnvConfig(env: ImportMetaEnv) { export function getServiceEnvConfig(env: ImportMetaEnv): ServiceEnvConfigWithProxyPattern {
const { VITE_SERVICE_ENV = 'dev' } = env; const { VITE_SERVICE_ENV = 'dev' } = env;
const config = serviceEnv[VITE_SERVICE_ENV]; const config = serviceEnv[VITE_SERVICE_ENV];
return config; return {
...config,
proxyPattern: '/proxy-pattern'
};
} }

View File

@@ -1 +1,2 @@
VITE_HTTP_PROXY=Y VITE_HTTP_PROXY=Y
VITE_SOYBEAN_ROUTE_PLUGIN=Y

View File

@@ -6,3 +6,5 @@ VITE_COMPRESS=N
VITE_COMPRESS_TYPE=gzip VITE_COMPRESS_TYPE=gzip
VITE_PWA=N VITE_PWA=N
VITE_PROD_MOCK=Y

View File

@@ -1,3 +1,3 @@
!.env-config.ts !.env-config.ts
components.d.ts
router-page.d.ts router-page.d.ts

View File

@@ -1,11 +1,18 @@
module.exports = { module.exports = {
extends: ['soybeanjs-vue'], extends: ['soybeanjs/vue'],
overrides: [ overrides: [
{ {
files: ['./scripts/*.ts'], files: ['./scripts/*.ts'],
rules: { rules: {
'no-unused-expressions': 'off' 'no-unused-expressions': 'off'
} }
},
{
files: ['*.vue'],
rules: {
'no-undef': 'off', // use tsc to check the ts code of the vue
'vue/no-setup-props-destructure': 'off' // wait to fix this rule
}
} }
], ],
settings: { settings: {
@@ -38,6 +45,11 @@ module.exports = {
group: 'external', group: 'external',
position: 'before' position: 'before'
}, },
{
pattern: '@/constants',
group: 'internal',
position: 'before'
},
{ {
pattern: '@/config', pattern: '@/config',
group: 'internal', group: 'internal',
@@ -48,11 +60,6 @@ module.exports = {
group: 'internal', group: 'internal',
position: 'before' position: 'before'
}, },
{
pattern: '@/enum',
group: 'internal',
position: 'before'
},
{ {
pattern: '@/plugins', pattern: '@/plugins',
group: 'internal', group: 'internal',

90
.github/ISSUE_TEMPLATE/bug-report.yaml vendored Normal file
View File

@@ -0,0 +1,90 @@
name: Bug提交
description: 在使用软件或功能的过程中遇到了错误
title: '[Bug]: '
labels: [ "bug?" ]
body:
- type: markdown
attributes:
value: |
## 请按照以下要求进行提交
### 1. 提交后需要指定标签和截止时间。
---
- type: markdown
attributes:
value: |
## 环境信息
请根据实际使用环境修改以下信息。
- type: input
id: env-program-ver
attributes:
label: 软件版本
validations:
required: true
- type: dropdown
id: env-vm-ver
attributes:
label: 运行环境
description: 选择运行软件的系统版本
options:
- Windows (64)
- Windows (32/x84)
- MacOS
- Linux
- Ubuntu
- CentOS
- ArchLinux
- UNIX (Android)
- 其它(请在下方说明)
validations:
required: true
- type: dropdown
id: env-vm-arch
attributes:
label: 运行架构
description: (可选) 选择运行软件的系统架构
options:
- AMD64
- x86
- ARM [32] (别名AArch32 / ARMv7
- ARM [64] (别名AArch64 / ARMv8
- 其它
- type: textarea
id: reproduce-steps
attributes:
label: 重现步骤
description: |
我们需要执行哪些操作才能让 bug 出现?
简洁清晰的重现步骤能够帮助我们更迅速地定位问题所在。
validations:
required: true
- type: textarea
id: expected
attributes:
label: 期望的结果是什么?
validations:
required: true
- type: textarea
id: actual
attributes:
label: 实际的结果是什么?
validations:
required: true
- type: textarea
id: logging
attributes:
label: 日志记录(可选)
render: golang
- type: textarea
id: extra-desc
attributes:
label: 补充说明(可选)

11
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,11 @@
## Pull Request 详情
请根据实际使用情况修改以下信息。
## 版本信息
## 解决了哪些问题
## 是否关闭了某个 Issue
Closes #

30
.github/workflows/linter.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
---
name: Lint Code
permissions:
contents: write
on:
pull_request:
branches: [main]
jobs:
lint:
name: Lint All Code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
# To change branch master or main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILTER_REGEX_EXCLUDE: (docs|.github)
VALIDATE_MARKDOWN: false

25
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Release
permissions:
contents: write
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16.x
- run: npx githublogen
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

1
.gitignore vendored
View File

@@ -34,3 +34,4 @@ stats.html
/src/typings/components.d.ts /src/typings/components.d.ts
package-lock.json package-lock.json
yarn.lock yarn.lock
pnpm-lock.yaml

2
.npmrc
View File

@@ -1,4 +1,2 @@
registry=https://registry.npmmirror.com/ registry=https://registry.npmmirror.com/
shamefully-hoist=true shamefully-hoist=true
strict-peer-dependencies=false
auto-install-peers=true

View File

@@ -1,11 +1,7 @@
{ {
"recommendations": [ "recommendations": [
"afzalsayed96.icones",
"antfu.iconify",
"antfu.unocss", "antfu.unocss",
"christian-kohler.path-intellisense",
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",
"eamodio.gitlens",
"editorconfig.editorconfig", "editorconfig.editorconfig",
"esbenp.prettier-vscode", "esbenp.prettier-vscode",
"formulahendry.auto-complete-tag", "formulahendry.auto-complete-tag",
@@ -13,13 +9,11 @@
"formulahendry.auto-rename-tag", "formulahendry.auto-rename-tag",
"kisstkondoros.vscode-gutter-preview", "kisstkondoros.vscode-gutter-preview",
"lokalise.i18n-ally", "lokalise.i18n-ally",
"mariusalchimavicius.json-to-ts",
"mhutchie.git-graph", "mhutchie.git-graph",
"mikestead.dotenv", "sdras.vue-vscode-snippets",
"naumovs.color-highlight", "streetsidesoftware.code-spell-checker",
"pkief.material-icon-theme",
"steoates.autoimport",
"vue.volar", "vue.volar",
"whtouche.vscode-js-console-utils", "vue.vscode-typescript-vue-plugin"
"zhuangtongfa.material-theme"
] ]
} }

8
.vscode/launch.json vendored
View File

@@ -7,6 +7,14 @@
"name": "Vue debugger", "name": "Vue debugger",
"url": "http://localhost:3200", "url": "http://localhost:3200",
"webRoot": "${workspaceFolder}" "webRoot": "${workspaceFolder}"
},
{
"type": "node",
"request": "launch",
"name": "TS debugger",
"skipFiles": ["<node_internals>/**"],
"runtimeArgs": ["--loader", "tsx"],
"program": "${relativeFile}"
} }
] ]
} }

136
.vscode/settings.json vendored
View File

@@ -1,90 +1,76 @@
{ {
"cSpell.ignorePaths": [
"package.json",
"package-lock.json",
"yarn.lock",
"pnpm-lock.yaml",
"node_modules",
"vscode-extension",
".git/objects",
".vscode",
".vscode-insiders",
"CHANGELOG.md",
"dist",
"public",
"styles"
],
"cSpell.words": [
"AMAP",
"antdesign",
"antv",
"apacheecharts",
"areaspline",
"bmapgl",
"colord",
"echarts",
"gitee",
"gridicons",
"iconify",
"jsapi",
"naiveui",
"Popconfirm",
"Posva",
"Shenzhen",
"Sider",
"tauri",
"unocss",
"unplugin",
"vditor",
"VERCEL",
"Vite",
"vitejs",
"vuedraggable",
"vueuse",
"wangeditor",
"wechat",
"xgplayer",
"yanbowe",
"ភាសាខ្មែរ"
],
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true "source.fixAll.eslint": true
}, },
"editor.fontLigatures": true, "editor.fontLigatures": true,
"editor.formatOnSave": false, "editor.formatOnSave": false,
"editor.guides.bracketPairs": "active",
"editor.quickSuggestions": { "editor.quickSuggestions": {
"strings": true "strings": true
}, },
"editor.tabSize": 2, "editor.tabSize": 2,
"eslint.alwaysShowStatus": true, "eslint.validate": ["json"],
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"json",
"jsonc",
"json5",
"yaml",
"yml",
"markdown"
],
"files.associations": { "files.associations": {
"*.env.*": "dotenv" "*.env.*": "dotenv",
"*.svg": "html"
}, },
"files.eol": "\n", "files.eol": "\n",
"git.enableSmartCommit": true, "i18n-ally.displayLanguage": "zh-CN",
"gutterpreview.paths": { "i18n-ally.enabledParsers": ["ts"],
"@": "/src", "i18n-ally.enabledFrameworks": ["vue"],
"~@": "/src" "i18n-ally.editor.preferEditor": true,
}, "i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": ["src/locales", "src/locales/lang"], "i18n-ally.localesPaths": ["src/locales/lang"],
"material-icon-theme.activeIconPack": "angular", "material-icon-theme.activeIconPack": "vue",
"material-icon-theme.files.associations": {}, "[html][css][less][scss][sass][markdown][yaml][yml][jsonc]": {
"material-icon-theme.folders.associations": { "editor.defaultFormatter": "esbenp.prettier-vscode",
"src-tauri": "src", "editor.formatOnSave": true
"enum": "typescript",
"enums": "typescript",
"store": "context",
"stores": "context",
"composable": "hook",
"composables": "hook",
"directive": "tools",
"directives": "tools",
"business": "core",
"request": "api",
"adapter": "middleware"
},
"path-intellisense.mappings": {
"@": "${workspaceFolder}/src",
"~@": "${workspaceFolder}/src"
},
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.fontSize": 14,
"terminal.integrated.fontWeight": 500,
"terminal.integrated.tabs.enabled": true,
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "One Dark Pro",
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "Vue.volar"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +1,53 @@
<div align="center"> <div align="center">
<img src="./public/logo.png" style="width: 240px;"/> <img src="./public/favicon.svg" style="width: 160px;"/>
<h1>Soybean Admin</h1> <h1>Soybean Admin</h1>
</div> </div>
[![license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE) [![license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE) ![](https://img.shields.io/github/stars/honghuangdc/soybean-admin) ![](https://img.shields.io/github/forks/honghuangdc/soybean-admin)
## 简介 ## 简介
[Soybean Admin](https://github.com/honghuangdc/soybean-admin) 是一个基于 Vue3、Vite3、TypeScript、NaiveUI、Pinia 和 UnoCSS 的清新优雅的中后台模版,它使用了最新的前端技术栈,内置丰富的主题配置,有着极高的代码规范,基于 mock 实现的动态权限路由,开箱即用的中后台前端解决方案,也可用于学习参考。 [Soybean Admin](https://github.com/honghuangdc/soybean-admin) 是一个基于 Vue3、Vite3、TypeScript、NaiveUI、Pinia 和 UnoCSS 的清新优雅的中后台模版,它使用了最新流行的前端技术栈,内置丰富的主题配置,有着极高的代码规范,基于文件的路由系统以及基于 Mock 的动态权限路由,开箱即用的中后台前端解决方案,也可用于学习参考。
## 特性 ## 特性
- **最新技术栈**:使用 Vue3/vite2 等前端前沿技术开发, 使用高效率的 npm 包管理器 pnpm - **最新流行技术栈**:使用 Vue3/Vite 等前端前沿技术开发, 使用高效率的 npm 包管理器 pnpm
- **TypeScript**: 应用程序级 JavaScript 的语言 - **TypeScript**: 应用程序级 JavaScript 的语言
- **主题**:丰富可配置的主题、暗黑模式,基于原子 css 框架 - UnoCss 的动态主题颜色 - **主题**:丰富可配置的主题、暗黑模式,基于原子 css 框架 - UnoCss 的动态主题颜色
- **代码规范**:丰富的规范插件及极高的代码规范 - **代码规范**:丰富的规范插件及极高的代码规范
- **权限路由**:基于文件的路由系统、基于 mock 的动态路由能快速实现后端动态路由 - **文件路由系统**:基于文件的路由系统,根据页面文件自动生成路由声明、路由导入和路由模块
- **请求函数**:基于 axios 的完善的请求函数封装,提供 Promise 和 hooks 两种请求函数,加入请求结果数据转换的适配器适配器 - **权限路由**:提供前端静态和后端动态两种路由模式,基于 mock 的动态路由能快速实现后端动态路由
- **请求函数**:基于 axios 的完善的请求函数封装,提供 Promise 和 hooks 两种请求函数,加入请求结果数据转换的适配器
## 预览 ## SoybeanJS 工具库
- [soybean-admin](https://soybean.pro/) - [@soybeanjs/cli](https://github.com/soybeanjs/cli): SoybeanJS 命令行工具包含发布、git 和依赖等相关的实用命令
- [@soybeanjs/changelog](https://github.com/soybeanjs/changelog): 根据 git tags 和 commits 生成 changelog [示例](./CHANGELOG.md)
- [eslint-config-soybeanjs](https://github.com/soybeanjs/eslint-config): SoybeanJS 的 eslint 预设配置
- [@soybeanjs/materials](https://github.com/soybeanjs/materials): SoybeanJS 的物料仓库
- [@soybeanjs/vite-plugin-vue-page-route](https://github.com/soybeanjs/vite-plugin-vue-page-route): SoybeanAdmin 的路由插件
## 基于 SoybeanAdmin 二次开发的项目
- [electron-mock-admin](https://github.com/lixin59/electron-mock-api): 一个 Mock Api 管理系统,帮助前端开发伙伴快速实现接口的 mock。
- [T-Shell](https://github.com/TheBlindM/T-Shell): 是一个可配置命令提示的终端模拟器和 SSH 客户端。
## 在线预览
- [Soybean Admin 预览地址](https://admin.soybeanjs.cn/)
## 文档 ## 文档
- [项目文档: docs.soybean.pro](https://docs.soybean.pro) - [项目文档预览地址](https://admin-docs.soybeanjs.cn/)
## 代码仓库 ## 代码仓库
- [github](https://github.com/honghuangdc/soybean-admin) | 仓库 | GitHub 地址 | gitee 镜像 | 预览 |
- [tauri 版](https://github.com/honghuangdc/soybean-admin/tree/tauri) | -------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------- |
- [精简版](https://github.com/honghuangdc/soybean-admin/tree/thin) | soybean-admin | [GitHub](https://github.com/honghuangdc/soybean-admin) | [gitee](https://gitee.com/honghuangdc/soybean-admin) | [预览](https://admin.soybeanjs.cn/) |
- [gitee](https://gitee.com/honghuangdc/soybean-admin) | tauri 版 | [tauri 版](https://github.com/honghuangdc/soybean-admin/tree/tauri) | [tauri 版](https://gitee.com/honghuangdc/soybean-admin/tree/tauri) | |
- [tauri 版](https://gitee.com/honghuangdc/soybean-admin/tree/tauri) | 精简版 | [精简版](https://github.com/honghuangdc/soybean-admin/tree/thin) | [精简版](https://gitee.com/honghuangdc/soybean-admin/tree/thin) | |
- [精简版](https://gitee.com/honghuangdc/soybean-admin/tree/thin) | 集成 fast-crud | [集成 fast-crud](https://github.com/honghuangdc/soybean-admin/tree/fast-crud) | [集成 fast-crud](https://gitee.com/honghuangdc/soybean-admin/tree/fast-crud) | [预览](http://fast-crud.docmirror.cn/soybean/#/crud/demo) |
## 更新日志 ## 更新日志
@@ -42,7 +56,6 @@
## 后端服务 ## 后端服务
- [soybean-admin-java](https://github.com/honghuangdc/soybean-admin-java) - [soybean-admin-java](https://github.com/honghuangdc/soybean-admin-java)
- [soybean-admin-go](https://github.com/honghuangdc/soybean-admin-go)
## 项目示例图 ## 项目示例图
@@ -54,13 +67,15 @@
![](https://s2.loli.net/2022/05/16/rSnNHLdpuvkKxWq.png) ![](https://s2.loli.net/2022/05/16/rSnNHLdpuvkKxWq.png)
![](https://s2.loli.net/2023/06/07/O39EKNa675FZIuS.png)
![](https://s2.loli.net/2022/05/18/Mt6YZqmDxO8v4uR.png) ![](https://s2.loli.net/2022/05/18/Mt6YZqmDxO8v4uR.png)
![](https://s2.loli.net/2022/05/16/ktH5dcG3fuFOoKA.png) ![](https://s2.loli.net/2023/06/07/zhmWnFlPTfDpot8.png)
![](https://s2.loli.net/2022/05/16/VPl6Ru1iCAhLcS4.png) ![](https://s2.loli.net/2022/05/16/VPl6Ru1iCAhLcS4.png)
![](https://s2.loli.net/2022/05/16/bRlAKuHW7ZVh9DT.png) ![](https://s2.loli.net/2023/06/07/n6Dy1HXBvuPc9oT.png)
![](https://s2.loli.net/2022/06/07/rY8TyAftM5dxspv.png) ![](https://s2.loli.net/2022/06/07/rY8TyAftM5dxspv.png)
@@ -68,6 +83,12 @@
![](https://s2.loli.net/2022/06/07/rRSG6mEZpujOACT.png) ![](https://s2.loli.net/2022/06/07/rRSG6mEZpujOACT.png)
<div align="center">
<img style="width:380px;margin-right:18px;border:1px solid #dedede;" src="https://s2.loli.net/2023/06/07/A5Nonc9vI6pB1lr.png" />
&nbsp;
<img style="width:380px;border:1px solid #dedede;" src="https://s2.loli.net/2023/06/07/VwBjqEhTke3OxXF.png" />
</div>
## 安装使用 ## 安装使用
- 环境配置 - 环境配置
@@ -102,7 +123,8 @@ pnpm build
- Docker 部署 Soybean - Docker 部署 Soybean
```bash ```bash
docker run --name soybean -p 80:80 -d soybeanjs/soybean-admin:v0.9.6 docker build -t soybean-admin-image -f docker/Dockerfile .
docker run -d -p 80:80 soybean-admin-image
``` ```
- 访问 SoybeanAdmin - 访问 SoybeanAdmin
@@ -115,9 +137,9 @@ docker run --name soybean -p 80:80 -d soybeanjs/soybean-admin:v0.9.6
## Git 贡献提交规范 ## Git 贡献提交规范
项目已经内置 angular 提交规范,直接执行 commit 命令即可。 项目已经内置 Angular 提交规范,直接执行 commit 命令即可生成符合 Angular 提交规范的 commit
项目已用 simple-git-hooks 代替了 husky, 旧版本用了 husky执行 pnpm soy init-git-hooks 进行初始化配置 项目已用 simple-git-hooks 代替了 husky, 旧版本用了 husky执行 pnpm soy init-simple-git-hooks 进行初始化配置
## 浏览器支持 ## 浏览器支持
@@ -137,15 +159,15 @@ docker run --name soybean -p 80:80 -d soybeanjs/soybean-admin:v0.9.6
`Soybean Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供微信和 QQ 交流群,使用问题欢迎在群内提问。 `Soybean Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供微信和 QQ 交流群,使用问题欢迎在群内提问。
- 微信交流群(添加本人微信拉进群),欢迎来技术交流,业务咨询。 <div style="display:flex;">
<div style="text-align:left"> <div style="padding-right:24px;">
<img src="https://s2.loli.net/2022/05/16/3YGBgXnVPJdslk8.jpg" style="width:200px" /> <p>QQ交流群</p>
</div> <img src="https://i.loli.net/2021/11/24/1J6REWXiHomU2kM.jpg" style="width:200px" />
</div>
- QQ 交流群 `711301266` <div>
<p>添加本人微信,欢迎来技术交流,业务咨询</p>
<div style="text-align:left"> <img src="https://s2.loli.net/2023/06/07/sVyCUFBvzQ9f5b7.jpg" style="width:200px" />
<img src="https://i.loli.net/2021/11/24/1J6REWXiHomU2kM.jpg" style="width:200px" /> </div>
</div> </div>
## 捐赠 ## 捐赠
@@ -156,4 +178,4 @@ docker run --name soybean -p 80:80 -d soybeanjs/soybean-admin:v0.9.6
## License ## License
[MIT © Soybean-2021](./LICENSE) 本项目基于[MIT © Soybean-2021](./LICENSE) 协议,仅供参考学习,商用时请保留作者的版权信息,作者不对软件做担保和负责。

View File

@@ -5,19 +5,14 @@ import type { ProxyOptions } from 'vite';
* @param isOpenProxy - 是否开启代理 * @param isOpenProxy - 是否开启代理
* @param envConfig - env环境配置 * @param envConfig - env环境配置
*/ */
export function createViteProxy(isOpenProxy: boolean, envConfig: ServiceEnvConfig) { export function createViteProxy(isOpenProxy: boolean, envConfig: ServiceEnvConfigWithProxyPattern) {
if (!isOpenProxy) return undefined; if (!isOpenProxy) return undefined;
const proxy: Record<string, string | ProxyOptions> = { const proxy: Record<string, string | ProxyOptions> = {
[envConfig.urlPattern]: { [envConfig.proxyPattern]: {
target: envConfig.url, target: envConfig.url,
changeOrigin: true, changeOrigin: true,
rewrite: path => path.replace(new RegExp(`^${envConfig.urlPattern}`), '') rewrite: path => path.replace(new RegExp(`^${envConfig.proxyPattern}`), '')
},
[envConfig.secondUrlPattern]: {
target: envConfig.secondUrl,
changeOrigin: true,
rewrite: path => path.replace(new RegExp(`^${envConfig.secondUrlPattern}`), '')
} }
}; };

View File

@@ -1,14 +0,0 @@
import type { PluginOption } from 'vite';
import { createHtmlPlugin } from 'vite-plugin-html';
export default (viteEnv: ImportMetaEnv): PluginOption[] => {
return createHtmlPlugin({
minify: true,
inject: {
data: {
appName: viteEnv.VITE_APP_NAME,
appTitle: viteEnv.VITE_APP_TITLE
}
}
});
};

View File

@@ -3,8 +3,9 @@ import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx'; import vueJsx from '@vitejs/plugin-vue-jsx';
import unocss from '@unocss/vite'; import unocss from '@unocss/vite';
import progress from 'vite-plugin-progress'; import progress from 'vite-plugin-progress';
import VueDevtools from 'vite-plugin-vue-devtools';
import pageRoute from '@soybeanjs/vite-plugin-vue-page-route'; import pageRoute from '@soybeanjs/vite-plugin-vue-page-route';
import html from './html'; import { webUpdateNotice } from '@plugin-web-update-notification/vite';
import unplugin from './unplugin'; import unplugin from './unplugin';
import mock from './mock'; import mock from './mock';
import visualizer from './visualizer'; import visualizer from './visualizer';
@@ -16,7 +17,27 @@ import pwa from './pwa';
* @param viteEnv - 环境变量配置 * @param viteEnv - 环境变量配置
*/ */
export function setupVitePlugins(viteEnv: ImportMetaEnv): (PluginOption | PluginOption[])[] { export function setupVitePlugins(viteEnv: ImportMetaEnv): (PluginOption | PluginOption[])[] {
const plugins = [vue(), vueJsx(), html(viteEnv), ...unplugin(viteEnv), unocss(), mock, progress(), pageRoute()]; const plugins = [
vue({
script: {
defineModel: true
}
}),
vueJsx(),
VueDevtools(),
...unplugin(viteEnv),
unocss(),
mock(viteEnv),
progress(),
webUpdateNotice({
notificationProps: {
title: '👋 有新版本了',
description: '点击刷新页面获取最新版本',
buttonText: '刷新',
dismissButtonText: '忽略'
}
})
];
if (viteEnv.VITE_VISUALIZER === 'Y') { if (viteEnv.VITE_VISUALIZER === 'Y') {
plugins.push(visualizer as PluginOption); plugins.push(visualizer as PluginOption);
@@ -27,6 +48,9 @@ export function setupVitePlugins(viteEnv: ImportMetaEnv): (PluginOption | Plugin
if (viteEnv.VITE_PWA === 'Y' || viteEnv.VITE_VERCEL === 'Y') { if (viteEnv.VITE_PWA === 'Y' || viteEnv.VITE_VERCEL === 'Y') {
plugins.push(pwa()); plugins.push(pwa());
} }
if (viteEnv.VITE_SOYBEAN_ROUTE_PLUGIN === 'Y') {
plugins.push(pageRoute());
}
return plugins; return plugins;
} }

View File

@@ -1,9 +1,14 @@
import { viteMockServe } from 'vite-plugin-mock'; import { viteMockServe } from 'vite-plugin-mock';
export default viteMockServe({ export default (viteEnv: ImportMetaEnv) => {
mockPath: 'mock', const prodMock = viteEnv.VITE_PROD_MOCK === 'Y';
injectCode: `
import { setupMockServer } from '../mock'; return viteMockServe({
setupMockServer(); mockPath: 'mock',
` prodEnabled: prodMock,
}); injectCode: `
import { setupMockServer } from '../mock';
setupMockServer();
`
});
};

View File

@@ -1,4 +1,3 @@
import VueMacros from 'unplugin-vue-macros/vite';
import Icons from 'unplugin-icons/vite'; import Icons from 'unplugin-icons/vite';
import IconsResolver from 'unplugin-icons/resolver'; import IconsResolver from 'unplugin-icons/resolver';
import Components from 'unplugin-vue-components/vite'; import Components from 'unplugin-vue-components/vite';
@@ -8,20 +7,21 @@ import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
import { getSrcPath } from '../utils'; import { getSrcPath } from '../utils';
export default function unplugin(viteEnv: ImportMetaEnv) { export default function unplugin(viteEnv: ImportMetaEnv) {
const { VITE_ICON_PREFFIX, VITE_ICON_LOCAL_PREFFIX } = viteEnv; const { VITE_ICON_PREFIX, VITE_ICON_LOCAL_PREFIX } = viteEnv;
const srcPath = getSrcPath(); const srcPath = getSrcPath();
const localIconPath = `${srcPath}/assets/svg-icon`; const localIconPath = `${srcPath}/assets/svg-icon`;
/** 本地svg图标集合名称 */ /** 本地svg图标集合名称 */
const collectionName = VITE_ICON_LOCAL_PREFFIX.replace(`${VITE_ICON_PREFFIX}-`, ''); const collectionName = VITE_ICON_LOCAL_PREFIX.replace(`${VITE_ICON_PREFIX}-`, '');
return [ return [
VueMacros({}),
Icons({ Icons({
compiler: 'vue3', compiler: 'vue3',
customCollections: { customCollections: {
[collectionName]: FileSystemIconLoader(localIconPath) [collectionName]: FileSystemIconLoader(localIconPath, svg =>
svg.replace(/^<svg\s/, '<svg width="1em" height="1em" ')
)
}, },
scale: 1, scale: 1,
defaultClass: 'inline-block' defaultClass: 'inline-block'
@@ -31,12 +31,12 @@ export default function unplugin(viteEnv: ImportMetaEnv) {
types: [{ from: 'vue-router', names: ['RouterLink', 'RouterView'] }], types: [{ from: 'vue-router', names: ['RouterLink', 'RouterView'] }],
resolvers: [ resolvers: [
NaiveUiResolver(), NaiveUiResolver(),
IconsResolver({ customCollections: [collectionName], componentPrefix: VITE_ICON_PREFFIX }) IconsResolver({ customCollections: [collectionName], componentPrefix: VITE_ICON_PREFIX })
] ]
}), }),
createSvgIconsPlugin({ createSvgIconsPlugin({
iconDirs: [localIconPath], iconDirs: [localIconPath],
symbolId: `${VITE_ICON_LOCAL_PREFFIX}-[dir]-[name]`, symbolId: `${VITE_ICON_LOCAL_PREFIX}-[dir]-[name]`,
inject: 'body-last', inject: 'body-last',
customDomId: '__SVG_ICON_LOCAL__' customDomId: '__SVG_ICON_LOCAL__'
}) })

View File

@@ -1,15 +1,20 @@
<!-- prettier-ignore -->
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-cmn-Hans"> <html lang="zh-cmn-Hans">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" href="/logo.png" /> <meta http-equiv="Expires" content="0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Pragma" content="no-cache" />
<title><%= appName %></title> <meta http-equiv="Cache-control" content="no-cache" />
</head> <meta http-equiv="Cache" content="no-cache" />
<body> <link rel="icon" href="/favicon.svg" />
<div id="app"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<div id="appLoading"></div> <title>%VITE_APP_NAME%</title>
</div> </head>
<script type="module" src="/src/main.ts"></script> <body>
</body> <div id="app">
<div id="appLoading"></div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html> </html>

View File

@@ -12,7 +12,8 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
meta: { meta: {
title: '分析页', title: '分析页',
requiresAuth: true, requiresAuth: true,
icon: 'icon-park-outline:analysis' icon: 'icon-park-outline:analysis',
i18nTitle: 'routes.dashboard.analysis'
} }
}, },
{ {
@@ -22,14 +23,16 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
meta: { meta: {
title: '工作台', title: '工作台',
requiresAuth: true, requiresAuth: true,
icon: 'icon-park-outline:workbench' icon: 'icon-park-outline:workbench',
i18nTitle: 'routes.dashboard.workbench'
} }
} }
], ],
meta: { meta: {
title: '仪表盘', title: '仪表盘',
icon: 'mdi:monitor-dashboard', icon: 'mdi:monitor-dashboard',
order: 1 order: 1,
i18nTitle: 'routes.dashboard._value'
} }
}, },
{ {
@@ -43,6 +46,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'vue文档', title: 'vue文档',
i18nTitle: 'routes.document.vue',
requiresAuth: true, requiresAuth: true,
icon: 'logos:vue' icon: 'logos:vue'
} }
@@ -53,6 +57,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'vite文档', title: 'vite文档',
i18nTitle: 'routes.document.vite',
requiresAuth: true, requiresAuth: true,
icon: 'logos:vitejs' icon: 'logos:vitejs'
} }
@@ -63,6 +68,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'naive文档', title: 'naive文档',
i18nTitle: 'routes.document.naive',
requiresAuth: true, requiresAuth: true,
icon: 'logos:naiveui' icon: 'logos:naiveui'
} }
@@ -73,6 +79,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '项目文档', title: '项目文档',
i18nTitle: 'routes.document.project',
requiresAuth: true, requiresAuth: true,
localIcon: 'logo' localIcon: 'logo'
} }
@@ -82,14 +89,16 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
path: '/document/project-link', path: '/document/project-link',
meta: { meta: {
title: '项目文档(外链)', title: '项目文档(外链)',
i18nTitle: 'routes.document.project-link',
requiresAuth: true, requiresAuth: true,
localIcon: 'logo', localIcon: 'logo',
href: 'https://docs.soybean.pro/' href: 'https://admin-docs.soybeanjs.cn/'
} }
} }
], ],
meta: { meta: {
title: '文档', title: '文档',
i18nTitle: 'routes.document._value',
icon: 'mdi:file-document-multiple-outline', icon: 'mdi:file-document-multiple-outline',
order: 2 order: 2
} }
@@ -105,6 +114,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '按钮', title: '按钮',
i18nTitle: 'routes.component.button',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:button-cursor' icon: 'mdi:button-cursor'
} }
@@ -115,6 +125,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '卡片', title: '卡片',
i18nTitle: 'routes.component.card',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:card-outline' icon: 'mdi:card-outline'
} }
@@ -125,6 +136,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '表格', title: '表格',
i18nTitle: 'routes.component.table',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:table-large' icon: 'mdi:table-large'
} }
@@ -132,6 +144,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '组件示例', title: '组件示例',
i18nTitle: 'routes.component._value',
icon: 'cib:app-store', icon: 'cib:app-store',
order: 3 order: 3
} }
@@ -152,6 +165,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'ECharts', title: 'ECharts',
i18nTitle: 'routes.plugin.charts.echarts',
requiresAuth: true, requiresAuth: true,
icon: 'simple-icons:apacheecharts' icon: 'simple-icons:apacheecharts'
} }
@@ -162,6 +176,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'AntV', title: 'AntV',
i18nTitle: 'routes.plugin.charts.antv',
requiresAuth: true, requiresAuth: true,
icon: 'simple-icons:antdesign' icon: 'simple-icons:antdesign'
} }
@@ -169,6 +184,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '图表', title: '图表',
i18nTitle: 'routes.plugin.charts._value',
icon: 'mdi:chart-areaspline' icon: 'mdi:chart-areaspline'
} }
}, },
@@ -178,6 +194,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '地图', title: '地图',
i18nTitle: 'routes.plugin.map',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:map' icon: 'mdi:map'
} }
@@ -188,6 +205,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '视频', title: '视频',
i18nTitle: 'routes.plugin.video',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:video' icon: 'mdi:video'
} }
@@ -203,6 +221,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '富文本编辑器', title: '富文本编辑器',
i18nTitle: 'routes.plugin.editor.quill',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:file-document-edit-outline' icon: 'mdi:file-document-edit-outline'
} }
@@ -213,6 +232,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'markdown编辑器', title: 'markdown编辑器',
i18nTitle: 'routes.plugin.editor.markdown',
requiresAuth: true, requiresAuth: true,
icon: 'ri:markdown-line' icon: 'ri:markdown-line'
} }
@@ -220,6 +240,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '编辑器', title: '编辑器',
i18nTitle: 'routes.plugin.editor._value',
icon: 'icon-park-outline:editor' icon: 'icon-park-outline:editor'
} }
}, },
@@ -229,6 +250,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'Swiper插件', title: 'Swiper插件',
i18nTitle: 'routes.plugin.swiper',
requiresAuth: true, requiresAuth: true,
icon: 'simple-icons:swiper' icon: 'simple-icons:swiper'
} }
@@ -239,6 +261,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '剪贴板', title: '剪贴板',
i18nTitle: 'routes.plugin.copy',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:clipboard-outline' icon: 'mdi:clipboard-outline'
} }
@@ -249,6 +272,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '图标', title: '图标',
i18nTitle: 'routes.plugin.icon',
requiresAuth: true, requiresAuth: true,
localIcon: 'custom-icon' localIcon: 'custom-icon'
} }
@@ -259,6 +283,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '打印', title: '打印',
i18nTitle: 'routes.plugin.print',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:printer' icon: 'mdi:printer'
} }
@@ -266,6 +291,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '插件示例', title: '插件示例',
i18nTitle: 'routes.plugin._value',
icon: 'clarity:plugin-line', icon: 'clarity:plugin-line',
order: 4 order: 4
} }
@@ -281,6 +307,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '权限切换', title: '权限切换',
i18nTitle: 'routes.auth-demo.permission',
requiresAuth: true, requiresAuth: true,
icon: 'ic:round-construction' icon: 'ic:round-construction'
} }
@@ -291,6 +318,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '超级管理员可见', title: '超级管理员可见',
i18nTitle: 'routes.auth-demo.super',
requiresAuth: true, requiresAuth: true,
icon: 'ic:round-supervisor-account' icon: 'ic:round-supervisor-account'
} }
@@ -298,6 +326,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '权限示例', title: '权限示例',
i18nTitle: 'routes.auth-demo._value',
icon: 'ic:baseline-security', icon: 'ic:baseline-security',
order: 5 order: 5
} }
@@ -313,6 +342,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'Tab', title: 'Tab',
i18nTitle: 'routes.function.tab',
requiresAuth: true, requiresAuth: true,
icon: 'ic:round-tab' icon: 'ic:round-tab'
} }
@@ -345,6 +375,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '功能', title: '功能',
i18nTitle: 'routes.function._value',
icon: 'icon-park-outline:all-application', icon: 'icon-park-outline:all-application',
order: 6 order: 6
} }
@@ -360,6 +391,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '异常页403', title: '异常页403',
i18nTitle: 'routes.exception.403',
requiresAuth: true, requiresAuth: true,
icon: 'ic:baseline-block' icon: 'ic:baseline-block'
} }
@@ -370,6 +402,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '异常页404', title: '异常页404',
i18nTitle: 'routes.exception.404',
requiresAuth: true, requiresAuth: true,
icon: 'ic:baseline-web-asset-off' icon: 'ic:baseline-web-asset-off'
} }
@@ -380,12 +413,14 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '异常页500', title: '异常页500',
i18nTitle: 'routes.exception.500',
requiresAuth: true, requiresAuth: true,
icon: 'ic:baseline-wifi-off' icon: 'ic:baseline-wifi-off'
} }
} }
], ],
meta: { meta: {
i18nTitle: 'routes.exception._value',
title: '异常页', title: '异常页',
icon: 'ant-design:exception-outlined', icon: 'ant-design:exception-outlined',
order: 7 order: 7
@@ -407,6 +442,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '二级菜单', title: '二级菜单',
i18nTitle: 'routes.multi-menu.first.second',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:menu' icon: 'mdi:menu'
} }
@@ -422,6 +458,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '三级菜单', title: '三级菜单',
i18nTitle: 'routes.multi-menu.first.second-new.third',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:menu' icon: 'mdi:menu'
} }
@@ -429,18 +466,21 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '二级菜单(有子菜单)', title: '二级菜单(有子菜单)',
i18nTitle: 'routes.multi-menu.first.second-new._value',
icon: 'mdi:menu' icon: 'mdi:menu'
} }
} }
], ],
meta: { meta: {
title: '一级菜单', title: '一级菜单',
i18nTitle: 'routes.multi-menu.first._value',
icon: 'mdi:menu' icon: 'mdi:menu'
} }
} }
], ],
meta: { meta: {
title: '多级菜单', title: '多级菜单',
i18nTitle: 'routes.multi-menu._value',
icon: 'carbon:menu', icon: 'carbon:menu',
order: 8 order: 8
} }
@@ -456,6 +496,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '权限管理', title: '权限管理',
i18nTitle: 'routes.management.auth',
requiresAuth: true, requiresAuth: true,
icon: 'ic:baseline-security' icon: 'ic:baseline-security'
} }
@@ -466,6 +507,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '角色管理', title: '角色管理',
i18nTitle: 'routes.management.role',
requiresAuth: true, requiresAuth: true,
icon: 'carbon:user-role' icon: 'carbon:user-role'
} }
@@ -476,6 +518,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '用户管理', title: '用户管理',
i18nTitle: 'routes.management.user',
requiresAuth: true, requiresAuth: true,
icon: 'ic:round-manage-accounts' icon: 'ic:round-manage-accounts'
} }
@@ -486,6 +529,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '路由管理', title: '路由管理',
i18nTitle: 'routes.management.route',
requiresAuth: true, requiresAuth: true,
icon: 'material-symbols:route' icon: 'material-symbols:route'
} }
@@ -493,6 +537,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '系统管理', title: '系统管理',
i18nTitle: 'routes.management._value',
icon: 'carbon:cloud-service-management', icon: 'carbon:cloud-service-management',
order: 9 order: 9
} }
@@ -503,7 +548,9 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '关于', title: '关于',
i18nTitle: 'routes.about',
requiresAuth: true, requiresAuth: true,
keepAlive: true,
singleLayout: 'basic', singleLayout: 'basic',
icon: 'fluent:book-information-24-regular', icon: 'fluent:book-information-24-regular',
order: 10 order: 10
@@ -523,7 +570,8 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
meta: { meta: {
title: '分析页', title: '分析页',
requiresAuth: true, requiresAuth: true,
icon: 'icon-park-outline:analysis' icon: 'icon-park-outline:analysis',
i18nTitle: 'routes.dashboard.analysis'
} }
}, },
{ {
@@ -533,14 +581,16 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
meta: { meta: {
title: '工作台', title: '工作台',
requiresAuth: true, requiresAuth: true,
icon: 'icon-park-outline:workbench' icon: 'icon-park-outline:workbench',
i18nTitle: 'routes.dashboard.workbench'
} }
} }
], ],
meta: { meta: {
title: '仪表盘', title: '仪表盘',
icon: 'mdi:monitor-dashboard', icon: 'mdi:monitor-dashboard',
order: 1 order: 1,
i18nTitle: 'routes.dashboard._value'
} }
}, },
{ {
@@ -554,6 +604,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'vue文档', title: 'vue文档',
i18nTitle: 'routes.document.vue',
requiresAuth: true, requiresAuth: true,
icon: 'logos:vue' icon: 'logos:vue'
} }
@@ -564,6 +615,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'vite文档', title: 'vite文档',
i18nTitle: 'routes.document.vite',
requiresAuth: true, requiresAuth: true,
icon: 'logos:vitejs' icon: 'logos:vitejs'
} }
@@ -574,6 +626,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'naive文档', title: 'naive文档',
i18nTitle: 'routes.document.naive',
requiresAuth: true, requiresAuth: true,
icon: 'logos:naiveui' icon: 'logos:naiveui'
} }
@@ -584,6 +637,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '项目文档', title: '项目文档',
i18nTitle: 'routes.document.project',
requiresAuth: true, requiresAuth: true,
localIcon: 'logo' localIcon: 'logo'
} }
@@ -593,14 +647,16 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
path: '/document/project-link', path: '/document/project-link',
meta: { meta: {
title: '项目文档(外链)', title: '项目文档(外链)',
i18nTitle: 'routes.document.project-link',
requiresAuth: true, requiresAuth: true,
localIcon: 'logo', localIcon: 'logo',
href: 'https://docs.soybean.pro/' href: 'https://admin-docs.soybeanjs.cn/'
} }
} }
], ],
meta: { meta: {
title: '文档', title: '文档',
i18nTitle: 'routes.document._value',
icon: 'mdi:file-document-multiple-outline', icon: 'mdi:file-document-multiple-outline',
order: 2 order: 2
} }
@@ -616,6 +672,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '按钮', title: '按钮',
i18nTitle: 'routes.component.button',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:button-cursor' icon: 'mdi:button-cursor'
} }
@@ -626,6 +683,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '卡片', title: '卡片',
i18nTitle: 'routes.component.card',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:card-outline' icon: 'mdi:card-outline'
} }
@@ -636,6 +694,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '表格', title: '表格',
i18nTitle: 'routes.component.table',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:table-large' icon: 'mdi:table-large'
} }
@@ -643,6 +702,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '组件示例', title: '组件示例',
i18nTitle: 'routes.component._value',
icon: 'cib:app-store', icon: 'cib:app-store',
order: 3 order: 3
} }
@@ -663,6 +723,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'ECharts', title: 'ECharts',
i18nTitle: 'routes.plugin.charts.echarts',
requiresAuth: true, requiresAuth: true,
icon: 'simple-icons:apacheecharts' icon: 'simple-icons:apacheecharts'
} }
@@ -673,6 +734,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'AntV', title: 'AntV',
i18nTitle: 'routes.plugin.charts.antv',
requiresAuth: true, requiresAuth: true,
icon: 'simple-icons:antdesign' icon: 'simple-icons:antdesign'
} }
@@ -680,6 +742,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '图表', title: '图表',
i18nTitle: 'routes.plugin.charts._value',
icon: 'mdi:chart-areaspline' icon: 'mdi:chart-areaspline'
} }
}, },
@@ -689,6 +752,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '地图', title: '地图',
i18nTitle: 'routes.plugin.map',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:map' icon: 'mdi:map'
} }
@@ -699,6 +763,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '视频', title: '视频',
i18nTitle: 'routes.plugin.video',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:video' icon: 'mdi:video'
} }
@@ -714,6 +779,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '富文本编辑器', title: '富文本编辑器',
i18nTitle: 'routes.plugin.editor.quill',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:file-document-edit-outline' icon: 'mdi:file-document-edit-outline'
} }
@@ -724,6 +790,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'markdown编辑器', title: 'markdown编辑器',
i18nTitle: 'routes.plugin.editor.markdown',
requiresAuth: true, requiresAuth: true,
icon: 'ri:markdown-line' icon: 'ri:markdown-line'
} }
@@ -731,6 +798,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '编辑器', title: '编辑器',
i18nTitle: 'routes.plugin.editor._value',
icon: 'icon-park-outline:editor' icon: 'icon-park-outline:editor'
} }
}, },
@@ -740,6 +808,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'Swiper插件', title: 'Swiper插件',
i18nTitle: 'routes.plugin.swiper',
requiresAuth: true, requiresAuth: true,
icon: 'simple-icons:swiper' icon: 'simple-icons:swiper'
} }
@@ -750,6 +819,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '剪贴板', title: '剪贴板',
i18nTitle: 'routes.plugin.copy',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:clipboard-outline' icon: 'mdi:clipboard-outline'
} }
@@ -760,6 +830,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '图标', title: '图标',
i18nTitle: 'routes.plugin.icon',
requiresAuth: true, requiresAuth: true,
localIcon: 'custom-icon' localIcon: 'custom-icon'
} }
@@ -770,6 +841,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '打印', title: '打印',
i18nTitle: 'routes.plugin.print',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:printer' icon: 'mdi:printer'
} }
@@ -777,6 +849,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '插件示例', title: '插件示例',
i18nTitle: 'routes.plugin._value',
icon: 'clarity:plugin-line', icon: 'clarity:plugin-line',
order: 4 order: 4
} }
@@ -792,13 +865,26 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '权限切换', title: '权限切换',
i18nTitle: 'routes.auth-demo.permission',
requiresAuth: true, requiresAuth: true,
icon: 'ic:round-construction' icon: 'ic:round-construction'
} }
},
{
name: 'auth-demo_super',
path: '/auth-demo/super',
component: 'self',
meta: {
title: '超级管理员可见',
i18nTitle: 'routes.auth-demo.super',
requiresAuth: true,
icon: 'ic:round-supervisor-account'
}
} }
], ],
meta: { meta: {
title: '权限示例', title: '权限示例',
i18nTitle: 'routes.auth-demo._value',
icon: 'ic:baseline-security', icon: 'ic:baseline-security',
order: 5 order: 5
} }
@@ -814,6 +900,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: 'Tab', title: 'Tab',
i18nTitle: 'routes.function.tab',
requiresAuth: true, requiresAuth: true,
icon: 'ic:round-tab' icon: 'ic:round-tab'
} }
@@ -846,6 +933,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '功能', title: '功能',
i18nTitle: 'routes.function._value',
icon: 'icon-park-outline:all-application', icon: 'icon-park-outline:all-application',
order: 6 order: 6
} }
@@ -861,6 +949,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '异常页403', title: '异常页403',
i18nTitle: 'routes.exception.403',
requiresAuth: true, requiresAuth: true,
icon: 'ic:baseline-block' icon: 'ic:baseline-block'
} }
@@ -871,6 +960,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '异常页404', title: '异常页404',
i18nTitle: 'routes.exception.404',
requiresAuth: true, requiresAuth: true,
icon: 'ic:baseline-web-asset-off' icon: 'ic:baseline-web-asset-off'
} }
@@ -881,12 +971,14 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '异常页500', title: '异常页500',
i18nTitle: 'routes.exception.500',
requiresAuth: true, requiresAuth: true,
icon: 'ic:baseline-wifi-off' icon: 'ic:baseline-wifi-off'
} }
} }
], ],
meta: { meta: {
i18nTitle: 'routes.exception._value',
title: '异常页', title: '异常页',
icon: 'ant-design:exception-outlined', icon: 'ant-design:exception-outlined',
order: 7 order: 7
@@ -908,6 +1000,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '二级菜单', title: '二级菜单',
i18nTitle: 'routes.multi-menu.first.second',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:menu' icon: 'mdi:menu'
} }
@@ -923,6 +1016,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '三级菜单', title: '三级菜单',
i18nTitle: 'routes.multi-menu.first.second-new.third',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:menu' icon: 'mdi:menu'
} }
@@ -930,18 +1024,21 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '二级菜单(有子菜单)', title: '二级菜单(有子菜单)',
i18nTitle: 'routes.multi-menu.first.second-new._value',
icon: 'mdi:menu' icon: 'mdi:menu'
} }
} }
], ],
meta: { meta: {
title: '一级菜单', title: '一级菜单',
i18nTitle: 'routes.multi-menu.first._value',
icon: 'mdi:menu' icon: 'mdi:menu'
} }
} }
], ],
meta: { meta: {
title: '多级菜单', title: '多级菜单',
i18nTitle: 'routes.multi-menu._value',
icon: 'carbon:menu', icon: 'carbon:menu',
order: 8 order: 8
} }
@@ -957,6 +1054,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '权限管理', title: '权限管理',
i18nTitle: 'routes.management.auth',
requiresAuth: true, requiresAuth: true,
icon: 'ic:baseline-security' icon: 'ic:baseline-security'
} }
@@ -967,6 +1065,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '角色管理', title: '角色管理',
i18nTitle: 'routes.management.role',
requiresAuth: true, requiresAuth: true,
icon: 'carbon:user-role' icon: 'carbon:user-role'
} }
@@ -977,6 +1076,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '用户管理', title: '用户管理',
i18nTitle: 'routes.management.user',
requiresAuth: true, requiresAuth: true,
icon: 'ic:round-manage-accounts' icon: 'ic:round-manage-accounts'
} }
@@ -987,6 +1087,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '路由管理', title: '路由管理',
i18nTitle: 'routes.management.route',
requiresAuth: true, requiresAuth: true,
icon: 'material-symbols:route' icon: 'material-symbols:route'
} }
@@ -994,6 +1095,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '系统管理', title: '系统管理',
i18nTitle: 'routes.management._value',
icon: 'carbon:cloud-service-management', icon: 'carbon:cloud-service-management',
order: 9 order: 9
} }
@@ -1004,7 +1106,9 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '关于', title: '关于',
i18nTitle: 'routes.about',
requiresAuth: true, requiresAuth: true,
keepAlive: true,
singleLayout: 'basic', singleLayout: 'basic',
icon: 'fluent:book-information-24-regular', icon: 'fluent:book-information-24-regular',
order: 10 order: 10
@@ -1024,14 +1128,27 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
meta: { meta: {
title: '分析页', title: '分析页',
requiresAuth: true, requiresAuth: true,
icon: 'icon-park-outline:analysis' icon: 'icon-park-outline:analysis',
i18nTitle: 'routes.dashboard.analysis'
}
},
{
name: 'dashboard_workbench',
path: '/dashboard/workbench',
component: 'self',
meta: {
title: '工作台',
requiresAuth: true,
icon: 'icon-park-outline:workbench',
i18nTitle: 'routes.dashboard.workbench'
} }
} }
], ],
meta: { meta: {
title: '仪表盘', title: '仪表盘',
icon: 'mdi:monitor-dashboard', icon: 'mdi:monitor-dashboard',
order: 1 order: 1,
i18nTitle: 'routes.dashboard._value'
} }
}, },
{ {
@@ -1045,13 +1162,26 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '权限切换', title: '权限切换',
i18nTitle: 'routes.auth-demo.permission',
requiresAuth: true, requiresAuth: true,
icon: 'ic:round-construction' icon: 'ic:round-construction'
} }
},
{
name: 'auth-demo_super',
path: '/auth-demo/super',
component: 'self',
meta: {
title: '超级管理员可见',
i18nTitle: 'routes.auth-demo.super',
requiresAuth: true,
icon: 'ic:round-supervisor-account'
}
} }
], ],
meta: { meta: {
title: '权限示例', title: '权限示例',
i18nTitle: 'routes.auth-demo._value',
icon: 'ic:baseline-security', icon: 'ic:baseline-security',
order: 5 order: 5
} }
@@ -1072,6 +1202,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '二级菜单', title: '二级菜单',
i18nTitle: 'routes.multi-menu.first.second',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:menu' icon: 'mdi:menu'
} }
@@ -1087,6 +1218,7 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '三级菜单', title: '三级菜单',
i18nTitle: 'routes.multi-menu.first.second-new.third',
requiresAuth: true, requiresAuth: true,
icon: 'mdi:menu' icon: 'mdi:menu'
} }
@@ -1094,20 +1226,23 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
], ],
meta: { meta: {
title: '二级菜单(有子菜单)', title: '二级菜单(有子菜单)',
i18nTitle: 'routes.multi-menu.first.second-new._value',
icon: 'mdi:menu' icon: 'mdi:menu'
} }
} }
], ],
meta: { meta: {
title: '一级菜单', title: '一级菜单',
i18nTitle: 'routes.multi-menu.first._value',
icon: 'mdi:menu' icon: 'mdi:menu'
} }
} }
], ],
meta: { meta: {
title: '多级菜单', title: '多级菜单',
i18nTitle: 'routes.multi-menu._value',
icon: 'carbon:menu', icon: 'carbon:menu',
order: 7 order: 8
} }
}, },
{ {
@@ -1116,10 +1251,12 @@ export const routeModel: Record<Auth.RoleType, AuthRoute.Route[]> = {
component: 'self', component: 'self',
meta: { meta: {
title: '关于', title: '关于',
i18nTitle: 'routes.about',
requiresAuth: true, requiresAuth: true,
keepAlive: true,
singleLayout: 'basic', singleLayout: 'basic',
icon: 'fluent:book-information-24-regular', icon: 'fluent:book-information-24-regular',
order: 8 order: 10
} }
} }
] ]

View File

@@ -1,11 +1,11 @@
{ {
"name": "soybean-admin", "name": "soybean-admin",
"version": "0.9.8", "version": "0.10.4",
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。", "description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
"author": { "author": {
"name": "Soybean", "name": "Soybean",
"email": "honghuangdc@gmail.com", "email": "soybeanjs@outlook.com",
"url": "https://github.com/honghuangdc" "url": "https://github.com/soybeanjs"
}, },
"license": "MIT", "license": "MIT",
"homepage": "https://github.com/honghuangdc/soybean-admin", "homepage": "https://github.com/honghuangdc/soybean-admin",
@@ -45,84 +45,80 @@
"preview": "vite preview", "preview": "vite preview",
"typecheck": "vue-tsc --noEmit --skipLibCheck", "typecheck": "vue-tsc --noEmit --skipLibCheck",
"lint": "eslint . --fix", "lint": "eslint . --fix",
"format": "soy prettier-write",
"commit": "soy git-commit", "commit": "soy git-commit",
"cleanup": "soy cleanup", "cleanup": "soy cleanup",
"update-pkg": "soy update-pkg", "update-pkg": "soy ncu",
"release": "soy release",
"tsx": "tsx", "tsx": "tsx",
"logo": "tsx ./scripts/logo.ts", "logo": "tsx ./scripts/logo.ts",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "prepare": "soy init-simple-git-hooks"
"release": "standard-version",
"prepare": "simple-git-hooks"
}, },
"dependencies": { "dependencies": {
"@antv/data-set": "^0.11.8", "@antv/data-set": "0.11.8",
"@antv/g2": "^4.2.8", "@antv/g2": "4.2.10",
"@better-scroll/core": "^2.5.0", "@better-scroll/core": "2.5.1",
"@soybeanjs/vue-admin-layout": "^1.1.1", "@soybeanjs/vue-materials": "0.2.0",
"@soybeanjs/vue-admin-tab": "^1.0.5", "@vueuse/core": "10.4.1",
"@vueuse/core": "^9.10.0", "axios": "1.5.0",
"axios": "0.27.2", "clipboard": "2.0.11",
"clipboard": "^2.0.11", "colord": "2.9.3",
"colord": "^2.9.3", "crypto-js": "4.1.1",
"crypto-js": "^4.1.1", "dayjs": "1.11.10",
"dayjs": "^1.11.7", "echarts": "5.4.3",
"echarts": "^5.4.1", "form-data": "4.0.0",
"form-data": "^4.0.0", "lodash-es": "4.17.21",
"lodash-es": "^4.17.21", "naive-ui": "2.34.4",
"naive-ui": "2.34.3", "pinia": "2.1.6",
"pinia": "^2.0.28", "print-js": "1.6.0",
"print-js": "^1.6.0", "qs": "6.11.2",
"qs": "^6.11.0", "socket.io-client": "4.7.2",
"swiper": "^8.4.5", "swiper": "10.2.0",
"ua-parser-js": "^1.0.32", "ua-parser-js": "1.0.36",
"vditor": "^3.9.0", "vditor": "3.9.5",
"vue": "3.2.45", "vue": "3.3.4",
"vue-i18n": "^9.2.2", "vue-i18n": "9.4.1",
"vue-router": "^4.1.6", "vue-router": "4.2.4",
"vuedraggable": "^4.1.0", "vuedraggable": "4.1.0",
"wangeditor": "^4.7.15", "wangeditor": "4.7.15",
"xgplayer": "^2.32.2" "xgplayer": "3.0.9"
}, },
"devDependencies": { "devDependencies": {
"@amap/amap-jsapi-types": "^0.0.10", "@amap/amap-jsapi-types": "0.0.13",
"@iconify/json": "^2.2.7", "@iconify/json": "2.2.118",
"@iconify/vue": "^4.0.2", "@iconify/vue": "4.1.1",
"@soybeanjs/cli": "^0.1.6", "@plugin-web-update-notification/vite": "^1.6.5",
"@soybeanjs/vite-plugin-vue-page-route": "^0.0.5", "@soybeanjs/cli": "0.7.1",
"@types/bmapgl": "^0.0.5", "@soybeanjs/vite-plugin-vue-page-route": "0.0.10",
"@types/crypto-js": "^4.1.1", "@types/bmapgl": "0.0.7",
"@types/node": "18.11.18", "@types/crypto-js": "4.1.2",
"@types/qs": "^6.9.7", "@types/node": "20.6.3",
"@types/ua-parser-js": "^0.7.36", "@types/qs": "6.9.8",
"@unocss/preset-uno": "^0.48.4", "@types/ua-parser-js": "0.7.37",
"@unocss/vite": "^0.48.4", "@unocss/preset-uno": "0.56.0",
"@vitejs/plugin-vue": "^4.0.0", "@unocss/transformer-directives": "0.56.0",
"@vitejs/plugin-vue-jsx": "^3.0.0", "@unocss/vite": "0.56.0",
"conventional-changelog": "^3.1.25", "@vitejs/plugin-vue": "4.3.4",
"cross-env": "^7.0.3", "@vitejs/plugin-vue-jsx": "3.0.2",
"eslint": "^8.32.0", "cross-env": "7.0.3",
"eslint-config-soybeanjs-vue": "^0.2.2", "eslint": "8.49.0",
"lint-staged": "12.5.0", "eslint-config-soybeanjs": "0.5.6",
"mockjs": "^1.1.0", "mockjs": "1.1.0",
"node-html-to-image": "^3.2.4", "rollup-plugin-visualizer": "5.9.2",
"rollup-plugin-visualizer": "^5.9.0", "sass": "1.67.0",
"sass": "^1.57.1", "simple-git-hooks": "2.9.0",
"simple-git-hooks": "^2.8.1", "tsx": "3.12.10",
"standard-version": "^9.5.0", "typescript": "5.2.2",
"tsx": "^3.12.2", "unplugin-icons": "0.17.0",
"typescript": "4.9.4", "unplugin-vue-components": "0.25.2",
"unplugin-icons": "^0.15.1", "vite": "4.4.9",
"unplugin-vue-components": "0.22.12", "vite-plugin-compression": "0.5.1",
"unplugin-vue-macros": "^1.3.3", "vite-plugin-mock": "2.9.8",
"utility-types": "^3.10.0", "vite-plugin-progress": "0.0.7",
"vite": "^4.0.4", "vite-plugin-pwa": "0.16.5",
"vite-plugin-compression": "^0.5.1", "vite-plugin-svg-icons": "2.0.1",
"vite-plugin-html": "^3.2.0", "vite-plugin-vue-devtools": "1.0.0-rc.4",
"vite-plugin-mock": "^2.9.6", "vue-tsc": "1.8.13"
"vite-plugin-progress": "^0.0.6",
"vite-plugin-pwa": "^0.14.1",
"vite-plugin-svg-icons": "^2.0.1",
"vue-tsc": "^1.0.24"
}, },
"pnpm": { "pnpm": {
"patchedDependencies": { "patchedDependencies": {
@@ -131,9 +127,9 @@
}, },
"simple-git-hooks": { "simple-git-hooks": {
"commit-msg": "pnpm soy git-commit-verify", "commit-msg": "pnpm soy git-commit-verify",
"pre-commit": "pnpm typecheck && pnpm lint-staged" "pre-commit": "pnpm typecheck && pnpm soy lint-staged"
}, },
"lint-staged": { "soybean": {
"*": "eslint . --fix" "useSoybeanToken": true
} }
} }

View File

@@ -5,56 +5,56 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
@@ -126,17 +126,17 @@ return /******/ (function(modules) { // webpackBootstrap @@ -126,17 +126,17 @@ return /******/ (function(modules) { // webpackBootstrap
/* 1 */ /* 1 */
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
- /* - /*
+ /* + /*
## Handler ## Handler
处理数据模板。 处理数据模板。
- -
+ +
* Handler.gen( template, name?, context? ) * Handler.gen( template, name?, context? )
入口方法。 入口方法。
* Data Template Definition, DTD * Data Template Definition, DTD
- -
+ +
处理数据模板定义。 处理数据模板定义。
* Handler.array( options ) * Handler.array( options )
@@ -146,7 +146,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -146,7 +146,7 @@ return /******/ (function(modules) { // webpackBootstrap
* Handler.string( options ) * Handler.string( options )
* Handler.function( options ) * Handler.function( options )
* Handler.regexp( options ) * Handler.regexp( options )
- -
+ +
处理路径(相对和绝对)。 处理路径(相对和绝对)。
* Handler.getValueByKeyPath( key, options ) * Handler.getValueByKeyPath( key, options )
@@ -177,7 +177,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -177,7 +177,7 @@ return /******/ (function(modules) { // webpackBootstrap
Handle.gen(template, name, options) Handle.gen(template, name, options)
context context
- currentContext, templateCurrentContext, - currentContext, templateCurrentContext,
+ currentContext, templateCurrentContext, + currentContext, templateCurrentContext,
path, templatePath path, templatePath
root, templateRoot root, templateRoot
*/ */
@@ -456,7 +456,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -456,7 +456,7 @@ return /******/ (function(modules) { // webpackBootstrap
phed = Handler.placeholder(ph, options.context.currentContext, options.context.templateCurrentContext, options) phed = Handler.placeholder(ph, options.context.currentContext, options.context.templateCurrentContext, options)
// 只有一个占位符,并且没有其他字符 // 只有一个占位符,并且没有其他字符
- if (placeholders.length === 1 && ph === result && typeof phed !== typeof result) { // - if (placeholders.length === 1 && ph === result && typeof phed !== typeof result) { //
+ if (placeholders.length === 1 && ph === result && typeof phed !== typeof result) { // + if (placeholders.length === 1 && ph === result && typeof phed !== typeof result) { //
result = phed result = phed
break break
@@ -627,7 +627,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -627,7 +627,7 @@ return /******/ (function(modules) { // webpackBootstrap
} }
// 引用的值已经计算好 // 引用的值已经计算好
if (currentContext && (key in currentContext)) return currentContext[key] if (currentContext && (key in currentContext)) return currentContext[key]
- -
+ +
// 尚未计算,递归引用数据模板中的属性 // 尚未计算,递归引用数据模板中的属性
if (templateCurrentContext && if (templateCurrentContext &&
@@ -63,41 +63,41 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
var tpl = Mock.heredoc(function() { var tpl = Mock.heredoc(function() {
/*! /*!
{{email}}{{age}} {{email}}{{age}}
- <!-- Mock { - <!-- Mock {
+ <!-- Mock { + <!-- Mock {
email: '@EMAIL', email: '@EMAIL',
age: '@INT(1,100)' age: '@INT(1,100)'
} --> } -->
*\/ *\/
}) })
- -
+ +
**相关阅读** **相关阅读**
* [Creating multiline strings in JavaScript](http://stackoverflow.com/questions/805107/creating-multiline-strings-in-javascript)、 * [Creating multiline strings in JavaScript](http://stackoverflow.com/questions/805107/creating-multiline-strings-in-javascript)、
*/ */
@@ -850,7 +850,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -850,7 +850,7 @@ return /******/ (function(modules) { // webpackBootstrap
解析数据模板(属性名部分)。 解析数据模板(属性名部分)。
* Parser.parse( name ) * Parser.parse( name )
- -
+ +
```json ```json
{ {
parameters: [ name, inc, range, decimal ], parameters: [ name, inc, range, decimal ],
@@ -922,7 +922,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -922,7 +922,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* /*
## Mock.Random ## Mock.Random
- -
+ +
工具类,用于生成各种随机数据。 工具类,用于生成各种随机数据。
*/ */
@@ -1251,7 +1251,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -1251,7 +1251,7 @@ return /******/ (function(modules) { // webpackBootstrap
替代图片源 替代图片源
http://fpoimg.com/ http://fpoimg.com/
- 参考自 - 参考自
+ 参考自 + 参考自
http://rensanning.iteye.com/blog/1933310 http://rensanning.iteye.com/blog/1933310
http://code.tutsplus.com/articles/the-top-8-placeholders-for-web-designers--net-19485 http://code.tutsplus.com/articles/the-top-8-placeholders-for-web-designers--net-19485
@@ -106,16 +106,16 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
var bg_colour = Math.floor(Math.random() * 16777215).toString(16); var bg_colour = Math.floor(Math.random() * 16777215).toString(16);
bg_colour = "#" + ("000000" + bg_colour).slice(-6); bg_colour = "#" + ("000000" + bg_colour).slice(-6);
document.bgColor = bg_colour; document.bgColor = bg_colour;
- -
+ +
http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/ http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/
Creating random colors is actually more difficult than it seems. The randomness itself is easy, but aesthetically pleasing randomness is more difficult. Creating random colors is actually more difficult than it seems. The randomness itself is easy, but aesthetically pleasing randomness is more difficult.
https://github.com/devongovett/color-generator https://github.com/devongovett/color-generator
@@ -1561,7 +1561,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -1561,7 +1561,7 @@ return /******/ (function(modules) { // webpackBootstrap
http://tool.c7sky.com/webcolor http://tool.c7sky.com/webcolor
网页设计常用色彩搭配表 网页设计常用色彩搭配表
- -
+ +
https://github.com/One-com/one-color https://github.com/One-com/one-color
An OO-based JavaScript color parser/computation toolkit with support for RGB, HSV, HSL, CMYK, and alpha channels. An OO-based JavaScript color parser/computation toolkit with support for RGB, HSV, HSL, CMYK, and alpha channels.
@@ -124,7 +124,7 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
color += letters[Math.floor(Math.random() * 16)] color += letters[Math.floor(Math.random() * 16)]
} }
return color return color
- -
+ +
// 随机生成一个无脑的颜色,格式为 '#RRGGBB'。 // 随机生成一个无脑的颜色,格式为 '#RRGGBB'。
// _brainlessColor() // _brainlessColor()
@@ -133,24 +133,24 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
return result.join(' ') return result.join(' ')
}, },
- // - //
+ // + //
cparagraph: function(min, max) { cparagraph: function(min, max) {
var len = range(3, 7, min, max) var len = range(3, 7, min, max)
var result = [] var result = []
@@ -2282,17 +2282,17 @@ return /******/ (function(modules) { // webpackBootstrap @@ -2282,17 +2282,17 @@ return /******/ (function(modules) { // webpackBootstrap
随机生成一个 URL。 随机生成一个 URL。
[URL 规范](http://www.w3.org/Addressing/URL/url-spec.txt) [URL 规范](http://www.w3.org/Addressing/URL/url-spec.txt)
- http Hypertext Transfer Protocol - http Hypertext Transfer Protocol
- ftp File Transfer protocol - ftp File Transfer protocol
- gopher The Gopher protocol - gopher The Gopher protocol
- mailto Electronic mail address - mailto Electronic mail address
- mid Message identifiers for electronic mail - mid Message identifiers for electronic mail
- cid Content identifiers for MIME body part - cid Content identifiers for MIME body part
- news Usenet news - news Usenet news
- nntp Usenet news for local NNTP access only - nntp Usenet news for local NNTP access only
- prospero Access using the prospero protocols - prospero Access using the prospero protocols
+ http Hypertext Transfer Protocol + http Hypertext Transfer Protocol
+ ftp File Transfer protocol + ftp File Transfer protocol
+ gopher The Gopher protocol + gopher The Gopher protocol
@@ -161,7 +161,7 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
+ nntp Usenet news for local NNTP access only + nntp Usenet news for local NNTP access only
+ prospero Access using the prospero protocols + prospero Access using the prospero protocols
telnet rlogin tn3270 Reference to interactive sessions telnet rlogin tn3270 Reference to interactive sessions
- wais Wide Area Information Servers - wais Wide Area Information Servers
+ wais Wide Area Information Servers + wais Wide Area Information Servers
*/ */
url: function(protocol, host) { url: function(protocol, host) {
@@ -170,10 +170,10 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
西南 重庆市 四川省 贵州省 云南省 西藏自治区 西南 重庆市 四川省 贵州省 云南省 西藏自治区
西北 陕西省 甘肃省 青海省 宁夏回族自治区 新疆维吾尔自治区 西北 陕西省 甘肃省 青海省 宁夏回族自治区 新疆维吾尔自治区
港澳台 香港特别行政区 澳门特别行政区 台湾省 港澳台 香港特别行政区 澳门特别行政区 台湾省
- -
+ +
**排序** **排序**
- -
+ +
```js ```js
var map = {} var map = {}
@@ -182,25 +182,25 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
"0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" /
"a" / "b" / "c" / "d" / "e" / "f" / "a" / "b" / "c" / "d" / "e" / "f" /
"A" / "B" / "C" / "D" / "E" / "F" "A" / "B" / "C" / "D" / "E" / "F"
- -
+ +
https://github.com/victorquinn/chancejs/blob/develop/chance.js#L1349 https://github.com/victorquinn/chancejs/blob/develop/chance.js#L1349
*/ */
guid: function() { guid: function() {
@@ -6629,7 +6629,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -6629,7 +6629,7 @@ return /******/ (function(modules) { // webpackBootstrap
} }
function CaptureGroup(n) { function CaptureGroup(n) {
- Group.call(this, "capture-group"), this.index = cgs[this.offset] || (cgs[this.offset] = index++), - Group.call(this, "capture-group"), this.index = cgs[this.offset] || (cgs[this.offset] = index++),
+ Group.call(this, "capture-group"), this.index = cgs[this.offset] || (cgs[this.offset] = index++), + Group.call(this, "capture-group"), this.index = cgs[this.offset] || (cgs[this.offset] = index++),
this.body = n; this.body = n;
} }
@@ -6711,7 +6711,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -6711,7 +6711,7 @@ return /******/ (function(modules) { // webpackBootstrap
} }
return r = l ? '"' + u(l) + '"' : "end of input", "Expected " + t + " but " + r + " found."; return r = l ? '"' + u(l) + '"' : "end of input", "Expected " + t + " but " + r + " found.";
} }
- this.expected = n, this.found = l, this.offset = u, this.line = t, this.column = r, - this.expected = n, this.found = l, this.offset = u, this.line = t, this.column = r,
+ this.expected = n, this.found = l, this.offset = u, this.line = t, this.column = r, + this.expected = n, this.found = l, this.offset = u, this.line = t, this.column = r,
this.name = "SyntaxError", this.message = e(n, l); this.name = "SyntaxError", this.message = e(n, l);
} }
@@ -209,8 +209,8 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
function r(l) { function r(l) {
function u(l, u, t) { function u(l, u, t) {
var r, e; var r, e;
- for (r = u; t > r; r++) e = n.charAt(r), "\n" === e ? (l.seenCR || l.line++, l.column = 1, - for (r = u; t > r; r++) e = n.charAt(r), "\n" === e ? (l.seenCR || l.line++, l.column = 1,
- l.seenCR = !1) : "\r" === e || "\u2028" === e || "\u2029" === e ? (l.line++, l.column = 1, - l.seenCR = !1) : "\r" === e || "\u2028" === e || "\u2029" === e ? (l.line++, l.column = 1,
+ for (r = u; t > r; r++) e = n.charAt(r), "\n" === e ? (l.seenCR || l.line++, l.column = 1, + for (r = u; t > r; r++) e = n.charAt(r), "\n" === e ? (l.seenCR || l.line++, l.column = 1,
+ l.seenCR = !1) : "\r" === e || "\u2028" === e || "\u2029" === e ? (l.line++, l.column = 1, + l.seenCR = !1) : "\r" === e || "\u2028" === e || "\u2029" === e ? (l.line++, l.column = 1,
l.seenCR = !0) : (l.column++, l.seenCR = !1); l.seenCR = !0) : (l.column++, l.seenCR = !1);
@@ -220,10 +220,10 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function c() { function c() {
var l, u, t, r, o; var l, u, t, r, o;
- return l = qt, u = i(), null !== u ? (t = qt, 124 === n.charCodeAt(qt) ? (r = fl, - return l = qt, u = i(), null !== u ? (t = qt, 124 === n.charCodeAt(qt) ? (r = fl,
- qt++) : (r = null, 0 === Wt && e(sl)), null !== r ? (o = c(), null !== o ? (r = [ r, o ], - qt++) : (r = null, 0 === Wt && e(sl)), null !== r ? (o = c(), null !== o ? (r = [ r, o ],
- t = r) : (qt = t, t = il)) : (qt = t, t = il), null === t && (t = al), null !== t ? (Lt = l, - t = r) : (qt = t, t = il)) : (qt = t, t = il), null === t && (t = al), null !== t ? (Lt = l,
- u = hl(u, t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, - u = hl(u, t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l,
+ return l = qt, u = i(), null !== u ? (t = qt, 124 === n.charCodeAt(qt) ? (r = fl, + return l = qt, u = i(), null !== u ? (t = qt, 124 === n.charCodeAt(qt) ? (r = fl,
+ qt++) : (r = null, 0 === Wt && e(sl)), null !== r ? (o = c(), null !== o ? (r = [ r, o ], + qt++) : (r = null, 0 === Wt && e(sl)), null !== r ? (o = c(), null !== o ? (r = [ r, o ],
+ t = r) : (qt = t, t = il)) : (qt = t, t = il), null === t && (t = al), null !== t ? (Lt = l, + t = r) : (qt = t, t = il)) : (qt = t, t = il), null === t && (t = al), null !== t ? (Lt = l,
@@ -232,13 +232,13 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function i() { function i() {
var n, l, u, t, r; var n, l, u, t, r;
- if (n = qt, l = f(), null === l && (l = al), null !== l) if (u = qt, Wt++, t = d(), - if (n = qt, l = f(), null === l && (l = al), null !== l) if (u = qt, Wt++, t = d(),
+ if (n = qt, l = f(), null === l && (l = al), null !== l) if (u = qt, Wt++, t = d(), + if (n = qt, l = f(), null === l && (l = al), null !== l) if (u = qt, Wt++, t = d(),
Wt--, null === t ? u = al : (qt = u, u = il), null !== u) { Wt--, null === t ? u = al : (qt = u, u = il), null !== u) {
- for (t = [], r = h(), null === r && (r = a()); null !== r; ) t.push(r), r = h(), - for (t = [], r = h(), null === r && (r = a()); null !== r; ) t.push(r), r = h(),
+ for (t = [], r = h(), null === r && (r = a()); null !== r; ) t.push(r), r = h(), + for (t = [], r = h(), null === r && (r = a()); null !== r; ) t.push(r), r = h(),
null === r && (r = a()); null === r && (r = a());
- null !== t ? (r = s(), null === r && (r = al), null !== r ? (Lt = n, l = dl(l, t, r), - null !== t ? (r = s(), null === r && (r = al), null !== r ? (Lt = n, l = dl(l, t, r),
+ null !== t ? (r = s(), null === r && (r = al), null !== r ? (Lt = n, l = dl(l, t, r), + null !== t ? (r = s(), null === r && (r = al), null !== r ? (Lt = n, l = dl(l, t, r),
null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il); null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il);
} else qt = n, n = il; else qt = n, n = il; } else qt = n, n = il; else qt = n, n = il;
@@ -247,43 +247,43 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function f() { function f() {
var l, u; var l, u;
- return l = qt, 94 === n.charCodeAt(qt) ? (u = pl, qt++) : (u = null, 0 === Wt && e(vl)), - return l = qt, 94 === n.charCodeAt(qt) ? (u = pl, qt++) : (u = null, 0 === Wt && e(vl)),
+ return l = qt, 94 === n.charCodeAt(qt) ? (u = pl, qt++) : (u = null, 0 === Wt && e(vl)), + return l = qt, 94 === n.charCodeAt(qt) ? (u = pl, qt++) : (u = null, 0 === Wt && e(vl)),
null !== u && (Lt = l, u = wl()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = wl()), null === u ? (qt = l, l = u) : l = u, l;
} }
function s() { function s() {
var l, u; var l, u;
- return l = qt, 36 === n.charCodeAt(qt) ? (u = Al, qt++) : (u = null, 0 === Wt && e(Cl)), - return l = qt, 36 === n.charCodeAt(qt) ? (u = Al, qt++) : (u = null, 0 === Wt && e(Cl)),
+ return l = qt, 36 === n.charCodeAt(qt) ? (u = Al, qt++) : (u = null, 0 === Wt && e(Cl)), + return l = qt, 36 === n.charCodeAt(qt) ? (u = Al, qt++) : (u = null, 0 === Wt && e(Cl)),
null !== u && (Lt = l, u = gl()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = gl()), null === u ? (qt = l, l = u) : l = u, l;
} }
function h() { function h() {
var n, l, u; var n, l, u;
- return n = qt, l = a(), null !== l ? (u = d(), null !== u ? (Lt = n, l = bl(l, u), - return n = qt, l = a(), null !== l ? (u = d(), null !== u ? (Lt = n, l = bl(l, u),
+ return n = qt, l = a(), null !== l ? (u = d(), null !== u ? (Lt = n, l = bl(l, u), + return n = qt, l = a(), null !== l ? (u = d(), null !== u ? (Lt = n, l = bl(l, u),
null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il), n; null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il), n;
} }
function d() { function d() {
var n, l, u; var n, l, u;
- return Wt++, n = qt, l = p(), null !== l ? (u = k(), null === u && (u = al), null !== u ? (Lt = n, - return Wt++, n = qt, l = p(), null !== l ? (u = k(), null === u && (u = al), null !== u ? (Lt = n,
- l = Tl(l, u), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, - l = Tl(l, u), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n,
+ return Wt++, n = qt, l = p(), null !== l ? (u = k(), null === u && (u = al), null !== u ? (Lt = n, + return Wt++, n = qt, l = p(), null !== l ? (u = k(), null === u && (u = al), null !== u ? (Lt = n,
+ l = Tl(l, u), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, + l = Tl(l, u), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n,
n = il), Wt--, null === n && (l = null, 0 === Wt && e(kl)), n; n = il), Wt--, null === n && (l = null, 0 === Wt && e(kl)), n;
} }
function p() { function p() {
var n; var n;
- return n = v(), null === n && (n = w(), null === n && (n = A(), null === n && (n = C(), - return n = v(), null === n && (n = w(), null === n && (n = A(), null === n && (n = C(),
+ return n = v(), null === n && (n = w(), null === n && (n = A(), null === n && (n = C(), + return n = v(), null === n && (n = w(), null === n && (n = A(), null === n && (n = C(),
null === n && (n = g(), null === n && (n = b()))))), n; null === n && (n = g(), null === n && (n = b()))))), n;
} }
function v() { function v() {
var l, u, t, r, o, c; var l, u, t, r, o, c;
- return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), - return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)),
- null !== u ? (t = T(), null !== t ? (44 === n.charCodeAt(qt) ? (r = ml, qt++) : (r = null, - null !== u ? (t = T(), null !== t ? (44 === n.charCodeAt(qt) ? (r = ml, qt++) : (r = null,
- 0 === Wt && e(Rl)), null !== r ? (o = T(), null !== o ? (125 === n.charCodeAt(qt) ? (c = Fl, - 0 === Wt && e(Rl)), null !== r ? (o = T(), null !== o ? (125 === n.charCodeAt(qt) ? (c = Fl,
- qt++) : (c = null, 0 === Wt && e(Ql)), null !== c ? (Lt = l, u = Sl(t, o), null === u ? (qt = l, - qt++) : (c = null, 0 === Wt && e(Ql)), null !== c ? (Lt = l, u = Sl(t, o), null === u ? (qt = l,
- l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, - l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l,
+ return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), + return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)),
+ null !== u ? (t = T(), null !== t ? (44 === n.charCodeAt(qt) ? (r = ml, qt++) : (r = null, + null !== u ? (t = T(), null !== t ? (44 === n.charCodeAt(qt) ? (r = ml, qt++) : (r = null,
+ 0 === Wt && e(Rl)), null !== r ? (o = T(), null !== o ? (125 === n.charCodeAt(qt) ? (c = Fl, + 0 === Wt && e(Rl)), null !== r ? (o = T(), null !== o ? (125 === n.charCodeAt(qt) ? (c = Fl,
@@ -293,9 +293,9 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function w() { function w() {
var l, u, t, r; var l, u, t, r;
- return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), - return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)),
- null !== u ? (t = T(), null !== t ? (n.substr(qt, 2) === Ul ? (r = Ul, qt += 2) : (r = null, - null !== u ? (t = T(), null !== t ? (n.substr(qt, 2) === Ul ? (r = Ul, qt += 2) : (r = null,
- 0 === Wt && e(El)), null !== r ? (Lt = l, u = Gl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - 0 === Wt && e(El)), null !== r ? (Lt = l, u = Gl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), + return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)),
+ null !== u ? (t = T(), null !== t ? (n.substr(qt, 2) === Ul ? (r = Ul, qt += 2) : (r = null, + null !== u ? (t = T(), null !== t ? (n.substr(qt, 2) === Ul ? (r = Ul, qt += 2) : (r = null,
+ 0 === Wt && e(El)), null !== r ? (Lt = l, u = Gl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + 0 === Wt && e(El)), null !== r ? (Lt = l, u = Gl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
@@ -303,9 +303,9 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function A() { function A() {
var l, u, t, r; var l, u, t, r;
- return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), - return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)),
- null !== u ? (t = T(), null !== t ? (125 === n.charCodeAt(qt) ? (r = Fl, qt++) : (r = null, - null !== u ? (t = T(), null !== t ? (125 === n.charCodeAt(qt) ? (r = Fl, qt++) : (r = null,
- 0 === Wt && e(Ql)), null !== r ? (Lt = l, u = Bl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - 0 === Wt && e(Ql)), null !== r ? (Lt = l, u = Bl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), + return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)),
+ null !== u ? (t = T(), null !== t ? (125 === n.charCodeAt(qt) ? (r = Fl, qt++) : (r = null, + null !== u ? (t = T(), null !== t ? (125 === n.charCodeAt(qt) ? (r = Fl, qt++) : (r = null,
+ 0 === Wt && e(Ql)), null !== r ? (Lt = l, u = Bl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + 0 === Wt && e(Ql)), null !== r ? (Lt = l, u = Bl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
@@ -313,45 +313,45 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function C() { function C() {
var l, u; var l, u;
- return l = qt, 43 === n.charCodeAt(qt) ? (u = jl, qt++) : (u = null, 0 === Wt && e($l)), - return l = qt, 43 === n.charCodeAt(qt) ? (u = jl, qt++) : (u = null, 0 === Wt && e($l)),
+ return l = qt, 43 === n.charCodeAt(qt) ? (u = jl, qt++) : (u = null, 0 === Wt && e($l)), + return l = qt, 43 === n.charCodeAt(qt) ? (u = jl, qt++) : (u = null, 0 === Wt && e($l)),
null !== u && (Lt = l, u = ql()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = ql()), null === u ? (qt = l, l = u) : l = u, l;
} }
function g() { function g() {
var l, u; var l, u;
- return l = qt, 42 === n.charCodeAt(qt) ? (u = Ll, qt++) : (u = null, 0 === Wt && e(Ml)), - return l = qt, 42 === n.charCodeAt(qt) ? (u = Ll, qt++) : (u = null, 0 === Wt && e(Ml)),
+ return l = qt, 42 === n.charCodeAt(qt) ? (u = Ll, qt++) : (u = null, 0 === Wt && e(Ml)), + return l = qt, 42 === n.charCodeAt(qt) ? (u = Ll, qt++) : (u = null, 0 === Wt && e(Ml)),
null !== u && (Lt = l, u = Dl()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Dl()), null === u ? (qt = l, l = u) : l = u, l;
} }
function b() { function b() {
var l, u; var l, u;
- return l = qt, 63 === n.charCodeAt(qt) ? (u = Hl, qt++) : (u = null, 0 === Wt && e(Ol)), - return l = qt, 63 === n.charCodeAt(qt) ? (u = Hl, qt++) : (u = null, 0 === Wt && e(Ol)),
+ return l = qt, 63 === n.charCodeAt(qt) ? (u = Hl, qt++) : (u = null, 0 === Wt && e(Ol)), + return l = qt, 63 === n.charCodeAt(qt) ? (u = Hl, qt++) : (u = null, 0 === Wt && e(Ol)),
null !== u && (Lt = l, u = Wl()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Wl()), null === u ? (qt = l, l = u) : l = u, l;
} }
function k() { function k() {
var l; var l;
- return 63 === n.charCodeAt(qt) ? (l = Hl, qt++) : (l = null, 0 === Wt && e(Ol)), - return 63 === n.charCodeAt(qt) ? (l = Hl, qt++) : (l = null, 0 === Wt && e(Ol)),
+ return 63 === n.charCodeAt(qt) ? (l = Hl, qt++) : (l = null, 0 === Wt && e(Ol)), + return 63 === n.charCodeAt(qt) ? (l = Hl, qt++) : (l = null, 0 === Wt && e(Ol)),
l; l;
} }
function T() { function T() {
var l, u, t; var l, u, t;
- if (l = qt, u = [], zl.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, - if (l = qt, u = [], zl.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null,
- 0 === Wt && e(Il)), null !== t) for (;null !== t; ) u.push(t), zl.test(n.charAt(qt)) ? (t = n.charAt(qt), - 0 === Wt && e(Il)), null !== t) for (;null !== t; ) u.push(t), zl.test(n.charAt(qt)) ? (t = n.charAt(qt),
+ if (l = qt, u = [], zl.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, + if (l = qt, u = [], zl.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null,
+ 0 === Wt && e(Il)), null !== t) for (;null !== t; ) u.push(t), zl.test(n.charAt(qt)) ? (t = n.charAt(qt), + 0 === Wt && e(Il)), null !== t) for (;null !== t; ) u.push(t), zl.test(n.charAt(qt)) ? (t = n.charAt(qt),
qt++) : (t = null, 0 === Wt && e(Il)); else u = il; qt++) : (t = null, 0 === Wt && e(Il)); else u = il;
- return null !== u && (Lt = l, u = Jl(u)), null === u ? (qt = l, l = u) : l = u, - return null !== u && (Lt = l, u = Jl(u)), null === u ? (qt = l, l = u) : l = u,
+ return null !== u && (Lt = l, u = Jl(u)), null === u ? (qt = l, l = u) : l = u, + return null !== u && (Lt = l, u = Jl(u)), null === u ? (qt = l, l = u) : l = u,
l; l;
} }
function x() { function x() {
var l, u, t, r; var l, u, t, r;
- return l = qt, 40 === n.charCodeAt(qt) ? (u = Kl, qt++) : (u = null, 0 === Wt && e(Nl)), - return l = qt, 40 === n.charCodeAt(qt) ? (u = Kl, qt++) : (u = null, 0 === Wt && e(Nl)),
- null !== u ? (t = R(), null === t && (t = F(), null === t && (t = m(), null === t && (t = y()))), - null !== u ? (t = R(), null === t && (t = F(), null === t && (t = m(), null === t && (t = y()))),
- null !== t ? (41 === n.charCodeAt(qt) ? (r = Pl, qt++) : (r = null, 0 === Wt && e(Vl)), - null !== t ? (41 === n.charCodeAt(qt) ? (r = Pl, qt++) : (r = null, 0 === Wt && e(Vl)),
- null !== r ? (Lt = l, u = Xl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== r ? (Lt = l, u = Xl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ return l = qt, 40 === n.charCodeAt(qt) ? (u = Kl, qt++) : (u = null, 0 === Wt && e(Nl)), + return l = qt, 40 === n.charCodeAt(qt) ? (u = Kl, qt++) : (u = null, 0 === Wt && e(Nl)),
+ null !== u ? (t = R(), null === t && (t = F(), null === t && (t = m(), null === t && (t = y()))), + null !== u ? (t = R(), null === t && (t = F(), null === t && (t = m(), null === t && (t = y()))),
+ null !== t ? (41 === n.charCodeAt(qt) ? (r = Pl, qt++) : (r = null, 0 === Wt && e(Vl)), + null !== t ? (41 === n.charCodeAt(qt) ? (r = Pl, qt++) : (r = null, 0 === Wt && e(Vl)),
@@ -360,46 +360,46 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function y() { function y() {
var n, l; var n, l;
- return n = qt, l = c(), null !== l && (Lt = n, l = Yl(l)), null === l ? (qt = n, - return n = qt, l = c(), null !== l && (Lt = n, l = Yl(l)), null === l ? (qt = n,
+ return n = qt, l = c(), null !== l && (Lt = n, l = Yl(l)), null === l ? (qt = n, + return n = qt, l = c(), null !== l && (Lt = n, l = Yl(l)), null === l ? (qt = n,
n = l) : n = l, n; n = l) : n = l, n;
} }
function m() { function m() {
var l, u, t; var l, u, t;
- return l = qt, n.substr(qt, 2) === Zl ? (u = Zl, qt += 2) : (u = null, 0 === Wt && e(_l)), - return l = qt, n.substr(qt, 2) === Zl ? (u = Zl, qt += 2) : (u = null, 0 === Wt && e(_l)),
- null !== u ? (t = c(), null !== t ? (Lt = l, u = nu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== u ? (t = c(), null !== t ? (Lt = l, u = nu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ return l = qt, n.substr(qt, 2) === Zl ? (u = Zl, qt += 2) : (u = null, 0 === Wt && e(_l)), + return l = qt, n.substr(qt, 2) === Zl ? (u = Zl, qt += 2) : (u = null, 0 === Wt && e(_l)),
+ null !== u ? (t = c(), null !== t ? (Lt = l, u = nu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== u ? (t = c(), null !== t ? (Lt = l, u = nu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
l = il)) : (qt = l, l = il), l; l = il)) : (qt = l, l = il), l;
} }
function R() { function R() {
var l, u, t; var l, u, t;
- return l = qt, n.substr(qt, 2) === lu ? (u = lu, qt += 2) : (u = null, 0 === Wt && e(uu)), - return l = qt, n.substr(qt, 2) === lu ? (u = lu, qt += 2) : (u = null, 0 === Wt && e(uu)),
- null !== u ? (t = c(), null !== t ? (Lt = l, u = tu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== u ? (t = c(), null !== t ? (Lt = l, u = tu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ return l = qt, n.substr(qt, 2) === lu ? (u = lu, qt += 2) : (u = null, 0 === Wt && e(uu)), + return l = qt, n.substr(qt, 2) === lu ? (u = lu, qt += 2) : (u = null, 0 === Wt && e(uu)),
+ null !== u ? (t = c(), null !== t ? (Lt = l, u = tu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== u ? (t = c(), null !== t ? (Lt = l, u = tu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
l = il)) : (qt = l, l = il), l; l = il)) : (qt = l, l = il), l;
} }
function F() { function F() {
var l, u, t; var l, u, t;
- return l = qt, n.substr(qt, 2) === ru ? (u = ru, qt += 2) : (u = null, 0 === Wt && e(eu)), - return l = qt, n.substr(qt, 2) === ru ? (u = ru, qt += 2) : (u = null, 0 === Wt && e(eu)),
- null !== u ? (t = c(), null !== t ? (Lt = l, u = ou(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== u ? (t = c(), null !== t ? (Lt = l, u = ou(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ return l = qt, n.substr(qt, 2) === ru ? (u = ru, qt += 2) : (u = null, 0 === Wt && e(eu)), + return l = qt, n.substr(qt, 2) === ru ? (u = ru, qt += 2) : (u = null, 0 === Wt && e(eu)),
+ null !== u ? (t = c(), null !== t ? (Lt = l, u = ou(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== u ? (t = c(), null !== t ? (Lt = l, u = ou(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
l = il)) : (qt = l, l = il), l; l = il)) : (qt = l, l = il), l;
} }
function Q() { function Q() {
var l, u, t, r, o; var l, u, t, r, o;
- if (Wt++, l = qt, 91 === n.charCodeAt(qt) ? (u = iu, qt++) : (u = null, 0 === Wt && e(au)), - if (Wt++, l = qt, 91 === n.charCodeAt(qt) ? (u = iu, qt++) : (u = null, 0 === Wt && e(au)),
- null !== u) if (94 === n.charCodeAt(qt) ? (t = pl, qt++) : (t = null, 0 === Wt && e(vl)), - null !== u) if (94 === n.charCodeAt(qt) ? (t = pl, qt++) : (t = null, 0 === Wt && e(vl)),
+ if (Wt++, l = qt, 91 === n.charCodeAt(qt) ? (u = iu, qt++) : (u = null, 0 === Wt && e(au)), + if (Wt++, l = qt, 91 === n.charCodeAt(qt) ? (u = iu, qt++) : (u = null, 0 === Wt && e(au)),
+ null !== u) if (94 === n.charCodeAt(qt) ? (t = pl, qt++) : (t = null, 0 === Wt && e(vl)), + null !== u) if (94 === n.charCodeAt(qt) ? (t = pl, qt++) : (t = null, 0 === Wt && e(vl)),
null === t && (t = al), null !== t) { null === t && (t = al), null !== t) {
- for (r = [], o = S(), null === o && (o = U()); null !== o; ) r.push(o), o = S(), - for (r = [], o = S(), null === o && (o = U()); null !== o; ) r.push(o), o = S(),
+ for (r = [], o = S(), null === o && (o = U()); null !== o; ) r.push(o), o = S(), + for (r = [], o = S(), null === o && (o = U()); null !== o; ) r.push(o), o = S(),
null === o && (o = U()); null === o && (o = U());
- null !== r ? (93 === n.charCodeAt(qt) ? (o = fu, qt++) : (o = null, 0 === Wt && e(su)), - null !== r ? (93 === n.charCodeAt(qt) ? (o = fu, qt++) : (o = null, 0 === Wt && e(su)),
- null !== o ? (Lt = l, u = hu(t, r), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== o ? (Lt = l, u = hu(t, r), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ null !== r ? (93 === n.charCodeAt(qt) ? (o = fu, qt++) : (o = null, 0 === Wt && e(su)), + null !== r ? (93 === n.charCodeAt(qt) ? (o = fu, qt++) : (o = null, 0 === Wt && e(su)),
+ null !== o ? (Lt = l, u = hu(t, r), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== o ? (Lt = l, u = hu(t, r), null === u ? (qt = l, l = u) : l = u) : (qt = l,
l = il)) : (qt = l, l = il); l = il)) : (qt = l, l = il);
@@ -408,9 +408,9 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function S() { function S() {
var l, u, t, r; var l, u, t, r;
- return Wt++, l = qt, u = U(), null !== u ? (45 === n.charCodeAt(qt) ? (t = pu, qt++) : (t = null, - return Wt++, l = qt, u = U(), null !== u ? (45 === n.charCodeAt(qt) ? (t = pu, qt++) : (t = null,
- 0 === Wt && e(vu)), null !== t ? (r = U(), null !== r ? (Lt = l, u = wu(u, r), null === u ? (qt = l, - 0 === Wt && e(vu)), null !== t ? (r = U(), null !== r ? (Lt = l, u = wu(u, r), null === u ? (qt = l,
- l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), Wt--, - l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), Wt--,
+ return Wt++, l = qt, u = U(), null !== u ? (45 === n.charCodeAt(qt) ? (t = pu, qt++) : (t = null, + return Wt++, l = qt, u = U(), null !== u ? (45 === n.charCodeAt(qt) ? (t = pu, qt++) : (t = null,
+ 0 === Wt && e(vu)), null !== t ? (r = U(), null !== r ? (Lt = l, u = wu(u, r), null === u ? (qt = l, + 0 === Wt && e(vu)), null !== t ? (r = U(), null !== r ? (Lt = l, u = wu(u, r), null === u ? (qt = l,
+ l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), Wt--, + l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), Wt--,
@@ -418,22 +418,22 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function U() { function U() {
var n, l; var n, l;
- return Wt++, n = G(), null === n && (n = E()), Wt--, null === n && (l = null, 0 === Wt && e(Au)), - return Wt++, n = G(), null === n && (n = E()), Wt--, null === n && (l = null, 0 === Wt && e(Au)),
+ return Wt++, n = G(), null === n && (n = E()), Wt--, null === n && (l = null, 0 === Wt && e(Au)), + return Wt++, n = G(), null === n && (n = E()), Wt--, null === n && (l = null, 0 === Wt && e(Au)),
n; n;
} }
function E() { function E() {
var l, u; var l, u;
- return l = qt, Cu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, 0 === Wt && e(gu)), - return l = qt, Cu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, 0 === Wt && e(gu)),
+ return l = qt, Cu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, 0 === Wt && e(gu)), + return l = qt, Cu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, 0 === Wt && e(gu)),
null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, l;
} }
function G() { function G() {
var n; var n;
- return n = L(), null === n && (n = Y(), null === n && (n = H(), null === n && (n = O(), - return n = L(), null === n && (n = Y(), null === n && (n = H(), null === n && (n = O(),
- null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(), - null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(),
- null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(), - null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(),
- null === n && (n = X(), null === n && (n = _(), null === n && (n = nl(), null === n && (n = ll(), - null === n && (n = X(), null === n && (n = _(), null === n && (n = nl(), null === n && (n = ll(),
+ return n = L(), null === n && (n = Y(), null === n && (n = H(), null === n && (n = O(), + return n = L(), null === n && (n = Y(), null === n && (n = H(), null === n && (n = O(),
+ null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(), + null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(),
+ null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(), + null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(),
@@ -445,25 +445,25 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function j() { function j() {
var l, u; var l, u;
- return l = qt, 46 === n.charCodeAt(qt) ? (u = ku, qt++) : (u = null, 0 === Wt && e(Tu)), - return l = qt, 46 === n.charCodeAt(qt) ? (u = ku, qt++) : (u = null, 0 === Wt && e(Tu)),
+ return l = qt, 46 === n.charCodeAt(qt) ? (u = ku, qt++) : (u = null, 0 === Wt && e(Tu)), + return l = qt, 46 === n.charCodeAt(qt) ? (u = ku, qt++) : (u = null, 0 === Wt && e(Tu)),
null !== u && (Lt = l, u = xu()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = xu()), null === u ? (qt = l, l = u) : l = u, l;
} }
function $() { function $() {
var l, u; var l, u;
- return Wt++, l = qt, mu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, - return Wt++, l = qt, mu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null,
- 0 === Wt && e(Ru)), null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, - 0 === Wt && e(Ru)), null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u,
+ return Wt++, l = qt, mu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, + return Wt++, l = qt, mu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null,
+ 0 === Wt && e(Ru)), null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, + 0 === Wt && e(Ru)), null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u,
Wt--, null === l && (u = null, 0 === Wt && e(yu)), l; Wt--, null === l && (u = null, 0 === Wt && e(yu)), l;
} }
function q() { function q() {
var n; var n;
- return n = M(), null === n && (n = D(), null === n && (n = Y(), null === n && (n = H(), - return n = M(), null === n && (n = D(), null === n && (n = Y(), null === n && (n = H(),
- null === n && (n = O(), null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), - null === n && (n = O(), null === n && (n = W(), null === n && (n = z(), null === n && (n = I(),
- null === n && (n = J(), null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), - null === n && (n = J(), null === n && (n = K(), null === n && (n = N(), null === n && (n = P(),
- null === n && (n = V(), null === n && (n = X(), null === n && (n = Z(), null === n && (n = _(), - null === n && (n = V(), null === n && (n = X(), null === n && (n = Z(), null === n && (n = _(),
- null === n && (n = nl(), null === n && (n = ll(), null === n && (n = ul(), null === n && (n = tl()))))))))))))))))))), - null === n && (n = nl(), null === n && (n = ll(), null === n && (n = ul(), null === n && (n = tl()))))))))))))))))))),
+ return n = M(), null === n && (n = D(), null === n && (n = Y(), null === n && (n = H(), + return n = M(), null === n && (n = D(), null === n && (n = Y(), null === n && (n = H(),
+ null === n && (n = O(), null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), + null === n && (n = O(), null === n && (n = W(), null === n && (n = z(), null === n && (n = I(),
+ null === n && (n = J(), null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), + null === n && (n = J(), null === n && (n = K(), null === n && (n = N(), null === n && (n = P(),
@@ -473,93 +473,93 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function L() { function L() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), - return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)),
+ return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), + return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)),
null !== u && (Lt = l, u = Su()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Su()), null === u ? (qt = l, l = u) : l = u, l;
} }
function M() { function M() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), - return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)),
+ return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), + return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)),
null !== u && (Lt = l, u = Uu()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Uu()), null === u ? (qt = l, l = u) : l = u, l;
} }
function D() { function D() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === Eu ? (u = Eu, qt += 2) : (u = null, 0 === Wt && e(Gu)), - return l = qt, n.substr(qt, 2) === Eu ? (u = Eu, qt += 2) : (u = null, 0 === Wt && e(Gu)),
+ return l = qt, n.substr(qt, 2) === Eu ? (u = Eu, qt += 2) : (u = null, 0 === Wt && e(Gu)), + return l = qt, n.substr(qt, 2) === Eu ? (u = Eu, qt += 2) : (u = null, 0 === Wt && e(Gu)),
null !== u && (Lt = l, u = Bu()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Bu()), null === u ? (qt = l, l = u) : l = u, l;
} }
function H() { function H() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === ju ? (u = ju, qt += 2) : (u = null, 0 === Wt && e($u)), - return l = qt, n.substr(qt, 2) === ju ? (u = ju, qt += 2) : (u = null, 0 === Wt && e($u)),
+ return l = qt, n.substr(qt, 2) === ju ? (u = ju, qt += 2) : (u = null, 0 === Wt && e($u)), + return l = qt, n.substr(qt, 2) === ju ? (u = ju, qt += 2) : (u = null, 0 === Wt && e($u)),
null !== u && (Lt = l, u = qu()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = qu()), null === u ? (qt = l, l = u) : l = u, l;
} }
function O() { function O() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === Lu ? (u = Lu, qt += 2) : (u = null, 0 === Wt && e(Mu)), - return l = qt, n.substr(qt, 2) === Lu ? (u = Lu, qt += 2) : (u = null, 0 === Wt && e(Mu)),
+ return l = qt, n.substr(qt, 2) === Lu ? (u = Lu, qt += 2) : (u = null, 0 === Wt && e(Mu)), + return l = qt, n.substr(qt, 2) === Lu ? (u = Lu, qt += 2) : (u = null, 0 === Wt && e(Mu)),
null !== u && (Lt = l, u = Du()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Du()), null === u ? (qt = l, l = u) : l = u, l;
} }
function W() { function W() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === Hu ? (u = Hu, qt += 2) : (u = null, 0 === Wt && e(Ou)), - return l = qt, n.substr(qt, 2) === Hu ? (u = Hu, qt += 2) : (u = null, 0 === Wt && e(Ou)),
+ return l = qt, n.substr(qt, 2) === Hu ? (u = Hu, qt += 2) : (u = null, 0 === Wt && e(Ou)), + return l = qt, n.substr(qt, 2) === Hu ? (u = Hu, qt += 2) : (u = null, 0 === Wt && e(Ou)),
null !== u && (Lt = l, u = Wu()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Wu()), null === u ? (qt = l, l = u) : l = u, l;
} }
function z() { function z() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === zu ? (u = zu, qt += 2) : (u = null, 0 === Wt && e(Iu)), - return l = qt, n.substr(qt, 2) === zu ? (u = zu, qt += 2) : (u = null, 0 === Wt && e(Iu)),
+ return l = qt, n.substr(qt, 2) === zu ? (u = zu, qt += 2) : (u = null, 0 === Wt && e(Iu)), + return l = qt, n.substr(qt, 2) === zu ? (u = zu, qt += 2) : (u = null, 0 === Wt && e(Iu)),
null !== u && (Lt = l, u = Ju()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Ju()), null === u ? (qt = l, l = u) : l = u, l;
} }
function I() { function I() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === Ku ? (u = Ku, qt += 2) : (u = null, 0 === Wt && e(Nu)), - return l = qt, n.substr(qt, 2) === Ku ? (u = Ku, qt += 2) : (u = null, 0 === Wt && e(Nu)),
+ return l = qt, n.substr(qt, 2) === Ku ? (u = Ku, qt += 2) : (u = null, 0 === Wt && e(Nu)), + return l = qt, n.substr(qt, 2) === Ku ? (u = Ku, qt += 2) : (u = null, 0 === Wt && e(Nu)),
null !== u && (Lt = l, u = Pu()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Pu()), null === u ? (qt = l, l = u) : l = u, l;
} }
function J() { function J() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === Vu ? (u = Vu, qt += 2) : (u = null, 0 === Wt && e(Xu)), - return l = qt, n.substr(qt, 2) === Vu ? (u = Vu, qt += 2) : (u = null, 0 === Wt && e(Xu)),
+ return l = qt, n.substr(qt, 2) === Vu ? (u = Vu, qt += 2) : (u = null, 0 === Wt && e(Xu)), + return l = qt, n.substr(qt, 2) === Vu ? (u = Vu, qt += 2) : (u = null, 0 === Wt && e(Xu)),
null !== u && (Lt = l, u = Yu()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = Yu()), null === u ? (qt = l, l = u) : l = u, l;
} }
function K() { function K() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === Zu ? (u = Zu, qt += 2) : (u = null, 0 === Wt && e(_u)), - return l = qt, n.substr(qt, 2) === Zu ? (u = Zu, qt += 2) : (u = null, 0 === Wt && e(_u)),
+ return l = qt, n.substr(qt, 2) === Zu ? (u = Zu, qt += 2) : (u = null, 0 === Wt && e(_u)), + return l = qt, n.substr(qt, 2) === Zu ? (u = Zu, qt += 2) : (u = null, 0 === Wt && e(_u)),
null !== u && (Lt = l, u = nt()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = nt()), null === u ? (qt = l, l = u) : l = u, l;
} }
function N() { function N() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === lt ? (u = lt, qt += 2) : (u = null, 0 === Wt && e(ut)), - return l = qt, n.substr(qt, 2) === lt ? (u = lt, qt += 2) : (u = null, 0 === Wt && e(ut)),
+ return l = qt, n.substr(qt, 2) === lt ? (u = lt, qt += 2) : (u = null, 0 === Wt && e(ut)), + return l = qt, n.substr(qt, 2) === lt ? (u = lt, qt += 2) : (u = null, 0 === Wt && e(ut)),
null !== u && (Lt = l, u = tt()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = tt()), null === u ? (qt = l, l = u) : l = u, l;
} }
function P() { function P() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === rt ? (u = rt, qt += 2) : (u = null, 0 === Wt && e(et)), - return l = qt, n.substr(qt, 2) === rt ? (u = rt, qt += 2) : (u = null, 0 === Wt && e(et)),
+ return l = qt, n.substr(qt, 2) === rt ? (u = rt, qt += 2) : (u = null, 0 === Wt && e(et)), + return l = qt, n.substr(qt, 2) === rt ? (u = rt, qt += 2) : (u = null, 0 === Wt && e(et)),
null !== u && (Lt = l, u = ot()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = ot()), null === u ? (qt = l, l = u) : l = u, l;
} }
function V() { function V() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === ct ? (u = ct, qt += 2) : (u = null, 0 === Wt && e(it)), - return l = qt, n.substr(qt, 2) === ct ? (u = ct, qt += 2) : (u = null, 0 === Wt && e(it)),
+ return l = qt, n.substr(qt, 2) === ct ? (u = ct, qt += 2) : (u = null, 0 === Wt && e(it)), + return l = qt, n.substr(qt, 2) === ct ? (u = ct, qt += 2) : (u = null, 0 === Wt && e(it)),
null !== u && (Lt = l, u = at()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = at()), null === u ? (qt = l, l = u) : l = u, l;
} }
function X() { function X() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === ft ? (u = ft, qt += 2) : (u = null, 0 === Wt && e(st)), - return l = qt, n.substr(qt, 2) === ft ? (u = ft, qt += 2) : (u = null, 0 === Wt && e(st)),
+ return l = qt, n.substr(qt, 2) === ft ? (u = ft, qt += 2) : (u = null, 0 === Wt && e(st)), + return l = qt, n.substr(qt, 2) === ft ? (u = ft, qt += 2) : (u = null, 0 === Wt && e(st)),
null !== u && (Lt = l, u = ht()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = ht()), null === u ? (qt = l, l = u) : l = u, l;
} }
function Y() { function Y() {
var l, u, t; var l, u, t;
- return l = qt, n.substr(qt, 2) === dt ? (u = dt, qt += 2) : (u = null, 0 === Wt && e(pt)), - return l = qt, n.substr(qt, 2) === dt ? (u = dt, qt += 2) : (u = null, 0 === Wt && e(pt)),
- null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), - null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)),
- null !== t ? (Lt = l, u = wt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== t ? (Lt = l, u = wt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ return l = qt, n.substr(qt, 2) === dt ? (u = dt, qt += 2) : (u = null, 0 === Wt && e(pt)), + return l = qt, n.substr(qt, 2) === dt ? (u = dt, qt += 2) : (u = null, 0 === Wt && e(pt)),
+ null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), + null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)),
+ null !== t ? (Lt = l, u = wt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== t ? (Lt = l, u = wt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
@@ -567,9 +567,9 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function Z() { function Z() {
var l, u, t; var l, u, t;
- return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), - return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)),
- null !== u ? (gt.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(bt)), - null !== u ? (gt.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(bt)),
- null !== t ? (Lt = l, u = kt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== t ? (Lt = l, u = kt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), + return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)),
+ null !== u ? (gt.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(bt)), + null !== u ? (gt.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(bt)),
+ null !== t ? (Lt = l, u = kt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== t ? (Lt = l, u = kt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
@@ -577,15 +577,15 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function _() { function _() {
var l, u, t, r; var l, u, t, r;
- if (l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), - if (l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)),
+ if (l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), + if (l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)),
null !== u) { null !== u) {
- if (t = [], yt.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(mt)), - if (t = [], yt.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(mt)),
- null !== r) for (;null !== r; ) t.push(r), yt.test(n.charAt(qt)) ? (r = n.charAt(qt), - null !== r) for (;null !== r; ) t.push(r), yt.test(n.charAt(qt)) ? (r = n.charAt(qt),
+ if (t = [], yt.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(mt)), + if (t = [], yt.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(mt)),
+ null !== r) for (;null !== r; ) t.push(r), yt.test(n.charAt(qt)) ? (r = n.charAt(qt), + null !== r) for (;null !== r; ) t.push(r), yt.test(n.charAt(qt)) ? (r = n.charAt(qt),
qt++) : (r = null, 0 === Wt && e(mt)); else t = il; qt++) : (r = null, 0 === Wt && e(mt)); else t = il;
- null !== t ? (Lt = l, u = Rt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== t ? (Lt = l, u = Rt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ null !== t ? (Lt = l, u = Rt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== t ? (Lt = l, u = Rt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
l = il); l = il);
} else qt = l, l = il; } else qt = l, l = il;
@@ -593,15 +593,15 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function nl() { function nl() {
var l, u, t, r; var l, u, t, r;
- if (l = qt, n.substr(qt, 2) === Ft ? (u = Ft, qt += 2) : (u = null, 0 === Wt && e(Qt)), - if (l = qt, n.substr(qt, 2) === Ft ? (u = Ft, qt += 2) : (u = null, 0 === Wt && e(Qt)),
+ if (l = qt, n.substr(qt, 2) === Ft ? (u = Ft, qt += 2) : (u = null, 0 === Wt && e(Qt)), + if (l = qt, n.substr(qt, 2) === Ft ? (u = Ft, qt += 2) : (u = null, 0 === Wt && e(Qt)),
null !== u) { null !== u) {
- if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), - if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)),
- null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), - null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt),
+ if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), + if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)),
+ null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), + null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt),
qt++) : (r = null, 0 === Wt && e(Ut)); else t = il; qt++) : (r = null, 0 === Wt && e(Ut)); else t = il;
- null !== t ? (Lt = l, u = Et(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== t ? (Lt = l, u = Et(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ null !== t ? (Lt = l, u = Et(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== t ? (Lt = l, u = Et(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
l = il); l = il);
} else qt = l, l = il; } else qt = l, l = il;
@@ -609,15 +609,15 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function ll() { function ll() {
var l, u, t, r; var l, u, t, r;
- if (l = qt, n.substr(qt, 2) === Gt ? (u = Gt, qt += 2) : (u = null, 0 === Wt && e(Bt)), - if (l = qt, n.substr(qt, 2) === Gt ? (u = Gt, qt += 2) : (u = null, 0 === Wt && e(Bt)),
+ if (l = qt, n.substr(qt, 2) === Gt ? (u = Gt, qt += 2) : (u = null, 0 === Wt && e(Bt)), + if (l = qt, n.substr(qt, 2) === Gt ? (u = Gt, qt += 2) : (u = null, 0 === Wt && e(Bt)),
null !== u) { null !== u) {
- if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), - if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)),
- null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), - null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt),
+ if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), + if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)),
+ null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), + null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt),
qt++) : (r = null, 0 === Wt && e(Ut)); else t = il; qt++) : (r = null, 0 === Wt && e(Ut)); else t = il;
- null !== t ? (Lt = l, u = jt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== t ? (Lt = l, u = jt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ null !== t ? (Lt = l, u = jt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== t ? (Lt = l, u = jt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
l = il); l = il);
} else qt = l, l = il; } else qt = l, l = il;
@@ -625,15 +625,15 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
} }
function ul() { function ul() {
var l, u; var l, u;
- return l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), - return l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)),
+ return l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), + return l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)),
null !== u && (Lt = l, u = $t()), null === u ? (qt = l, l = u) : l = u, l; null !== u && (Lt = l, u = $t()), null === u ? (qt = l, l = u) : l = u, l;
} }
function tl() { function tl() {
var l, u, t; var l, u, t;
- return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), - return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)),
- null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), - null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)),
- null !== t ? (Lt = l, u = bu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, - null !== t ? (Lt = l, u = bu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
+ return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), + return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)),
+ null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), + null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)),
+ null !== t ? (Lt = l, u = bu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + null !== t ? (Lt = l, u = bu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l,
@@ -644,7 +644,7 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
var Util = __webpack_require__(3) var Util = __webpack_require__(3)
var Random = __webpack_require__(5) var Random = __webpack_require__(5)
/* /*
- -
+ +
*/ */
var Handler = { var Handler = {
@@ -653,21 +653,21 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
return Random.integer(min, max) return Random.integer(min, max)
}, },
/* /*
- -
+ +
*/ */
charset: function(node, result, cache) { charset: function(node, result, cache) {
// node.invert // node.invert
@@ -7642,11 +7642,11 @@ return /******/ (function(modules) { // webpackBootstrap @@ -7642,11 +7642,11 @@ return /******/ (function(modules) { // webpackBootstrap
## valid(template, data) ## valid(template, data)
校验真实数据 data 是否与数据模板 template 匹配。 校验真实数据 data 是否与数据模板 template 匹配。
- -
+ +
实现思路: 实现思路:
1. 解析规则。 1. 解析规则。
先把数据模板 template 解析为更方便机器解析的 JSON-Schame 先把数据模板 template 解析为更方便机器解析的 JSON-Schame
- name 属性名 - name 属性名
+ name 属性名 + name 属性名
type 属性值类型 type 属性值类型
template 属性值模板 template 属性值模板
@@ -675,8 +675,8 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
@@ -7655,7 +7655,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -7655,7 +7655,7 @@ return /******/ (function(modules) { // webpackBootstrap
2. 递归验证规则。 2. 递归验证规则。
然后用 JSON-Schema 校验真实数据,校验项包括属性名、值类型、值、值生成规则。 然后用 JSON-Schema 校验真实数据,校验项包括属性名、值类型、值、值生成规则。
- 提示信息 - 提示信息
+ 提示信息 + 提示信息
https://github.com/fge/json-schema-validator/blob/master/src/main/resources/com/github/fge/jsonschema/validator/validation.properties https://github.com/fge/json-schema-validator/blob/master/src/main/resources/com/github/fge/jsonschema/validator/validation.properties
[JSON-Schama validator](http://json-schema-validator.herokuapp.com/) [JSON-Schama validator](http://json-schema-validator.herokuapp.com/)
@@ -685,25 +685,25 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
+step +step
整数部分 整数部分
小数部分 小数部分
- boolean - boolean
- string - string
+ boolean + boolean
+ string + string
min-max min-max
count count
## properties ## properties
@@ -7949,9 +7949,9 @@ return /******/ (function(modules) { // webpackBootstrap @@ -7949,9 +7949,9 @@ return /******/ (function(modules) { // webpackBootstrap
/* /*
完善、友好的提示信息 完善、友好的提示信息
- -
+ +
Equal, not equal to, greater than, less than, greater than or equal to, less than or equal to Equal, not equal to, greater than, less than, greater than or equal to, less than or equal to
- 路径 验证类型 描述 - 路径 验证类型 描述
+ 路径 验证类型 描述 + 路径 验证类型 描述
Expect path.name is less than or equal to expected, but path.name is actual. Expect path.name is less than or equal to expected, but path.name is actual.
@@ -8264,7 +8264,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -8264,7 +8264,7 @@ return /******/ (function(modules) { // webpackBootstrap
Util.extend(MockXMLHttpRequest.prototype, { Util.extend(MockXMLHttpRequest.prototype, {
// https://xhr.spec.whatwg.org/#the-open()-method // https://xhr.spec.whatwg.org/#the-open()-method
@@ -711,22 +711,22 @@ index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecd
- open: function(method, url, async, username, password) { - open: function(method, url, async, username, password) {
+ open: function(method, url, async = true, username, password) { + open: function(method, url, async = true, username, password) {
var that = this var that = this
Util.extend(this.custom, { Util.extend(this.custom, {
@@ -8310,6 +8310,8 @@ return /******/ (function(modules) { // webpackBootstrap @@ -8310,6 +8310,8 @@ return /******/ (function(modules) { // webpackBootstrap
var xhr = createNativeXMLHttpRequest() var xhr = createNativeXMLHttpRequest()
this.custom.xhr = xhr this.custom.xhr = xhr
+ MockXMLHttpRequest.prototype.upload = xhr.upload + MockXMLHttpRequest.prototype.upload = xhr.upload
+ +
// 初始化所有事件,用于监听原生 XHR 对象的事件 // 初始化所有事件,用于监听原生 XHR 对象的事件
for (var i = 0; i < XHR_EVENTS.length; i++) { for (var i = 0; i < XHR_EVENTS.length; i++) {
xhr.addEventListener(XHR_EVENTS[i], handle) xhr.addEventListener(XHR_EVENTS[i], handle)
@@ -8360,6 +8362,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -8360,6 +8362,7 @@ return /******/ (function(modules) { // webpackBootstrap
// 原生 XHR // 原生 XHR
if (!this.match) { if (!this.match) {
+ this.custom.xhr.responseType = this.responseType || '' + this.custom.xhr.responseType = this.responseType || ''
this.custom.xhr.send(data) this.custom.xhr.send(data)
return return
} }

11391
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

1
public/favicon.svg Normal file
View File

@@ -0,0 +1 @@
<svg viewBox="0 0 160 160" xmlns="http://www.w3.org/2000/svg"><path d="M81.28 55.9c-.1-11.67-2.93-22.55-9.37-32.38-1-1.5-2.14-2.86-2.5-4.71a8.1 8.1 0 014-8.61 7.89 7.89 0 019.3 1.23 35.999 35.999 0 015.9 8.83 75.18 75.18 0 018.44 28.58 83.211 83.211 0 01-5.23 36.74 102.983 102.983 0 01-3 7.28 1.2 1.2 0 000 1.41c9.58 13.3 21.76 23 37.85 27.24a54.37 54.37 0 0019.68 1.57 7.72 7.72 0 018.36 6.9 7.903 7.903 0 01-6.7 9 64.744 64.744 0 01-23-1.33 77.68 77.68 0 01-36.93-19.88 93.628 93.628 0 01-11.91-13.71 2.18 2.18 0 00-2.3-1.06 72.744 72.744 0 00-27.38 7.55c-11.6 6-20.67 14.58-26.4 26.45a10.134 10.134 0 01-3.7 4.7 8 8 0 01-9.19-.7 7.86 7.86 0 01-2.36-9.28 60.324 60.324 0 018.72-14.52c12.2-15.43 28.21-24.59 47.32-28.57A85.085 85.085 0 0173.07 87c.524.015 1-.307 1.18-.8a76.06 76.06 0 006.53-22.3c.351-2.652.518-5.325.5-8z" fill="#646cff"/><path d="M136.26 108.34a44.742 44.742 0 01-11.13-2.87 46.108 46.108 0 01-19.66-13.76 8 8 0 015.72-13.22 7.93 7.93 0 016.54 2.93 33.27 33.27 0 0018.87 10.75c1.546.155 3.058.553 4.48 1.18a8.08 8.08 0 013.84 9.21c-.92 3.52-4.13 5.81-8.66 5.78zm-80.6-75.02a7.61 7.61 0 016.64 5 49.139 49.139 0 013.64 17 46.33 46.33 0 01-2.46 17.28c-2 5.77-8.24 7.79-12.89 4.15a8.1 8.1 0 01-2.39-9 31.679 31.679 0 001.68-12.36 35.77 35.77 0 00-2.43-11c-2.1-5.45 1.75-11.07 8.21-11.07zm22.26 93.25a8 8 0 01-6.68 7.86 32.88 32.88 0 00-19.7 12.19 8.13 8.13 0 01-11.21 1.62 8 8 0 01-1.41-11.58A51.043 51.043 0 0154 123.81a45.842 45.842 0 0114-5.1c5.35-1.04 9.91 2.56 9.92 7.86z" fill="#646cff"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -1,17 +1,12 @@
import { readFile } from 'fs/promises'; import { readFile, writeFile } from 'fs/promises';
import nodeHtmlToImage from 'node-html-to-image';
import themeSettings from '../src/settings/theme.json'; import themeSettings from '../src/settings/theme.json';
async function generatePngLogoFromSvg(svgPath: string, color: string) { async function updateFavicon(svgPath: string, color: string) {
const svgStr = await readFile(svgPath, 'utf-8'); const svgStr = await readFile(svgPath, 'utf-8');
const svgStrWithColor = svgStr.replace(/currentColor/g, color); const svgStrWithColor = svgStr.replace(/currentColor/g, color);
await nodeHtmlToImage({ await writeFile('./public/favicon.svg', svgStrWithColor);
output: './public/logo.png',
html: svgStrWithColor,
transparent: true
});
} }
generatePngLogoFromSvg('./src/assets/svg-icon/logo.svg', themeSettings.themeColor); updateFavicon('./src/assets/svg-icon/logo.svg', themeSettings.themeColor);

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-activity"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 202 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-at-sign"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="prefix__prefix__feather prefix__prefix__feather-at-sign"><circle cx="12" cy="12" r="4"/><path d="M16 8v5a3 3 0 006 0v-1a10 10 0 10-3.92 7.94"/></svg>

Before

Width:  |  Height:  |  Size: 322 B

After

Width:  |  Height:  |  Size: 315 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-cast"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="prefix__prefix__feather prefix__prefix__feather-cast"><path d="M2 16.1A5 5 0 015.9 20M2 12.05A9 9 0 019.95 20M2 8V6a2 2 0 012-2h16a2 2 0 012 2v12a2 2 0 01-2 2h-6M2 20h.01"/></svg>

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 345 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chrome"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="4"/><path d="M21.17 8H12M3.95 6.06L8.54 14m2.34 7.94L15.46 14"/></svg>

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 288 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 283 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--mdi" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M19 10c0 1.38-2.12 2.5-3.5 2.5s-2.75-1.12-2.75-2.5h-1.5c0 1.38-1.37 2.5-2.75 2.5S5 11.38 5 10h-.75c-.16.64-.25 1.31-.25 2a8 8 0 0 0 8 8a8 8 0 0 0 8-8c0-.69-.09-1.36-.25-2H19m-7-6C9.04 4 6.45 5.61 5.07 8h13.86C17.55 5.61 14.96 4 12 4m10 8a10 10 0 0 1-10 10A10 10 0 0 1 2 12A10 10 0 0 1 12 2a10 10 0 0 1 10 10m-10 5.23c-1.75 0-3.29-.73-4.19-1.81L9.23 14c.45.72 1.52 1.23 2.77 1.23s2.32-.51 2.77-1.23l1.42 1.42c-.9 1.08-2.44 1.81-4.19 1.81Z"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M19 10c0 1.38-2.12 2.5-3.5 2.5s-2.75-1.12-2.75-2.5h-1.5c0 1.38-1.37 2.5-2.75 2.5S5 11.38 5 10h-.75c-.16.64-.25 1.31-.25 2a8 8 0 008 8 8 8 0 008-8c0-.69-.09-1.36-.25-2H19m-7-6C9.04 4 6.45 5.61 5.07 8h13.86C17.55 5.61 14.96 4 12 4m10 8a10 10 0 01-10 10A10 10 0 012 12 10 10 0 0112 2a10 10 0 0110 10m-10 5.23c-1.75 0-3.29-.73-4.19-1.81L9.23 14c.45.72 1.52 1.23 2.77 1.23s2.32-.51 2.77-1.23l1.42 1.42c-.9 1.08-2.44 1.81-4.19 1.81z"/></svg>

Before

Width:  |  Height:  |  Size: 702 B

After

Width:  |  Height:  |  Size: 544 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>

Before

Width:  |  Height:  |  Size: 371 B

After

Width:  |  Height:  |  Size: 309 B

View File

@@ -1 +1 @@
<svg viewBox="0 0 158.88 158.88"><path d="M158.86.3v157.48c0 .9-.2 1.1-1.1 1.1H.24a2.61 2.61 0 01-.11-1.3V1.67C.14 0 0 .18 1.61.18h156a2.62 2.62 0 011.25.12z" fill="currentColor"/><path d="M158.86.3H2C0 .31.27 0 .27 2v156.85c-.07-.05-.25.12-.24-.12s0-.64 0-1Q0 79.46 0 1.14C0 .24.2 0 1.1 0h156.68c.35.08.81-.2 1.08.3z" fill="#fff"/><path d="M93.65 51.52a68.65 68.65 0 01-6.47 28.81 1.72 1.72 0 00.19 2c6.08 8.28 13.58 14.79 23.19 18.69a46.22 46.22 0 0017.15 3.39 28.87 28.87 0 003.34-.25 6.2 6.2 0 017 5.12 6.07 6.07 0 01-5.15 7.14 50.39 50.39 0 01-18.06-1c-15.85-3.66-28-12.75-37.44-25.7a2.15 2.15 0 00-2.23-1.09c-14 1.37-26.17 6.43-35.5 17.21a38.47 38.47 0 00-6.23 9.74 6.21 6.21 0 01-8.17 3.42 6.14 6.14 0 01-3.27-8.2 49.31 49.31 0 019.63-14.62c10.56-11.44 23.8-17.54 39.09-19.54a13.93 13.93 0 012.84-.34c1.61.14 2.18-.73 2.73-2A54.38 54.38 0 0081.12 51a44 44 0 00-8-25 6.11 6.11 0 01-.65-6.46A6 6 0 0177.75 16a6.34 6.34 0 015.66 3 53.61 53.61 0 017.17 14.28 59.33 59.33 0 013.07 18.24z" fill="#fff"/><path d="M46.92 118.63a6 6 0 011.35-3.88 37.89 37.89 0 0122.5-14 6.08 6.08 0 016.65 2.47 6.18 6.18 0 01-3.84 9.63 26.09 26.09 0 00-15.71 9.77 6.2 6.2 0 01-10.95-4zM124.3 92.8a34.66 34.66 0 01-9.82-2.48 35.46 35.46 0 01-14.65-10.45 6.19 6.19 0 012.84-9.93 5.79 5.79 0 016.44 1.73 26.79 26.79 0 0016.51 8.85 6 6 0 015 5.54 6.21 6.21 0 01-4.29 6.46 6.55 6.55 0 01-2.03.28zM69.32 53.27a33.46 33.46 0 01-2.27 12.52 6.21 6.21 0 01-10.94 1 6.09 6.09 0 01-.65-5.4 26 26 0 00-.53-18.25 6.21 6.21 0 0111.49-4.72 40.24 40.24 0 012.9 14.85z" fill="#fff"/></svg> <svg xmlns="http://www.w3.org/2000/svg"><path d="M0 0h160v160H0V0z" fill="currentColor"/><path d="M94.322 51.888A69.12 69.12 0 0187.806 80.9a1.732 1.732 0 00.191 2.014c6.124 8.338 13.677 14.894 23.356 18.821a46.564 46.564 0 0017.273 3.414 29.101 29.101 0 003.364-.252 6.245 6.245 0 017.051 5.156 6.112 6.112 0 01-5.187 7.19 50.758 50.758 0 01-18.19-1.007c-15.964-3.686-28.2-12.84-37.709-25.88a2.165 2.165 0 00-2.246-1.098c-14.1 1.38-26.357 6.475-35.754 17.331a38.721 38.721 0 00-6.275 9.808 6.255 6.255 0 01-8.229 3.444 6.184 6.184 0 01-3.293-8.258 49.662 49.662 0 019.699-14.722c10.636-11.52 23.97-17.663 39.37-19.677a14.06 14.06 0 012.86-.342c1.622.14 2.197-.735 2.75-2.014a54.752 54.752 0 004.865-23.463 44.302 44.302 0 00-8.057-25.175 6.152 6.152 0 01-.655-6.506 6.043 6.043 0 015.318-3.564 6.386 6.386 0 015.7 3.02 53.98 53.98 0 017.222 14.38 59.734 59.734 0 013.092 18.368z" fill="#fff"/><path d="M47.257 119.468a6.04 6.04 0 011.36-3.907 38.165 38.165 0 0122.66-14.098 6.124 6.124 0 016.699 2.487 6.223 6.223 0 01-3.868 9.698 26.276 26.276 0 00-15.823 9.838 6.245 6.245 0 01-11.028-4.028v.01zm77.935-26.01a34.908 34.908 0 01-9.89-2.498 35.717 35.717 0 01-14.756-10.523 6.233 6.233 0 012.861-10 5.832 5.832 0 016.486 1.742 26.986 26.986 0 0016.628 8.912 6.042 6.042 0 015.036 5.58 6.253 6.253 0 01-4.32 6.504 6.588 6.588 0 01-2.045.282zM69.817 53.65a33.69 33.69 0 01-2.286 12.607 6.255 6.255 0 01-11.018 1.007 6.132 6.132 0 01-.655-5.438 26.178 26.178 0 00-.534-18.377 6.256 6.256 0 0111.572-4.753 40.515 40.515 0 012.921 14.954z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1 +1 @@
<svg viewBox="0 0 158.88 158.88"><path d="M0 158.86V1.1C0 .2.2 0 1.1 0h156.68c.9 0 1.1.2 1.1 1.1v156.68c0 .9-.2 1.1-1.1 1.1Q78.9 158.83 0 158.86z" fill="#ffffff00"/><path d="M81.28 55.9c-.1-11.67-2.93-22.55-9.37-32.38-1-1.5-2.14-2.86-2.5-4.71a8.1 8.1 0 014-8.61 7.89 7.89 0 019.3 1.23 36 36 0 015.9 8.83 75.18 75.18 0 018.44 28.58 83.21 83.21 0 01-5.23 36.74 103 103 0 01-3 7.28 1.2 1.2 0 000 1.41c9.58 13.3 21.76 23 37.85 27.24a54.35 54.35 0 0019.68 1.57 7.72 7.72 0 018.36 6.9 7.9 7.9 0 01-6.7 9 64.74 64.74 0 01-23-1.33 77.68 77.68 0 01-36.93-19.88 93.64 93.64 0 01-11.91-13.71 2.18 2.18 0 00-2.3-1.06 72.75 72.75 0 00-27.38 7.55c-11.6 6-20.67 14.58-26.4 26.45a10.13 10.13 0 01-3.7 4.7 8 8 0 01-9.19-.7 7.86 7.86 0 01-2.36-9.28 60.32 60.32 0 018.72-14.52c12.2-15.43 28.21-24.59 47.32-28.57A85.08 85.08 0 0173.07 87a1.22 1.22 0 001.18-.8 76.06 76.06 0 006.53-22.3 57.87 57.87 0 00.5-8z" fill="currentColor"/><path d="M136.26 108.34a44.72 44.72 0 01-11.13-2.87 46.11 46.11 0 01-19.66-13.76 8 8 0 015.72-13.22 7.93 7.93 0 016.54 2.93 33.27 33.27 0 0018.87 10.75 14.76 14.76 0 014.48 1.18 8.08 8.08 0 013.84 9.21c-.92 3.52-4.13 5.81-8.66 5.78zM55.66 33.32a7.61 7.61 0 016.64 5 49.14 49.14 0 013.64 17 46.33 46.33 0 01-2.46 17.28c-2 5.77-8.24 7.79-12.89 4.15a8.1 8.1 0 01-2.39-9 31.68 31.68 0 001.68-12.36 35.77 35.77 0 00-2.43-11c-2.1-5.45 1.75-11.07 8.21-11.07zM77.92 126.57a8 8 0 01-6.68 7.86 32.88 32.88 0 00-19.7 12.19 8.13 8.13 0 01-11.21 1.62 8 8 0 01-1.41-11.58A51.05 51.05 0 0154 123.81a45.85 45.85 0 0114-5.1c5.35-1.04 9.91 2.56 9.92 7.86z" fill="currentColor"/></svg> <svg viewBox="0 0 160 160" xmlns="http://www.w3.org/2000/svg"><path d="M81.28 55.9c-.1-11.67-2.93-22.55-9.37-32.38-1-1.5-2.14-2.86-2.5-4.71a8.1 8.1 0 014-8.61 7.89 7.89 0 019.3 1.23 35.999 35.999 0 015.9 8.83 75.18 75.18 0 018.44 28.58 83.211 83.211 0 01-5.23 36.74 102.983 102.983 0 01-3 7.28 1.2 1.2 0 000 1.41c9.58 13.3 21.76 23 37.85 27.24a54.37 54.37 0 0019.68 1.57 7.72 7.72 0 018.36 6.9 7.903 7.903 0 01-6.7 9 64.744 64.744 0 01-23-1.33 77.68 77.68 0 01-36.93-19.88 93.628 93.628 0 01-11.91-13.71 2.18 2.18 0 00-2.3-1.06 72.744 72.744 0 00-27.38 7.55c-11.6 6-20.67 14.58-26.4 26.45a10.134 10.134 0 01-3.7 4.7 8 8 0 01-9.19-.7 7.86 7.86 0 01-2.36-9.28 60.324 60.324 0 018.72-14.52c12.2-15.43 28.21-24.59 47.32-28.57A85.085 85.085 0 0173.07 87c.524.015 1-.307 1.18-.8a76.06 76.06 0 006.53-22.3c.351-2.652.518-5.325.5-8z" fill="currentColor"/><path d="M136.26 108.34a44.742 44.742 0 01-11.13-2.87 46.108 46.108 0 01-19.66-13.76 8 8 0 015.72-13.22 7.93 7.93 0 016.54 2.93 33.27 33.27 0 0018.87 10.75c1.546.155 3.058.553 4.48 1.18a8.08 8.08 0 013.84 9.21c-.92 3.52-4.13 5.81-8.66 5.78zm-80.6-75.02a7.61 7.61 0 016.64 5 49.139 49.139 0 013.64 17 46.33 46.33 0 01-2.46 17.28c-2 5.77-8.24 7.79-12.89 4.15a8.1 8.1 0 01-2.39-9 31.679 31.679 0 001.68-12.36 35.77 35.77 0 00-2.43-11c-2.1-5.45 1.75-11.07 8.21-11.07zm22.26 93.25a8 8 0 01-6.68 7.86 32.88 32.88 0 00-19.7 12.19 8.13 8.13 0 01-11.21 1.62 8 8 0 01-1.41-11.58A51.043 51.043 0 0154 123.81a45.842 45.842 0 0114-5.1c5.35-1.04 9.91 2.56 9.92 7.86z" fill="currentColor"/></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-wind"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-wind"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 327 B

View File

@@ -54,7 +54,7 @@ const props = withDefaults(defineProps<Props>(), {
placeholderClass: 'bg-white dark:bg-dark transition-background-color duration-300 ease-in-out', placeholderClass: 'bg-white dark:bg-dark transition-background-color duration-300 ease-in-out',
emptyDesc: '暂无数据', emptyDesc: '暂无数据',
iconClass: 'text-320px text-primary', iconClass: 'text-320px text-primary',
descClass: 'text-16px text-[#666]', descClass: 'text-16px text-#666',
showNetworkReload: false showNetworkReload: false
}); });

View File

@@ -1,42 +0,0 @@
<template>
<div class="flex-center text-18px cursor-pointer" @click="handleSwitch">
<icon-mdi-moon-waning-crescent v-if="darkMode" />
<icon-mdi-white-balance-sunny v-else />
</div>
</template>
<script setup lang="ts">
import { computed } from 'vue';
defineOptions({ name: 'DarkModeSwitch' });
interface Props {
/** 暗黑模式 */
dark?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
dark: false
});
interface Emits {
(e: 'update:dark', darkMode: boolean): void;
}
const emit = defineEmits<Emits>();
const darkMode = computed({
get() {
return props.dark;
},
set(newValue: boolean) {
emit('update:dark', newValue);
}
});
function handleSwitch() {
darkMode.value = !darkMode.value;
}
</script>
<style scoped></style>

View File

@@ -4,24 +4,23 @@
<div class="w-56px h-56px my-36px"> <div class="w-56px h-56px my-36px">
<div class="relative h-full animate-spin"> <div class="relative h-full animate-spin">
<div <div
v-for="(item, index) in lodingClasses" v-for="(item, index) in loadingClasses"
:key="index" :key="index"
class="absolute w-16px h-16px bg-primary rounded-8px animate-pulse" class="absolute w-16px h-16px bg-primary rounded-8px animate-pulse"
:class="item" :class="item"
></div> ></div>
</div> </div>
</div> </div>
<h2 class="text-28px font-500 text-#646464">{{ title }}</h2> <h2 class="text-28px font-500 text-#646464">{{ $t('system.title') }}</h2>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useAppInfo } from '@/composables'; import { sessionStg, getRgbOfColor } from '@/utils';
import { localStg } from '@/utils'; import { $t } from '@/locales';
import themeSettings from '@/settings/theme.json';
const { title } = useAppInfo(); const loadingClasses = [
const lodingClasses = [
'left-0 top-0', 'left-0 top-0',
'left-0 bottom-0 animate-delay-500', 'left-0 bottom-0 animate-delay-500',
'right-0 top-0 animate-delay-1000', 'right-0 top-0 animate-delay-1000',
@@ -29,9 +28,12 @@ const lodingClasses = [
]; ];
function addThemeColorCssVars() { function addThemeColorCssVars() {
const defaultColor = '#1890ff'; const defaultColor = themeSettings.themeColor;
const themeColor = localStg.get('themeColor') || defaultColor; const themeColor = sessionStg.get('themeColor') || defaultColor;
const cssVars = `--primary-color: ${themeColor}`;
const { r, g, b } = getRgbOfColor(themeColor);
const cssVars = `--primary-color: ${r},${g},${b}`;
document.documentElement.style.cssText = cssVars; document.documentElement.style.cssText = cssVars;
} }

View File

@@ -1,7 +1,7 @@
<template> <template>
<div <div
class="dark:bg-[#18181c] dark:text-white dark:text-opacity-82 transition-all duration-300 ease-in-out" class="dark:bg-dark dark:text-white dark:text-opacity-82 transition-all"
:class="inverted ? 'bg-[#001428] text-white' : 'bg-white text-[#333639]'" :class="inverted ? 'bg-#001428 text-white' : 'bg-white text-#333639'"
> >
<slot></slot> <slot></slot>
</div> </div>

View File

@@ -0,0 +1,89 @@
<template>
<div class="flex-center text-18px cursor-pointer" @click="handleSwitch">
<icon-mdi-moon-waning-crescent v-if="darkMode" />
<icon-mdi-white-balance-sunny v-else />
</div>
</template>
<script setup lang="ts">
import { computed } from 'vue';
defineOptions({ name: 'DarkModeSwitch' });
interface Props {
/** 暗黑模式 */
dark?: boolean;
/** 自定义暗黑模式动画过渡 */
customizeTransition?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
dark: false
});
interface Emits {
(e: 'update:dark', darkMode: boolean): void;
}
const emit = defineEmits<Emits>();
const darkMode = computed({
get() {
return props.dark;
},
set(newValue: boolean) {
emit('update:dark', newValue);
}
});
async function handleSwitch(event: MouseEvent) {
const x = event.clientX;
const y = event.clientY;
if (!props.customizeTransition || !document.startViewTransition) {
darkMode.value = !darkMode.value;
return;
}
const endRadius = Math.hypot(Math.max(x, innerWidth - x), Math.max(y, innerHeight - y));
const transition = document.startViewTransition(() => {
darkMode.value = !darkMode.value;
});
await transition.ready;
const clipPath = [`circle(0px at ${x}px ${y}px)`, `circle(${endRadius}px at ${x}px ${y}px)`];
document.documentElement.animate(
{
clipPath: darkMode.value ? clipPath : [...clipPath].reverse()
},
{
duration: 300,
easing: 'ease-in',
pseudoElement: darkMode.value ? '::view-transition-new(root)' : '::view-transition-old(root)'
}
);
}
</script>
<style>
::view-transition-old(root),
::view-transition-new(root) {
animation: none;
mix-blend-mode: normal;
}
::view-transition-old(root) {
z-index: 9999;
}
::view-transition-new(root) {
z-index: 1;
}
.dark::view-transition-old(root) {
z-index: 1;
}
.dark::view-transition-new(root) {
z-index: 9999;
}
</style>

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="flex-col-center wh-full"> <div class="flex-col-center gap-24px min-h-520px wh-full overflow-hidden">
<div class="text-400px text-primary"> <div class="flex text-400px text-primary">
<icon-local-no-permission v-if="type === '403'" /> <icon-local-no-permission v-if="type === '403'" />
<icon-local-not-found v-if="type === '404'" /> <icon-local-not-found v-if="type === '404'" />
<icon-local-service-error v-if="type === '500'" /> <icon-local-service-error v-if="type === '500'" />

View File

@@ -2,14 +2,14 @@
<div v-if="showTooltip"> <div v-if="showTooltip">
<n-tooltip :placement="placement" trigger="hover"> <n-tooltip :placement="placement" trigger="hover">
<template #trigger> <template #trigger>
<div class="flex-center h-full cursor-pointer dark:hover:bg-[#333]" :class="contentClassName"> <div class="flex-center h-full cursor-pointer dark:hover:bg-#333" :class="contentClassName">
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
{{ tooltipContent }} {{ tooltipContent }}
</n-tooltip> </n-tooltip>
</div> </div>
<div v-else class="flex-center cursor-pointer dark:hover:bg-[#333]" :class="contentClassName"> <div v-else class="flex-center cursor-pointer dark:hover:bg-#333" :class="contentClassName">
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
@@ -41,7 +41,7 @@ const props = withDefaults(defineProps<Props>(), {
const showTooltip = computed(() => Boolean(props.tooltipContent)); const showTooltip = computed(() => Boolean(props.tooltipContent));
const contentClassName = computed( const contentClassName = computed(
() => `${props.contentClass} ${props.inverted ? 'hover:bg-primary' : 'hover:bg-[#f6f6f6]'}` () => `${props.contentClass} ${props.inverted ? 'hover:bg-primary' : 'hover:bg-#f6f6f6'}`
); );
</script> </script>

View File

@@ -8,7 +8,7 @@ import { isNumber } from '@/utils';
defineOptions({ name: 'CountTo' }); defineOptions({ name: 'CountTo' });
type TansitionKey = keyof typeof TransitionPresets; type TransitionKey = keyof typeof TransitionPresets;
interface Props { interface Props {
/** 初始值 */ /** 初始值 */
@@ -32,7 +32,7 @@ interface Props {
/** 使用缓冲动画函数 */ /** 使用缓冲动画函数 */
useEasing?: boolean; useEasing?: boolean;
/** 缓冲动画函数类型 */ /** 缓冲动画函数类型 */
transition?: TansitionKey; transition?: TransitionKey;
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {

View File

@@ -3,7 +3,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import WebSiteLink from './WebSiteLink.vue'; import WebSiteLink from './web-site-link.vue';
defineOptions({ name: 'GithubLink' }); defineOptions({ name: 'GithubLink' });

View File

@@ -11,14 +11,13 @@
<n-input v-model:value="searchValue" placeholder="搜索图标"></n-input> <n-input v-model:value="searchValue" placeholder="搜索图标"></n-input>
</template> </template>
<div v-if="iconsList.length > 0" class="grid grid-cols-9 h-auto overflow-auto"> <div v-if="iconsList.length > 0" class="grid grid-cols-9 h-auto overflow-auto">
<template v-for="iconItem in iconsList" :key="iconItem"> <span v-for="iconItem in iconsList" :key="iconItem" @click="handleChange(iconItem)">
<svg-icon <svg-icon
:icon="iconItem" :icon="iconItem"
class="border-1px border-[#d9d9d9] text-30px m-2px p-5px" class="border-1px border-#d9d9d9 text-30px m-2px p-5px cursor-pointer"
:class="{ 'border-primary': modelValue === iconItem }" :class="{ 'border-primary': modelValue === iconItem }"
@click="handleChange(iconItem)"
/> />
</template> </span>
</div> </div>
<n-empty v-else class="w-306px" description="你什么也找不到" /> <n-empty v-else class="w-306px" description="你什么也找不到" />
</n-popover> </n-popover>

View File

@@ -37,13 +37,13 @@ const bindAttrs = computed<{ class: string; style: string }>(() => ({
})); }));
const symbolId = computed(() => { const symbolId = computed(() => {
const { VITE_ICON_LOCAL_PREFFIX: preffix } = import.meta.env; const { VITE_ICON_LOCAL_PREFIX: prefix } = import.meta.env;
const defaultLocalIcon = 'no-icon'; const defaultLocalIcon = 'no-icon';
const icon = props.localIcon || defaultLocalIcon; const icon = props.localIcon || defaultLocalIcon;
return `#${preffix}-${icon}`; return `#${prefix}-${icon}`;
}); });
/** 渲染本地icon */ /** 渲染本地icon */

View File

@@ -1,14 +1,34 @@
import { effectScope, onScopeDispose, watch } from 'vue';
import { useRoute } from 'vue-router';
import { useEventListener } from '@vueuse/core'; import { useEventListener } from '@vueuse/core';
import { useI18n } from 'vue-i18n';
import { useTabStore, useThemeStore } from '@/store'; import { useTabStore, useThemeStore } from '@/store';
/** 全局事件 */ /** 全局事件 */
export function useGlobalEvents() { export function useGlobalEvents() {
const theme = useThemeStore(); const theme = useThemeStore();
const tab = useTabStore(); const tab = useTabStore();
const route = useRoute();
const { locale, t } = useI18n();
const scope = effectScope();
/** 页面离开时缓存多页签数据 */ /** 页面离开时缓存多页签数据 */
useEventListener(window, 'beforeunload', () => { useEventListener(window, 'beforeunload', () => {
theme.cacheThemeSettings(); theme.cacheThemeSettings();
tab.cacheTabRoutes(); tab.cacheTabRoutes();
}); });
scope.run(() => {
// 国际化切换时更新浏览器标签文本
watch(
() => locale.value,
() => {
document.title = route.meta.i18nTitle ? t(route.meta.i18nTitle) : route.meta.title;
}
);
});
onScopeDispose(() => {
scope.stop();
});
} }

View File

@@ -1,5 +1,5 @@
import { h } from 'vue'; import { h } from 'vue';
import SvgIcon from '@/components/custom/SvgIcon.vue'; import SvgIcon from '@/components/custom/svg-icon.vue';
/** /**
* 图标渲染 * 图标渲染

View File

@@ -4,3 +4,4 @@ export * from './layout';
export * from './events'; export * from './events';
export * from './echarts'; export * from './echarts';
export * from './icon'; export * from './icon';
export * from './websocket';

View File

@@ -1,9 +1,9 @@
import { computed } from 'vue'; import { computed, watch } from 'vue';
import { breakpointsTailwind, useBreakpoints } from '@vueuse/core'; import { breakpointsTailwind, useBreakpoints } from '@vueuse/core';
import { useAppStore, useThemeStore } from '@/store'; import { useAppStore, useThemeStore } from '@/store';
type LayoutMode = 'vertical' | 'horizontal'; type LayoutMode = 'vertical' | 'horizontal';
type LayoutHeaderProps = Record<EnumType.ThemeLayoutMode, App.GlobalHeaderProps>; type LayoutHeaderProps = Record<UnionKey.ThemeLayoutMode, App.GlobalHeaderProps>;
export function useBasicLayout() { export function useBasicLayout() {
const app = useAppStore(); const app = useAppStore();
@@ -63,6 +63,16 @@ export function useBasicLayout() {
return w; return w;
}); });
watch(
isMobile,
newValue => {
if (newValue) {
app.setSiderCollapse(true);
}
},
{ immediate: true }
);
return { return {
mode, mode,
isMobile, isMobile,

View File

@@ -19,9 +19,9 @@ export function useRouterPush(inSetup = true) {
if (newTab) { if (newTab) {
const routerData = router.resolve(to); const routerData = router.resolve(to);
window.open(routerData.href, '_blank'); window.open(routerData.href, '_blank');
} else { return Promise.resolve();
router.push(to);
} }
return router.push(to);
} }
/** 返回上一级路由 */ /** 返回上一级路由 */
@@ -42,8 +42,8 @@ export function useRouterPush(inSetup = true) {
* @param loginModule - 展示的登录模块 * @param loginModule - 展示的登录模块
* @param redirectUrl - 重定向地址(登录成功后跳转的地址),默认undefined表示取当前地址为重定向地址 * @param redirectUrl - 重定向地址(登录成功后跳转的地址),默认undefined表示取当前地址为重定向地址
*/ */
function toLogin(loginModule?: EnumType.LoginModuleKey, redirectUrl?: string) { function toLogin(loginModule?: UnionKey.LoginModule, redirectUrl?: string) {
const module: EnumType.LoginModuleKey = loginModule || 'pwd-login'; const module: UnionKey.LoginModule = loginModule || 'pwd-login';
const routeLocation: RouteLocationRaw = { const routeLocation: RouteLocationRaw = {
name: routeName('login'), name: routeName('login'),
params: { module } params: { module }
@@ -57,7 +57,7 @@ export function useRouterPush(inSetup = true) {
* 登录页切换其他模块 * 登录页切换其他模块
* @param module - 切换后的登录模块 * @param module - 切换后的登录模块
*/ */
function toLoginModule(module: EnumType.LoginModuleKey) { function toLoginModule(module: UnionKey.LoginModule) {
const { query } = route.value; const { query } = route.value;
routerPush({ name: routeName('login'), params: { module }, query }); routerPush({ name: routeName('login'), params: { module }, query });
} }

View File

@@ -2,26 +2,6 @@ import UAParser from 'ua-parser-js';
import { useAuthStore } from '@/store'; import { useAuthStore } from '@/store';
import { isArray, isString } from '@/utils'; import { isArray, isString } from '@/utils';
interface AppInfo {
/** 项目名称 */
name: string;
/** 项目标题 */
title: string;
/** 项目描述 */
desc: string;
}
/** 项目信息 */
export function useAppInfo(): AppInfo {
const { VITE_APP_NAME: name, VITE_APP_TITLE: title, VITE_APP_DESC: desc } = import.meta.env;
return {
name,
title,
desc
};
}
/** 获取设备信息 */ /** 获取设备信息 */
export function useDeviceInfo() { export function useDeviceInfo() {
const parser = new UAParser(); const parser = new UAParser();

View File

@@ -0,0 +1,50 @@
import { io } from 'socket.io-client';
import type { Socket } from 'socket.io-client';
import { useAppStore } from '../store';
type ListenEvents = {
update: (id: string, data: { name: string; age: number }) => void;
};
type EmitEvents = {
update: (id: string, data: { name: string; age: number }) => void;
};
export function useWebsocket() {
const app = useAppStore();
const socket: Socket<ListenEvents, EmitEvents> = (app.socket || io('ws://localhost:8080')) as Socket<
ListenEvents,
EmitEvents
>;
if (!app.socket) {
app.setSocket(socket);
}
function init() {
window.console.log('[socket.io] connecting...');
socket.on('connect', () => {
window.console.log('[socket.io] connected.');
});
socket.on('disconnect', () => {
window.console.log('[socket.io] disconnected.');
});
socket.on('update', (id, data) => {
window.console.log('[socket.io] update', id, data);
});
}
function handleUpdate(id: string, data: { name: string; age: number }) {
socket.emit('update', id, data);
}
init();
return {
handleUpdate
};
}

View File

@@ -2,7 +2,7 @@
export const BAIDU_MAP_SDK_URL = `https://api.map.baidu.com/getscript?v=3.0&ak=KSezYymXPth1DIGILRX3oYN9PxbOQQmU&services=&t=20210201100830&s=1`; export const BAIDU_MAP_SDK_URL = `https://api.map.baidu.com/getscript?v=3.0&ak=KSezYymXPth1DIGILRX3oYN9PxbOQQmU&services=&t=20210201100830&s=1`;
/** 高德地图sdk地址 */ /** 高德地图sdk地址 */
export const GAODE_MAP_SDK_URL = 'https://webapi.amap.com/maps?v=2.0&key=e7bd02bd504062087e6563daf4d6721d'; export const AMAP_SDK_URL = 'https://webapi.amap.com/maps?v=2.0&key=e7bd02bd504062087e6563daf4d6721d';
/** 腾讯地图sdk地址 */ /** 腾讯地图sdk地址 */
export const TENCENT_MAP_SDK_URL = 'https://map.qq.com/api/gljs?v=1.exp&key=A6DBZ-KXPLW-JKSRY-ONZF4-CPHY3-K6BL7'; export const TENCENT_MAP_SDK_URL = 'https://map.qq.com/api/gljs?v=1.exp&key=A6DBZ-KXPLW-JKSRY-ONZF4-CPHY3-K6BL7';

6
src/constants/_shared.ts Normal file
View File

@@ -0,0 +1,6 @@
export function transformObjectToOption<T extends object>(obj: T) {
return Object.entries(obj).map(([value, label]) => ({
value,
label
})) as Common.OptionWithKey<keyof T>[];
}

View File

@@ -1,13 +1,27 @@
import { $t } from '@/locales';
import { transformObjectToOption } from './_shared';
export const loginModuleLabels: Record<UnionKey.LoginModule, string> = {
'pwd-login': $t('page.login.pwdLogin.title'),
'code-login': $t('page.login.codeLogin.title'),
register: $t('page.login.register.title'),
'reset-pwd': $t('page.login.resetPwd.title'),
'bind-wechat': $t('page.login.bindWeChat.title')
};
export const userRoleLabels: Record<Auth.RoleType, string> = {
super: $t('page.login.pwdLogin.superAdmin'),
admin: $t('page.login.pwdLogin.admin'),
user: $t('page.login.pwdLogin.user')
};
export const userRoleOptions = transformObjectToOption(userRoleLabels);
/** 用户性别 */ /** 用户性别 */
export const genderLabels: Record<UserManagement.GenderKey, string> = { export const genderLabels: Record<UserManagement.GenderKey, string> = {
0: '女', 0: '女',
1: '男' 1: '男'
}; };
export const genderOptions = transformObjectToOption(genderLabels);
export const genderOptions: { value: UserManagement.GenderKey; label: string }[] = [
{ value: '0', label: genderLabels['0'] },
{ value: '1', label: genderLabels['1'] }
];
/** 用户状态 */ /** 用户状态 */
export const userStatusLabels: Record<UserManagement.UserStatusKey, string> = { export const userStatusLabels: Record<UserManagement.UserStatusKey, string> = {
@@ -16,10 +30,4 @@ export const userStatusLabels: Record<UserManagement.UserStatusKey, string> = {
3: '冻结', 3: '冻结',
4: '软删除' 4: '软删除'
}; };
export const userStatusOptions = transformObjectToOption(userStatusLabels);
export const userStatusOptions: { value: UserManagement.UserStatusKey; label: string }[] = [
{ value: '1', label: userStatusLabels['1'] },
{ value: '2', label: userStatusLabels['2'] },
{ value: '3', label: userStatusLabels['3'] },
{ value: '4', label: userStatusLabels['4'] }
];

18
src/constants/common.ts Normal file
View File

@@ -0,0 +1,18 @@
export const dataTypeLabels: { [K in TypeUtil.DataTypeStringKey]: TypeUtil.DataTypeString<K> } = {
string: '[object String]',
number: '[object Number]',
boolean: '[object Boolean]',
null: '[object Null]',
undefined: '[object Undefined]',
symbol: '[object Symbol]',
bigInt: '[object BigInt]',
object: '[object Object]',
function: '[object Function]',
array: '[object Array]',
date: '[object Date]',
regExp: '[object RegExp]',
promise: '[object Promise]',
set: '[object Set]',
map: '[object Map]',
file: '[object File]'
};

View File

@@ -1 +1,3 @@
export * from './common';
export * from './system';
export * from './business'; export * from './business';

38
src/constants/system.ts Normal file
View File

@@ -0,0 +1,38 @@
import { transformObjectToOption } from './_shared';
export const themeLayoutModeLabels: Record<UnionKey.ThemeLayoutMode, string> = {
vertical: '左侧菜单模式',
horizontal: '顶部菜单模式',
'vertical-mix': '左侧菜单混合模式',
'horizontal-mix': '顶部菜单混合模式'
};
export const themeLayoutModeOptions = transformObjectToOption(themeLayoutModeLabels);
export const themeScrollModeLabels: Record<UnionKey.ThemeScrollMode, string> = {
wrapper: '外层滚动',
content: '主体滚动'
};
export const themeScrollModeOptions = transformObjectToOption(themeScrollModeLabels);
export const themeTabModeLabels: Record<UnionKey.ThemeTabMode, string> = {
chrome: '谷歌风格',
button: '按钮风格'
};
export const themeTabModeOptions = transformObjectToOption(themeTabModeLabels);
export const themeHorizontalMenuPositionLabels: Record<UnionKey.ThemeHorizontalMenuPosition, string> = {
'flex-start': '居左',
center: '居中',
'flex-end': '居右'
};
export const themeHorizontalMenuPositionOptions = transformObjectToOption(themeHorizontalMenuPositionLabels);
export const themeAnimateModeLabels: Record<UnionKey.ThemeAnimateMode, string> = {
'zoom-fade': '渐变',
'zoom-out': '闪现',
'fade-slide': '滑动',
fade: '消退',
'fade-bottom': '底部消退',
'fade-scale': '缩放消退'
};
export const themeAnimateModeOptions = transformObjectToOption(themeAnimateModeLabels);

View File

@@ -1,15 +0,0 @@
/** 用户角色 */
export enum EnumUserRole {
super = '超级管理员',
admin = '管理员',
user = '普通用户'
}
/** 登录模块 */
export enum EnumLoginModule {
'pwd-login' = '账密登录',
'code-login' = '手机验证码登录',
'register' = '注册',
'reset-pwd' = '重置密码',
'bind-wechat' = '微信绑定'
}

View File

@@ -1,24 +0,0 @@
/** http请求头的content-type类型 */
export enum EnumContentType {
json = 'application/json',
formUrlencoded = 'application/x-www-form-urlencoded',
formData = 'multipart/form-data'
}
/** 数据类型 */
export enum EnumDataType {
number = '[object Number]',
string = '[object String]',
boolean = '[object Boolean]',
null = '[object Null]',
undefined = '[object Undefined]',
object = '[object Object]',
array = '[object Array]',
function = '[object Function]',
date = '[object Date]',
regexp = '[object RegExp]',
promise = '[object Promise]',
set = '[object Set]',
map = '[object Map]',
file = '[object File]'
}

View File

@@ -1,3 +0,0 @@
export * from './common';
export * from './system';
export * from './business';

View File

@@ -1,36 +0,0 @@
/** 布局组件的名称 */
export enum EnumLayoutComponentName {
basic = 'basic-layout',
blank = 'blank-layout'
}
/** 布局模式 */
export enum EnumThemeLayoutMode {
'vertical' = '左侧菜单模式',
'horizontal' = '顶部菜单模式',
'vertical-mix' = '左侧菜单混合模式',
'horizontal-mix' = '顶部菜单混合模式'
}
/** 多页签风格 */
export enum EnumThemeTabMode {
'chrome' = '谷歌风格',
'button' = '按钮风格'
}
/** 水平模式的菜单位置 */
export enum EnumThemeHorizontalMenuPosition {
'flex-start' = '居左',
'center' = '居中',
'flex-end' = '居右'
}
/** 过渡动画类型 */
export enum EnumThemeAnimateMode {
'zoom-fade' = '渐变',
'zoom-out' = '闪现',
'fade-slide' = '滑动',
'fade' = '消退',
'fade-bottom' = '底部消退',
'fade-scale' = '缩放消退'
}

View File

@@ -1,5 +1,5 @@
import useCountDown from './useCountDown'; import useCountDown from './use-count-down';
import useSmsCode from './useSmsCode'; import useSmsCode from './use-sms-code';
import useImageVerify from './useImageVerify'; import useImageVerify from './use-image-verify';
export { useCountDown, useSmsCode, useImageVerify }; export { useCountDown, useSmsCode, useImageVerify };

View File

@@ -0,0 +1,180 @@
import { ref, reactive } from 'vue';
import type { Ref } from 'vue';
import type { PaginationProps, DataTableBaseColumn, DataTableSelectionColumn, DataTableExpandColumn } from 'naive-ui';
import type { TableColumnGroup } from 'naive-ui/es/data-table/src/interface';
import { useLoadingEmpty } from '../common';
/**
* 接口请求函数
*/
type ApiFn<T = any, R = any> = (args: T) => Promise<Service.RequestResult<R>>;
/**
* 接口请求函数的参数
*/
type GetApiFnParameters<T extends ApiFn, R = any> = T extends (args: infer P) => Promise<Service.RequestResult<R>>
? P
: never;
/**
* 接口请求函数的返回值
*/
type GetApiFnReturnType<T extends ApiFn, P = any> = T extends (args: P) => Promise<Service.RequestResult<infer R>>
? R
: never;
/**
* 表格接口请求后转换后的数据
*/
type Transformer<TableData, Response> = (response: Response) => {
data: TableData[];
pageNum: number;
pageSize: number;
total: number;
};
/**
* 列表接口参数更新
*/
type ApiParamsUpdater<P, R> = (params: P) => R;
/**
* 分页参数
*/
type PagePropsOfPagination = Pick<PaginationProps, 'page' | 'pageSize'>;
/**
* 自定义的列 key
*/
type CustomColumnKey<K = never> = K | 'action';
/**
* 表格的列
*/
type HookTableColumn<T = Record<string, unknown>> =
| (Omit<TableColumnGroup<T>, 'key'> & { key: CustomColumnKey<keyof T> })
| (Omit<DataTableBaseColumn<T>, 'key'> & { key: CustomColumnKey<keyof T> })
| DataTableSelectionColumn<T>
| DataTableExpandColumn<T>;
/**
* 表格配置
*/
type HookTableConfig<TableData, Fn extends ApiFn> = {
/**
* 列表接口参数
*/
apiParams: GetApiFnParameters<Fn>;
/**
* 列表接口返回数据转换
*/
transformer: Transformer<TableData, GetApiFnReturnType<Fn>>;
/**
* 列表列
*/
columns: () => HookTableColumn<TableData>[];
/**
* 列表接口参数更新
* @description 用于更新分页参数, 如果列表接口的参数不包含同名分页参数属性 `page` 和 `pageSize`, 需要通过此函数更新
* @default p => p
*/
apiParamsUpdater?: ApiParamsUpdater<GetApiFnParameters<Fn> & Partial<PagePropsOfPagination>, GetApiFnParameters<Fn>>;
/**
* 列表分页参数
*/
pagination?: PaginationProps;
/**
* 是否立即请求
* @default true
*/
immediate?: boolean;
};
/**
* 通用表格 hook
* @param apiFn 接口请求函数
* @param config 表格配置
*/
export default function useHookTable<TableData, Fn extends ApiFn>(apiFn: Fn, config: HookTableConfig<TableData, Fn>) {
const { loading, startLoading, endLoading, empty, setEmpty } = useLoadingEmpty();
const { apiParams, transformer, apiParamsUpdater = p => p, immediate = true } = config;
const data: Ref<TableData[]> = ref([]);
function updateData(update: TableData[]) {
data.value = update;
}
const columns = ref(config.columns()) as Ref<HookTableColumn<TableData>[]>;
const requestParams = ref(apiParams) as Ref<HookTableConfig<TableData, Fn>['apiParams']>;
function updateRequestParamsByPagination(p: PagePropsOfPagination) {
requestParams.value = apiParamsUpdater({ ...requestParams.value, ...p });
}
const pagination = reactive({
page: 1,
pageSize: 10,
showSizePicker: true,
pageSizes: [10, 15, 20, 25, 30],
onChange: (page: number) => {
pagination.page = page;
updateRequestParamsByPagination({ page });
getData();
},
onUpdatePageSize: (pageSize: number) => {
pagination.pageSize = pageSize;
pagination.page = 1;
updateRequestParamsByPagination({ pageSize });
getData();
},
...config.pagination
}) as PaginationProps;
function updatePagination(update: Partial<PaginationProps>) {
Object.assign(pagination, update);
updateRequestParamsByPagination({ page: pagination.page, pageSize: pagination.pageSize });
}
async function getData() {
startLoading();
const { data: apiData, error } = await apiFn(requestParams.value);
if (!error && data) {
const { data: tableData, pageNum, pageSize, total } = transformer(apiData);
updateData(tableData);
setEmpty(tableData.length === 0);
updatePagination({ page: pageNum, pageSize, itemCount: total });
}
endLoading();
}
function reloadColumns() {
columns.value = config.columns();
}
if (immediate) {
getData();
}
return {
data,
columns,
loading,
empty,
pagination,
getData,
updatePagination,
reloadColumns
};
}

View File

@@ -2,7 +2,7 @@ import { computed } from 'vue';
import { REGEXP_PHONE } from '@/config'; import { REGEXP_PHONE } from '@/config';
import { fetchSmsCode } from '@/service'; import { fetchSmsCode } from '@/service';
import { useLoading } from '../common'; import { useLoading } from '../common';
import useCountDown from './useCountDown'; import useCountDown from './use-count-down';
export default function useSmsCode() { export default function useSmsCode() {
const { loading, startLoading, endLoading } = useLoading(); const { loading, startLoading, endLoading } = useLoading();

View File

@@ -1 +0,0 @@
export function useTable() {}

View File

@@ -1,7 +1,7 @@
import useContext from './useContext'; import useContext from './use-context';
import useBoolean from './useBoolean'; import useBoolean from './use-boolean';
import useLoading from './useLoading'; import useLoading from './use-loading';
import useLoadingEmpty from './useLoadingEmpty'; import useLoadingEmpty from './use-loading-empty';
import useReload from './useReload'; import useReload from './use-reload';
export { useContext, useBoolean, useLoading, useLoadingEmpty, useReload }; export { useContext, useBoolean, useLoading, useLoadingEmpty, useReload };

View File

@@ -1,4 +1,4 @@
import useBoolean from './useBoolean'; import useBoolean from './use-boolean';
export default function useLoadingEmpty(initLoading = false, initEmpty = false) { export default function useLoadingEmpty(initLoading = false, initEmpty = false) {
const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initLoading); const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initLoading);

View File

@@ -1,4 +1,4 @@
import useBoolean from './useBoolean'; import useBoolean from './use-boolean';
export default function useLoading(initValue = false) { export default function useLoading(initValue = false) {
const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue); const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue);

View File

@@ -1,5 +1,5 @@
import { nextTick } from 'vue'; import { nextTick } from 'vue';
import useBoolean from './useBoolean'; import useBoolean from './use-boolean';
/** 重载 */ /** 重载 */
export default function useReload() { export default function useReload() {

View File

@@ -2,17 +2,22 @@
<admin-layout <admin-layout
:mode="mode" :mode="mode"
:is-mobile="isMobile" :is-mobile="isMobile"
:fixed-header-and-tab="theme.fixedHeaderAndTab" :scroll-mode="theme.scrollMode"
:scroll-el-id="app.scrollElId"
:full-content="app.contentFull"
:fixed-top="theme.fixedHeaderAndTab"
:header-height="theme.header.height" :header-height="theme.header.height"
:tab-visible="theme.tab.visible" :tab-visible="theme.tab.visible"
:tab-height="theme.tab.height" :tab-height="theme.tab.height"
:content-class="app.disableMainXScroll ? 'overflow-x-hidden' : ''"
:sider-visible="siderVisible" :sider-visible="siderVisible"
:sider-collapse="app.siderCollapse"
:sider-width="siderWidth" :sider-width="siderWidth"
:sider-collapsed-width="siderCollapsedWidth" :sider-collapsed-width="siderCollapsedWidth"
:sider-collapse="app.siderCollapse"
:fixed-footer="theme.footer.fixed"
:footer-visible="theme.footer.visible" :footer-visible="theme.footer.visible"
@update:sider-collapse="app.setSiderCollapse" :fixed-footer="theme.footer.fixed"
:right-footer="theme.footer.right"
@click-mobile-sider-mask="app.setSiderCollapse(true)"
> >
<template #header> <template #header>
<global-header v-bind="headerProps" /> <global-header v-bind="headerProps" />
@@ -28,23 +33,15 @@
<global-footer /> <global-footer />
</template> </template>
</admin-layout> </admin-layout>
<global-back-top /> <n-back-top :key="theme.scrollMode" :listen-to="`#${app.scrollElId}`" class="z-100" />
<setting-drawer /> <setting-drawer />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import AdminLayout from '@soybeanjs/vue-admin-layout'; import { AdminLayout } from '@soybeanjs/vue-materials';
import { useAppStore, useThemeStore } from '@/store'; import { useAppStore, useThemeStore } from '@/store';
import { useBasicLayout } from '@/composables'; import { useBasicLayout } from '@/composables';
import { import { GlobalContent, GlobalFooter, GlobalHeader, GlobalSider, GlobalTab, SettingDrawer } from '../common';
GlobalBackTop,
GlobalContent,
GlobalFooter,
GlobalHeader,
GlobalSider,
GlobalTab,
SettingDrawer
} from '../common';
defineOptions({ name: 'BasicLayout' }); defineOptions({ name: 'BasicLayout' });
@@ -54,4 +51,12 @@ const theme = useThemeStore();
const { mode, isMobile, headerProps, siderVisible, siderWidth, siderCollapsedWidth } = useBasicLayout(); const { mode, isMobile, headerProps, siderVisible, siderWidth, siderCollapsedWidth } = useBasicLayout();
</script> </script>
<style scoped></style> <style lang="scss">
#__SCROLL_EL_ID__ {
@include scrollbar(8px, #e1e1e1);
}
.dark #__SCROLL_EL_ID__ {
@include scrollbar(8px, #555);
}
</style>

View File

@@ -1,15 +0,0 @@
<template>
<n-back-top :show="show" class="z-1000" />
</template>
<script lang="ts" setup>
import { computed } from 'vue';
import { useWindowScroll } from '@vueuse/core';
defineOptions({ name: 'GlobalBackTop' });
const { y: scrollY } = useWindowScroll();
const show = computed(() => scrollY.value > 180);
</script>
<style scoped></style>

View File

@@ -1,35 +0,0 @@
<template>
<div
:class="{ 'p-16px': showPadding }"
class="h-full bg-[#f6f9f8] dark:bg-[#101014] transition duration-300 ease-in-out"
>
<router-view v-slot="{ Component, route }">
<transition :name="theme.pageAnimateMode" mode="out-in" :appear="true">
<keep-alive :include="routeStore.cacheRoutes">
<component :is="Component" v-if="app.reloadFlag" :key="route.fullPath" />
</keep-alive>
</transition>
</router-view>
</div>
</template>
<script setup lang="ts">
import { useAppStore, useRouteStore, useThemeStore } from '@/store';
defineOptions({ name: 'GlobalContent' });
interface Props {
/** 显示padding */
showPadding?: boolean;
}
withDefaults(defineProps<Props>(), {
showPadding: true
});
const app = useAppStore();
const theme = useThemeStore();
const routeStore = useRouteStore();
</script>
<style scoped></style>

View File

@@ -1,21 +0,0 @@
import MenuCollapse from './MenuCollapse.vue';
import GlobalBreadcrumb from './GlobalBreadcrumb.vue';
import HeaderMenu from './HeaderMenu.vue';
import GithubSite from './GithubSite.vue';
import FullScreen from './FullScreen.vue';
import ThemeMode from './ThemeMode.vue';
import UserAvatar from './UserAvatar.vue';
import SystemMessage from './SystemMessage.vue';
import SettingButton from './SettingButton.vue';
export {
MenuCollapse,
GlobalBreadcrumb,
HeaderMenu,
GithubSite,
FullScreen,
ThemeMode,
UserAvatar,
SystemMessage,
SettingButton
};

View File

@@ -1,3 +0,0 @@
import SearchModal from './SearchModal.vue';
export { SearchModal };

View File

@@ -1,5 +0,0 @@
import MixMenuDetail from './MixMenuDetail.vue';
import MixMenuDrawer from './MixMenuDrawer.vue';
import MixMenuCollapse from './MixMenuCollapse.vue';
export { MixMenuDetail, MixMenuDrawer, MixMenuCollapse };

View File

@@ -1,3 +0,0 @@
import VerticalMenu from './VerticalMenu.vue';
export { VerticalMenu };

View File

@@ -1,4 +0,0 @@
import VerticalSider from './VerticalSider/index.vue';
import VerticalMixSider from './VerticalMixSider/index.vue';
export { VerticalSider, VerticalMixSider };

View File

@@ -1,3 +0,0 @@
import ContextMenu from './ContextMenu.vue';
export { ContextMenu };

View File

@@ -1,4 +0,0 @@
import TabDetail from './TabDetail/index.vue';
import ReloadButton from './ReloadButton/index.vue';
export { TabDetail, ReloadButton };

View File

@@ -1,39 +0,0 @@
<template>
<n-divider title-placement="center">主题模式</n-divider>
<n-space vertical size="large">
<setting-menu label="深色主题">
<n-switch :value="theme.darkMode" @update:value="theme.setDarkMode">
<template #checked>
<icon-mdi-white-balance-sunny class="text-14px text-primary" />
</template>
<template #unchecked>
<icon-mdi-moon-waning-crescent class="text-14px text-primary" />
</template>
</n-switch>
</setting-menu>
<setting-menu label="跟随系统">
<n-switch :value="theme.followSystemTheme" @update:value="theme.setFollowSystemTheme">
<template #checked>
<icon-ic-baseline-do-not-disturb class="text-14px text-primary" />
</template>
<template #unchecked>
<icon-ic-round-hdr-auto class="text-14px text-primary" />
</template>
</n-switch>
</setting-menu>
</n-space>
</template>
<script lang="ts" setup>
import { useThemeStore } from '@/store';
import SettingMenu from '../SettingMenu/index.vue';
defineOptions({ name: 'DarkMode' });
const theme = useThemeStore();
</script>
<style scoped>
:deep(.n-switch__rail) {
background-color: #000e1c !important;
}
</style>

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