mirror of
https://gitee.com/lyt-top/vue-next-admin
synced 2026-07-01 11:29:51 +08:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a9089b6e63 | |||
| 181af7a2eb | |||
| 99c5361de0 | |||
| aec7b928f5 | |||
| 1091524d77 | |||
| d69fe1936b | |||
| 6f9accb3c8 | |||
| 61c2f87e93 | |||
| 2adc588982 | |||
| 7f4ccfd7fd | |||
| 6325151691 | |||
| fae8ec55ea | |||
| 8189fec5b4 | |||
| ecdb9ac58c | |||
| 8de54a844b | |||
| 7544b23d7c | |||
| 225bce794b | |||
| f92574c0f2 | |||
| a91f84e3a1 |
3
.env
3
.env
@ -4,5 +4,8 @@ VITE_PORT = 8888
|
|||||||
# open 运行 npm run dev 时自动打开浏览器
|
# open 运行 npm run dev 时自动打开浏览器
|
||||||
VITE_OPEN = false
|
VITE_OPEN = false
|
||||||
|
|
||||||
|
# 打包是否开启 cdn(源文件 utils/build.ts),可自行修改
|
||||||
|
VITE_OPEN_CDN = false
|
||||||
|
|
||||||
# public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可
|
# public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可
|
||||||
VITE_PUBLIC_PATH = /vue-next-admin-preview/
|
VITE_PUBLIC_PATH = /vue-next-admin-preview/
|
||||||
37
CHANGELOG.md
37
CHANGELOG.md
@ -2,6 +2,41 @@
|
|||||||
|
|
||||||
🎉🎉🔥 `vue-next-admin` 基于 vue3.x 、Typescript、vite、Element plus 等,适配手机、平板、pc 的后台开源免费模板库(vue2.x 请切换 vue-prev-admin 分支)
|
🎉🎉🔥 `vue-next-admin` 基于 vue3.x 、Typescript、vite、Element plus 等,适配手机、平板、pc 的后台开源免费模板库(vue2.x 请切换 vue-prev-admin 分支)
|
||||||
|
|
||||||
|
## 2.4.34
|
||||||
|
|
||||||
|
`2023.04.14`
|
||||||
|
|
||||||
|
- 🌟 更新 依赖更新最新版本
|
||||||
|
- 🎯 优化 演示界面 [列表自适应](https://lyt-top.gitee.io/vue-next-admin-preview/#/pages/listAdapt) 与 [图片懒加载](https://lyt-top.gitee.io/vue-next-admin-preview/#/pages/lazyImg)
|
||||||
|
- 🐞 修复 `font-awesome.min.css` 在线 `cdn` 无法访问问题,[在线 cdn](https://lyt-top.gitee.io/vue-next-admin-doc-preview/config/build/#_3-cdn-%E5%8A%A0%E9%80%9F),感谢群友@Lauyping
|
||||||
|
|
||||||
|
## 2.4.33
|
||||||
|
|
||||||
|
`2023.04.11`
|
||||||
|
|
||||||
|
- 🌟 更新 依赖更新最新版本
|
||||||
|
- 🎉 新增 `/make/tableDemo` 中添加打印、图片预览功能
|
||||||
|
- 🐞 修复 菜单收起时(isCollapse),图标不居中问题
|
||||||
|
- 🐞 修复 演示 `权限管理 -> 前端控制 -> 页面权限` 切换不生效,感谢群友@傲世盛唐
|
||||||
|
- 🐞 修复 `"typescript": "5.x"` 中 `tsconfig.json`,`compilerOptions.suppressImplicitAnyIndexErrors` 弃用问题 [TypeScript/issues/51909](https://github.com/microsoft/TypeScript/issues/51909)、[suppressImplicitAnyIndexErrors](https://www.typescriptlang.org/tsconfig#suppressImplicitAnyIndexErrors)
|
||||||
|
- 🎨 合并 [!47cdn 打包支持 pnpm,消除无 external 的报错](https://gitee.com/lyt-top/vue-next-admin/commit/8de54a844bb54468d0bdccca158bf9bcb449f270),感谢[@yujiacheng](https://gitee.com/YujiaCheng1996)
|
||||||
|
- 🎯 优化 `layout/navBars/breadcrumb` 文件夹名称改成 `layout/navBars/topBar` 更易理解(`可全局替换`),感谢群友@傲世盛唐
|
||||||
|
- 🎯 优化 `layout/navBars/topBar/user.vue` 组件,`UserNews` 点击消息图标触发范围,改用 [element plus Popover 气泡卡片 虚拟触发方式](https://element-plus.org/zh-CN/component/popover.html#%E8%99%9A%E6%8B%9F%E8%A7%A6%E5%8F%91),防止点击消息通知背景色时不触发 `Popover` 弹出框
|
||||||
|
|
||||||
|
## 2.4.32
|
||||||
|
|
||||||
|
💔💔💔 图片不显示问题(README.md、演示中使用的图片,[vue-next-admin-images](https://gitee.com/lyt-top/vue-next-admin-images)),通过网站 [https://www.hd-r.cn/](https://www.hd-r.cn/) 转在线链接,如若侵权请联系作者 qq:1105290566
|
||||||
|
|
||||||
|
`2023.03.26`
|
||||||
|
|
||||||
|
- 🌟 更新 依赖更新最新版本
|
||||||
|
- 🐞 修复 [关于开发环境 sourceMap 的问题](https://gitee.com/lyt-top/vue-next-admin/issues/I6DNDQ),感谢[@XiaoSongJiang](https://gitee.com/XiaoSongJiang)
|
||||||
|
- 🐞 修复 打包提示 `[@vue/compiler-sfc] ::v-deep usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead.`,不能使用 `:deep {}`,而应使用 `:deep() {}`
|
||||||
|
- 🎨 合并 [feat: 一级菜单重定向为空,分栏模式下,点击一次菜单时现在会切换子菜单列表,而不是打开空白页](https://gitee.com/lyt-top/vue-next-admin/commit/a91f84e3a1a86d8d303a5b46171622913d9d0737),感谢[@写意](https://gitee.com/xjj_0906)
|
||||||
|
- 🎯 优化 经典布局分割菜单只有一项子级时,收起左侧导航菜单
|
||||||
|
- 🎯 优化 watch 监听范围
|
||||||
|
- 🎯 优化 打包:分包(manualChunks)、gzip 压缩、cdn 加速 `默认关闭 .env 中开启`(可查看文章[vue-next-admin vue3 + vite 打包 gzip 压缩、cdn 加速](https://blog.csdn.net/qq_34450741/article/details/129766676))
|
||||||
|
|
||||||
## 2.4.31
|
## 2.4.31
|
||||||
|
|
||||||
`2023.03.10`
|
`2023.03.10`
|
||||||
@ -136,7 +171,7 @@
|
|||||||
- 🎯 优化 图标选择器 icon type 类型为 all 时,类型 ali、ele、awe 回显问题
|
- 🎯 优化 图标选择器 icon type 类型为 all 时,类型 ali、ele、awe 回显问题
|
||||||
- 🎯 优化 去掉开发环境 i18n 控制台警告,页面代码:[i18n/index.ts](https://gitee.com/lyt-top/vue-next-admin/blob/master/src/i18n/index.ts)
|
- 🎯 优化 去掉开发环境 i18n 控制台警告,页面代码:[i18n/index.ts](https://gitee.com/lyt-top/vue-next-admin/blob/master/src/i18n/index.ts)
|
||||||
- 🎯 优化 `NextLoading.start()` 方法,防止第一次进入界面时出现短暂空白
|
- 🎯 优化 `NextLoading.start()` 方法,防止第一次进入界面时出现短暂空白
|
||||||
- 🎯 优化 地址栏有参数退出登录,再次登录不跳之前界面问题 `src/layout/navBars/breadcrumb/user.vue`
|
- 🎯 优化 地址栏有参数退出登录,再次登录不跳之前界面问题 `src/layout/navBars/topBar/user.vue`
|
||||||
- 🎯 优化 `SvgIcon` 组件,防止 `开启 Tagsview 图标` 时,`tagsView 右键菜单关闭` 报错问题,工作流不可连线、全屏时关闭按钮消失问题
|
- 🎯 优化 `SvgIcon` 组件,防止 `开启 Tagsview 图标` 时,`tagsView 右键菜单关闭` 报错问题,工作流不可连线、全屏时关闭按钮消失问题
|
||||||
- 🎯 优化 [如果 url 中有中文等特殊字符,第一次切换该 tab 时 keep-alive 失效#I55JS7](https://gitee.com/lyt-top/vue-next-admin/issues/I55JS7),感谢[yuyong1566](https://gitee.com/yuyong1566)
|
- 🎯 优化 [如果 url 中有中文等特殊字符,第一次切换该 tab 时 keep-alive 失效#I55JS7](https://gitee.com/lyt-top/vue-next-admin/issues/I55JS7),感谢[yuyong1566](https://gitee.com/yuyong1566)
|
||||||
- 🎯 优化 [wangEditor](https://www.wangeditor.com/) 更新到 v5,[vue3 版本线上示例中 wangeditor 富文本编辑器 demo 实例,无法换行#I5565B](https://gitee.com/lyt-top/vue-next-admin/issues/I5565B),感谢@[jenchih](https://gitee.com/jenchih)
|
- 🎯 优化 [wangEditor](https://www.wangeditor.com/) 更新到 v5,[vue3 版本线上示例中 wangeditor 富文本编辑器 demo 实例,无法换行#I5565B](https://gitee.com/lyt-top/vue-next-admin/issues/I5565B),感谢@[jenchih](https://gitee.com/jenchih)
|
||||||
|
|||||||
23
README.md
23
README.md
@ -1,5 +1,5 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="https://img-blog.csdnimg.cn/9efd5420327a46b7bd6d93524a97229d.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbHl0LXRvcA==,size_14,color_FFFFFF,t_70,g_se,x_16">
|
<img src="https://i.hd-r.cn/6ce52e5724fae609444b5b48bdc4accb.png">
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://v3.vuejs.org/" target="_blank">
|
<a href="https://v3.vuejs.org/" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/vue.js-vue3.x-green" alt="vue">
|
<img src="https://img.shields.io/badge/vue.js-vue3.x-green" alt="vue">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#### ⛱️ 线上预览
|
#### ⛱️ 线上预览
|
||||||
|
|
||||||
- vue3.x 版本预览(vue-next-admin)<a href="https://lyt-top.gitee.io/vue-next-admin-preview/#/login" target="_blank">https://lyt-top.gitee.io/vue-next-admin-preview/#/login</a>
|
- vue3.x 版本预览(vue-next-admin)<a href="http://vuenextadmin.ccfast.cc/ " target="_blank">http://vuenextadmin.ccfast.cc/ </a>
|
||||||
- vue2.x 版本预览(vue-prev-admin)<a href="https://lyt-top.gitee.io/vue-prev-admin-preview/#/login" target="_blank">https://lyt-top.gitee.io/vue-prev-admin-preview/#/login</a>
|
- vue2.x 版本预览(vue-prev-admin)<a href="https://lyt-top.gitee.io/vue-prev-admin-preview/#/login" target="_blank">https://lyt-top.gitee.io/vue-prev-admin-preview/#/login</a>
|
||||||
- vue3.x + uni-app 商城 H5(vue-next-admin-shop)<a href="https://lyt-top.gitee.io/vue-next-admin-shop-preview" target="_blank">https://lyt-top.gitee.io/vue-next-admin-shop-preview</a>
|
- vue3.x + uni-app 商城 H5(vue-next-admin-shop)<a href="https://lyt-top.gitee.io/vue-next-admin-shop-preview" target="_blank">https://lyt-top.gitee.io/vue-next-admin-shop-preview</a>
|
||||||
|
|
||||||
@ -79,18 +79,21 @@ cnpm run build
|
|||||||
|
|
||||||
#### 📚 开发文档
|
#### 📚 开发文档
|
||||||
|
|
||||||
- 查看开发文档:<a href="https://lyt-top.gitee.io/vue-next-admin-doc-preview" target="_blank">vue-next-admin-doc</a>
|
- 查看开发文档:<a href="https://lyt-top.gitee.io/vue-next-admin-doc-preview" target="_blank">https://lyt-top.gitee.io/vue-next-admin-doc-preview</a>
|
||||||
|
- 查看开发文档:<a href="https://lyt-top.github.io/vue-next-admin-doc-preview/" target="_blank">https://lyt-top.github.io/vue-next-admin-doc-preview/</a>
|
||||||
|
|
||||||
|
|
||||||
#### 💯 学习交流加 QQ 群
|
#### 💯 学习交流加 QQ 群
|
||||||
|
|
||||||
> 1 - 4 交流群已满,请加 vue-next-admin 交流群 5
|
> 群已满,请加以下群号,感谢老哥们支持!
|
||||||
|
|
||||||
群号:556254895
|
群号:931596000
|
||||||
|
|
||||||
其它交流群请查看文档首页 [vueNextAdmin 解疑问](https://lyt-top.gitee.io/vue-next-admin-doc-preview/)
|
其它交流群请查看文档首页 [vueNextAdmin 解疑问](https://lyt-top.gitee.io/vue-next-admin-doc-preview/)
|
||||||
|
|
||||||
#### 💒 集成后端
|
#### 💒 集成后端
|
||||||
|
|
||||||
|
- <a target="_blank" href="https://gitee.com/zuohuaijun/Admin.NET">@zuohuaijun Admin.NET</a>
|
||||||
- <a target="_blank" href="https://github.com/PandaGoAdmin/PandaX">@熊猫 PandaGoAdmin</a>
|
- <a target="_blank" href="https://github.com/PandaGoAdmin/PandaX">@熊猫 PandaGoAdmin</a>
|
||||||
- <a target="_blank" href="https://toscode.gitee.com/GionConnection/gopro_free">@甜蜜蜜 GoPro 平台</a>
|
- <a target="_blank" href="https://toscode.gitee.com/GionConnection/gopro_free">@甜蜜蜜 GoPro 平台</a>
|
||||||
- <a target="_blank" href="https://gitee.com/GionConnection/niupi-free">@甜蜜蜜 NiuPi 平台</a>
|
- <a target="_blank" href="https://gitee.com/GionConnection/niupi-free">@甜蜜蜜 NiuPi 平台</a>
|
||||||
@ -111,7 +114,6 @@ cnpm run build
|
|||||||
- <a href="https://github.com/vuejs/pinia" target="_blank">pinia</a>
|
- <a href="https://github.com/vuejs/pinia" target="_blank">pinia</a>
|
||||||
- <a href="https://github.com/apache/echarts" target="_blank">echarts</a>
|
- <a href="https://github.com/apache/echarts" target="_blank">echarts</a>
|
||||||
- <a href="https://github.com/axios/axios" target="_blank">axios</a>
|
- <a href="https://github.com/axios/axios" target="_blank">axios</a>
|
||||||
- <a href="https://github.com/zenorocha/clipboard.js" target="_blank">clipboard</a>
|
|
||||||
- <a href="https://github.com/inorganik/countUp.js" target="_blank">countUp</a>
|
- <a href="https://github.com/inorganik/countUp.js" target="_blank">countUp</a>
|
||||||
- <a href="https://github.com/developit/mitt" target="_blank">mitt</a>
|
- <a href="https://github.com/developit/mitt" target="_blank">mitt</a>
|
||||||
- <a href="https://github.com/rstacruz/nprogress" target="_blank">nprogress</a>
|
- <a href="https://github.com/rstacruz/nprogress" target="_blank">nprogress</a>
|
||||||
@ -122,12 +124,19 @@ cnpm run build
|
|||||||
- <a href="https://github.com/vitejs/vite" target="_blank">vite</a>
|
- <a href="https://github.com/vitejs/vite" target="_blank">vite</a>
|
||||||
- <a href="https://github.com/wangeditor-team/wangEditor" target="_blank">wangeditor</a>
|
- <a href="https://github.com/wangeditor-team/wangEditor" target="_blank">wangeditor</a>
|
||||||
- <a href="https://github.com/fengyuanchen/cropperjs" target="_blank">cropperjs</a>
|
- <a href="https://github.com/fengyuanchen/cropperjs" target="_blank">cropperjs</a>
|
||||||
- <a href="https://github.com/davidshimjs/qrcodejs" target="_blank">qrcodejs</a>
|
|
||||||
- <a href="https://github.com/crabbly/Print.js" target="_blank">print-js</a>
|
- <a href="https://github.com/crabbly/Print.js" target="_blank">print-js</a>
|
||||||
- <a href="https://github.com/jbaysolutions/vue-grid-layout" target="_blank">vue-grid-layout</a>
|
- <a href="https://github.com/jbaysolutions/vue-grid-layout" target="_blank">vue-grid-layout</a>
|
||||||
- <a href="https://github.com/antoniandre/splitpanes" target="_blank">splitpanes</a>
|
- <a href="https://github.com/antoniandre/splitpanes" target="_blank">splitpanes</a>
|
||||||
- <a href="https://github.com/jsplumb/jsplumb" target="_blank">jsplumb</a>
|
- <a href="https://github.com/jsplumb/jsplumb" target="_blank">jsplumb</a>
|
||||||
- <a href="https://github.com/hxj9102/table2excel" target="_blank">js-table2excel</a>
|
- <a href="https://github.com/hxj9102/table2excel" target="_blank">js-table2excel</a>
|
||||||
|
- <a href="https://github.com/mmf-fe/vite-plugin-cdn-import" target="_blank">vite-plugin-cdn-import</a>
|
||||||
|
- <a href="https://github.com/js-cookie/js-cookie" target="_blank">js-cookie</a>
|
||||||
|
- <a href="https://github.com/davidshimjs/qrcodejs" target="_blank">qrcodejs2-fixes</a>
|
||||||
|
- <a href="https://github.com/ljharb/qs" target="_blank">qs</a>
|
||||||
|
- <a href="https://github.com/JamieCurnow/vue-clipboard3" target="_blank">vue-clipboard3</a>
|
||||||
|
- <a href="https://github.com/intlify/vue-i18n-next" target="_blank">vue-i18n</a>
|
||||||
|
- <a href="https://github.com/vbenjs/vite-plugin-compression" target="_blank">vite-plugin-compression</a>
|
||||||
|
- <a href="https://github.com/chenxch/vite-plugin-vue-setup-extend-plus" target="_blank">vite-plugin-vue-setup-extend-plus</a>
|
||||||
|
|
||||||
#### 💕 特别感谢
|
#### 💕 特别感谢
|
||||||
|
|
||||||
|
|||||||
3513
package-lock.json
generated
3513
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
65
package.json
65
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-next-admin",
|
"name": "vue-next-admin",
|
||||||
"version": "2.4.31",
|
"version": "2.4.33",
|
||||||
"description": "vue3 vite next admin template",
|
"description": "vue3 vite next admin template",
|
||||||
"author": "lyt_20201208",
|
"author": "lyt_20201208",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -10,50 +10,53 @@
|
|||||||
"lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/"
|
"lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.1.0",
|
"@element-plus/icons-vue": "^2.3.1",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"axios": "^1.3.4",
|
"axios": "^1.6.8",
|
||||||
"countup.js": "^2.5.0",
|
"countup.js": "^2.8.0",
|
||||||
"cropperjs": "^1.5.13",
|
"cropperjs": "^1.6.1",
|
||||||
"echarts": "^5.4.1",
|
"echarts": "^5.5.0",
|
||||||
"echarts-gl": "^2.0.9",
|
"echarts-gl": "^2.0.9",
|
||||||
"echarts-wordcloud": "^2.1.0",
|
"echarts-wordcloud": "^2.1.0",
|
||||||
"element-plus": "^2.2.36",
|
"element-plus": "^2.6.1",
|
||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.5",
|
||||||
"js-table2excel": "^1.0.3",
|
"js-table2excel": "^1.1.2",
|
||||||
"jsplumb": "^2.15.6",
|
"jsplumb": "^2.15.6",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.0.33",
|
"pinia": "^2.1.7",
|
||||||
"print-js": "^1.6.0",
|
"print-js": "^1.6.0",
|
||||||
"qrcodejs2-fixes": "^0.0.2",
|
"qrcodejs2-fixes": "^0.0.2",
|
||||||
"qs": "^6.11.1",
|
"qs": "^6.12.0",
|
||||||
"screenfull": "^6.0.2",
|
"screenfull": "^6.0.2",
|
||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.2",
|
||||||
"splitpanes": "^3.1.5",
|
"splitpanes": "^3.1.5",
|
||||||
"vue": "^3.2.47",
|
"vue": "^3.4.21",
|
||||||
"vue-clipboard3": "^2.0.0",
|
"vue-clipboard3": "^2.0.0",
|
||||||
|
"vue-demi": "^0.14.7",
|
||||||
"vue-grid-layout": "^3.0.0-beta1",
|
"vue-grid-layout": "^3.0.0-beta1",
|
||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.10.2",
|
||||||
"vue-router": "^4.1.6"
|
"vue-router": "^4.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.15.0",
|
"@types/node": "^20.11.28",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.3",
|
||||||
"@types/sortablejs": "^1.15.0",
|
"@types/sortablejs": "^1.15.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.54.1",
|
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
||||||
"@typescript-eslint/parser": "^5.54.1",
|
"@typescript-eslint/parser": "^7.2.0",
|
||||||
"@vitejs/plugin-vue": "^4.0.0",
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
"@vue/compiler-sfc": "^3.2.47",
|
"@vue/compiler-sfc": "^3.4.21",
|
||||||
"eslint": "^8.35.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-plugin-vue": "^9.9.0",
|
"eslint-plugin-vue": "^9.23.0",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^3.2.5",
|
||||||
"sass": "^1.58.3",
|
"sass": "^1.72.0",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^5.4.2",
|
||||||
"vite": "^4.1.4",
|
"vite": "^5.1.6",
|
||||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
"vite-plugin-cdn-import": "^0.3.5",
|
||||||
"vue-eslint-parser": "^9.1.0"
|
"vite-plugin-compression": "^0.5.1",
|
||||||
|
"vite-plugin-vue-setup-extend-plus": "^0.1.0",
|
||||||
|
"vue-eslint-parser": "^9.4.2"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 1%",
|
"> 1%",
|
||||||
|
|||||||
@ -23,8 +23,8 @@ import setIntroduction from '/@/utils/setIconfont';
|
|||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue'));
|
const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue'));
|
||||||
const Setings = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/setings.vue'));
|
const Setings = defineAsyncComponent(() => import('/@/layout/navBars/topBar/setings.vue'));
|
||||||
const CloseFull = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/closeFull.vue'));
|
const CloseFull = defineAsyncComponent(() => import('/@/layout/navBars/topBar/closeFull.vue'));
|
||||||
const Upgrade = defineAsyncComponent(() => import('/@/layout/upgrade/index.vue'));
|
const Upgrade = defineAsyncComponent(() => import('/@/layout/upgrade/index.vue'));
|
||||||
const Sponsors = defineAsyncComponent(() => import('/@/layout/sponsors/index.vue'));
|
const Sponsors = defineAsyncComponent(() => import('/@/layout/sponsors/index.vue'));
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 58 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 26 KiB |
@ -22,7 +22,14 @@
|
|||||||
>
|
>
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<template v-if="item.type === 'image'">
|
<template v-if="item.type === 'image'">
|
||||||
<img :src="scope.row[item.key]" :width="item.width" :height="item.height" />
|
<el-image
|
||||||
|
:style="{ width: `${item.width}px`, height: `${item.height}px` }"
|
||||||
|
:src="scope.row[item.key]"
|
||||||
|
:zoom-rate="1.2"
|
||||||
|
:preview-src-list="[scope.row[item.key]]"
|
||||||
|
preview-teleported
|
||||||
|
fit="cover"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ scope.row[item.key] }}
|
{{ scope.row[item.key] }}
|
||||||
@ -56,6 +63,7 @@
|
|||||||
>
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<div class="table-footer-tool">
|
<div class="table-footer-tool">
|
||||||
|
<SvgIcon name="iconfont icon-dayin" :size="19" title="打印" @click="onPrintTable" />
|
||||||
<SvgIcon name="iconfont icon-yunxiazai_o" :size="22" title="导出" @click="onImportTable" />
|
<SvgIcon name="iconfont icon-yunxiazai_o" :size="22" title="导出" @click="onImportTable" />
|
||||||
<SvgIcon name="iconfont icon-shuaxin" :size="22" title="刷新" @click="onRefreshTable" />
|
<SvgIcon name="iconfont icon-shuaxin" :size="22" title="刷新" @click="onRefreshTable" />
|
||||||
<el-popover
|
<el-popover
|
||||||
@ -103,6 +111,7 @@
|
|||||||
<script setup lang="ts" name="netxTable">
|
<script setup lang="ts" name="netxTable">
|
||||||
import { reactive, computed, nextTick, ref } from 'vue';
|
import { reactive, computed, nextTick, ref } from 'vue';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
|
import printJs from 'print-js';
|
||||||
import table2excel from 'js-table2excel';
|
import table2excel from 'js-table2excel';
|
||||||
import Sortable from 'sortablejs';
|
import Sortable from 'sortablejs';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
@ -126,6 +135,11 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
|
// 打印标题
|
||||||
|
printName: {
|
||||||
|
type: String,
|
||||||
|
default: () => '',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// 定义子组件向父组件传值/事件
|
// 定义子组件向父组件传值/事件
|
||||||
@ -193,6 +207,37 @@ const pageReset = () => {
|
|||||||
state.page.pageSize = 10;
|
state.page.pageSize = 10;
|
||||||
emit('pageChange', state.page);
|
emit('pageChange', state.page);
|
||||||
};
|
};
|
||||||
|
// 打印
|
||||||
|
const onPrintTable = () => {
|
||||||
|
// https://printjs.crabbly.com/#documentation
|
||||||
|
// 自定义打印
|
||||||
|
let tableTh = '';
|
||||||
|
let tableTrTd = '';
|
||||||
|
let tableTd: any = {};
|
||||||
|
// 表头
|
||||||
|
props.header.forEach((v) => {
|
||||||
|
tableTh += `<th class="table-th">${v.title}</th>`;
|
||||||
|
});
|
||||||
|
// 表格内容
|
||||||
|
props.data.forEach((val, key) => {
|
||||||
|
if (!tableTd[key]) tableTd[key] = [];
|
||||||
|
props.header.forEach((v) => {
|
||||||
|
if (v.type === 'text') {
|
||||||
|
tableTd[key].push(`<td class="table-th table-center">${val[v.key]}</td>`);
|
||||||
|
} else if (v.type === 'image') {
|
||||||
|
tableTd[key].push(`<td class="table-th table-center"><img src="${val[v.key]}" style="width:${v.width}px;height:${v.height}px;"/></td>`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tableTrTd += `<tr>${tableTd[key].join('')}</tr>`;
|
||||||
|
});
|
||||||
|
// 打印
|
||||||
|
printJs({
|
||||||
|
printable: `<div style=display:flex;flex-direction:column;text-align:center><h3>${props.printName}</h3></div><table border=1 cellspacing=0><tr>${tableTh}${tableTrTd}</table>`,
|
||||||
|
type: 'raw-html',
|
||||||
|
css: ['//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css', '//unpkg.com/element-plus/dist/index.css'],
|
||||||
|
style: `@media print{.mb15{margin-bottom:15px;}.el-button--small i.iconfont{font-size: 12px !important;margin-right: 5px;}}; .table-th{word-break: break-all;white-space: pre-wrap;}.table-center{text-align: center;}`,
|
||||||
|
});
|
||||||
|
};
|
||||||
// 导出
|
// 导出
|
||||||
const onImportTable = () => {
|
const onImportTable = () => {
|
||||||
if (state.selectlist.length <= 0) return ElMessage.warning('请先选择要导出的数据');
|
if (state.selectlist.length <= 0) return ElMessage.warning('请先选择要导出的数据');
|
||||||
@ -211,7 +256,7 @@ const onSetTable = () => {
|
|||||||
animation: 150,
|
animation: 150,
|
||||||
onEnd: () => {
|
onEnd: () => {
|
||||||
const headerList: EmptyObjectType[] = [];
|
const headerList: EmptyObjectType[] = [];
|
||||||
sortable.toArray().forEach((val) => {
|
sortable.toArray().forEach((val: string) => {
|
||||||
props.header.forEach((v) => {
|
props.header.forEach((v) => {
|
||||||
if (v.key === val) headerList.push({ ...v });
|
if (v.key === val) headerList.push({ ...v });
|
||||||
});
|
});
|
||||||
|
|||||||
@ -14,14 +14,14 @@ import { useThemeConfig } from '/@/stores/themeConfig';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// element plus 自带国际化
|
// element plus 自带国际化
|
||||||
import enLocale from 'element-plus/lib/locale/lang/en';
|
import enLocale from 'element-plus/dist/locale/en';
|
||||||
import zhcnLocale from 'element-plus/lib/locale/lang/zh-cn';
|
import zhcnLocale from 'element-plus/dist/locale/zh-cn';
|
||||||
import zhtwLocale from 'element-plus/lib/locale/lang/zh-tw';
|
import zhtwLocale from 'element-plus/dist/locale/zh-tw';
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const messages = {};
|
const messages: any = {};
|
||||||
const element = { en: enLocale, 'zh-cn': zhcnLocale, 'zh-tw': zhtwLocale };
|
const element: any = { en: enLocale, 'zh-cn': zhcnLocale, 'zh-tw': zhtwLocale };
|
||||||
const itemize = { en: [], 'zh-cn': [], 'zh-tw': [] };
|
const itemize: any = { en: [], 'zh-cn': [], 'zh-tw': [] };
|
||||||
const modules: Record<string, any> = import.meta.glob('./**/*.ts', { eager: true });
|
const modules: Record<string, any> = import.meta.glob('./**/*.ts', { eager: true });
|
||||||
|
|
||||||
// 对自动引入的 modules 进行分类 en、zh-cn、zh-tw
|
// 对自动引入的 modules 进行分类 en、zh-cn、zh-tw
|
||||||
@ -33,7 +33,7 @@ for (const path in modules) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 合并数组对象(非标准数组对象,数组中对象的每项 key、value 都不同)
|
// 合并数组对象(非标准数组对象,数组中对象的每项 key、value 都不同)
|
||||||
function mergeArrObj<T>(list: T, key: string) {
|
function mergeArrObj(list: any, key: string) {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
list[key].forEach((i: EmptyObjectType) => {
|
list[key].forEach((i: EmptyObjectType) => {
|
||||||
obj = Object.assign({}, obj, i);
|
obj = Object.assign({}, obj, i);
|
||||||
|
|||||||
@ -12,7 +12,6 @@
|
|||||||
<script setup lang="ts" name="layoutAside">
|
<script setup lang="ts" name="layoutAside">
|
||||||
import { defineAsyncComponent, reactive, computed, watch, onBeforeMount, ref } from 'vue';
|
import { defineAsyncComponent, reactive, computed, watch, onBeforeMount, ref } from 'vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import pinia from '/@/stores/index';
|
|
||||||
import { useRoutesList } from '/@/stores/routesList';
|
import { useRoutesList } from '/@/stores/routesList';
|
||||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||||
@ -56,8 +55,8 @@ const setCollapseStyle = computed(() => {
|
|||||||
return [asideBrColor, 'layout-aside-mobile', 'layout-aside-mobile-close'];
|
return [asideBrColor, 'layout-aside-mobile', 'layout-aside-mobile-close'];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (layout === 'columns') {
|
if (layout === 'columns' || layout === 'classic') {
|
||||||
// 分栏布局,菜单收起时宽度给 1px
|
// 分栏布局、经典布局,菜单收起时宽度给 1px,防止切换动画消失
|
||||||
if (isCollapse) return [asideBrColor, 'layout-aside-pc-1'];
|
if (isCollapse) return [asideBrColor, 'layout-aside-pc-1'];
|
||||||
else return [asideBrColor, 'layout-aside-pc-220'];
|
else return [asideBrColor, 'layout-aside-pc-220'];
|
||||||
} else {
|
} else {
|
||||||
@ -123,6 +122,8 @@ onBeforeMount(() => {
|
|||||||
mittBus.on('setSendClassicChildren', (res: MittMenu) => {
|
mittBus.on('setSendClassicChildren', (res: MittMenu) => {
|
||||||
let { layout, isClassicSplitMenu } = themeConfig.value;
|
let { layout, isClassicSplitMenu } = themeConfig.value;
|
||||||
if (layout === 'classic' && isClassicSplitMenu) {
|
if (layout === 'classic' && isClassicSplitMenu) {
|
||||||
|
// 经典布局分割菜单只要一项子级时,收起左侧导航菜单
|
||||||
|
res.children.length <= 1 ? (themeConfig.value.isCollapse = true) : (themeConfig.value.isCollapse = false);
|
||||||
state.menuList = [];
|
state.menuList = [];
|
||||||
state.menuList = res.children;
|
state.menuList = res.children;
|
||||||
}
|
}
|
||||||
@ -138,21 +139,20 @@ onBeforeMount(() => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
||||||
watch(themeConfig.value, (val) => {
|
|
||||||
if (val.isShowLogoChange !== val.isShowLogo) {
|
|
||||||
if (layoutAsideScrollbarRef.value) layoutAsideScrollbarRef.value.update();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 监听 pinia 值的变化,动态赋值给菜单中
|
|
||||||
watch(
|
watch(
|
||||||
pinia.state,
|
() => [themeConfig.value.isShowLogoChange, themeConfig.value.isShowLogo, themeConfig.value.layout, themeConfig.value.isClassicSplitMenu],
|
||||||
(val) => {
|
([isShowLogoChange, isShowLogo, layout, isClassicSplitMenu]) => {
|
||||||
let { layout, isClassicSplitMenu } = val.themeConfig.themeConfig;
|
if (isShowLogoChange !== isShowLogo) {
|
||||||
|
if (layoutAsideScrollbarRef.value) layoutAsideScrollbarRef.value.update();
|
||||||
|
}
|
||||||
if (layout === 'classic' && isClassicSplitMenu) return false;
|
if (layout === 'classic' && isClassicSplitMenu) return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// 监听用户权限切换,用于演示 `权限管理 -> 前端控制 -> 页面权限` 权限切换不生效
|
||||||
|
watch(
|
||||||
|
() => routesList.value,
|
||||||
|
() => {
|
||||||
setFilterRoutes();
|
setFilterRoutes();
|
||||||
},
|
|
||||||
{
|
|
||||||
deep: true,
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -48,7 +48,6 @@
|
|||||||
import { reactive, ref, onMounted, nextTick, watch, onUnmounted } from 'vue';
|
import { reactive, ref, onMounted, nextTick, watch, onUnmounted } from 'vue';
|
||||||
import { useRoute, useRouter, onBeforeRouteUpdate, RouteRecordRaw } from 'vue-router';
|
import { useRoute, useRouter, onBeforeRouteUpdate, RouteRecordRaw } from 'vue-router';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import pinia from '/@/stores/index';
|
|
||||||
import { useRoutesList } from '/@/stores/routesList';
|
import { useRoutesList } from '/@/stores/routesList';
|
||||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||||
import mittBus from '/@/utils/mitt';
|
import mittBus from '/@/utils/mitt';
|
||||||
@ -81,8 +80,22 @@ const setColumnsAsideMove = (k: number) => {
|
|||||||
// 菜单高亮点击事件
|
// 菜单高亮点击事件
|
||||||
const onColumnsAsideMenuClick = async (v: RouteItem) => {
|
const onColumnsAsideMenuClick = async (v: RouteItem) => {
|
||||||
let { path, redirect } = v;
|
let { path, redirect } = v;
|
||||||
if (redirect) router.push(redirect);
|
if (redirect) {
|
||||||
else router.push(path);
|
onColumnsAsideDown(v.k);
|
||||||
|
if (route.path.startsWith(redirect)) mittBus.emit('setSendColumnsChildren', setSendChildren(redirect));
|
||||||
|
else router.push(redirect);
|
||||||
|
} else {
|
||||||
|
if (!v.children) {
|
||||||
|
router.push(path);
|
||||||
|
} else {
|
||||||
|
// 显示子级菜单
|
||||||
|
const resData: MittMenu = setSendChildren(path);
|
||||||
|
if (Object.keys(resData).length <= 0) return false;
|
||||||
|
onColumnsAsideDown(resData.item?.k);
|
||||||
|
mittBus.emit('setSendColumnsChildren', resData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 一个路由设置自动收起菜单
|
// 一个路由设置自动收起菜单
|
||||||
// https://gitee.com/lyt-top/vue-next-admin/issues/I6HW7H
|
// https://gitee.com/lyt-top/vue-next-admin/issues/I6HW7H
|
||||||
if (!v.children) themeConfig.value.isCollapse = true;
|
if (!v.children) themeConfig.value.isCollapse = true;
|
||||||
@ -114,16 +127,23 @@ const onColumnsAsideDown = (k: number) => {
|
|||||||
setColumnsAsideMove(k);
|
setColumnsAsideMove(k);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 设置只有一个路由时设置自动收起菜单
|
||||||
|
// https://gitee.com/lyt-top/vue-next-admin/issues/I6UW2I
|
||||||
|
const setMenuAutoCollaps = (path: string) => {
|
||||||
|
const resData: MittMenu = setSendChildren(path);
|
||||||
|
// https://gitee.com/lyt-top/vue-next-admin/issues/I6HW7H
|
||||||
|
resData.children.length <= 1 ? (themeConfig.value.isCollapse = true) : (themeConfig.value.isCollapse = false);
|
||||||
|
return resData;
|
||||||
|
};
|
||||||
// 设置/过滤路由(非静态路由/是否显示在菜单中)
|
// 设置/过滤路由(非静态路由/是否显示在菜单中)
|
||||||
const setFilterRoutes = () => {
|
const setFilterRoutes = () => {
|
||||||
state.columnsAsideList = filterRoutesFun(routesList.value);
|
state.columnsAsideList = filterRoutesFun(routesList.value);
|
||||||
const resData: MittMenu = setSendChildren(route.path);
|
const resData: MittMenu = setMenuAutoCollaps(route.path);
|
||||||
if (Object.keys(resData).length <= 0) return false;
|
|
||||||
onColumnsAsideDown(resData.item?.k);
|
onColumnsAsideDown(resData.item?.k);
|
||||||
// 刷新时,初始化一个路由设置自动收起菜单
|
// 延迟 500 毫秒更新,防止 aside.vue 组件 setSendColumnsChildren 还没有注册
|
||||||
// https://gitee.com/lyt-top/vue-next-admin/issues/I6HW7H
|
setTimeout(() => {
|
||||||
resData.children.length <= 1 ? (themeConfig.value.isCollapse = true) : (themeConfig.value.isCollapse = false);
|
mittBus.emit('setSendColumnsChildren', resData);
|
||||||
mittBus.emit('setSendColumnsChildren', resData);
|
}, 500);
|
||||||
};
|
};
|
||||||
// 传送当前子级数据到菜单中
|
// 传送当前子级数据到菜单中
|
||||||
const setSendChildren = (path: string) => {
|
const setSendChildren = (path: string) => {
|
||||||
@ -176,15 +196,16 @@ onUnmounted(() => {
|
|||||||
});
|
});
|
||||||
// 路由更新时
|
// 路由更新时
|
||||||
onBeforeRouteUpdate((to) => {
|
onBeforeRouteUpdate((to) => {
|
||||||
|
const resData = setMenuAutoCollaps(to.path);
|
||||||
setColumnsMenuHighlight(to.path);
|
setColumnsMenuHighlight(to.path);
|
||||||
mittBus.emit('setSendColumnsChildren', setSendChildren(to.path));
|
mittBus.emit('setSendColumnsChildren', resData);
|
||||||
});
|
});
|
||||||
// 监听布局配置信息的变化,动态增加菜单高亮位置移动像素
|
// 监听布局配置信息的变化,动态增加菜单高亮位置移动像素
|
||||||
watch(
|
watch(
|
||||||
pinia.state,
|
[() => themeConfig.value.columnsAsideStyle, isColumnsMenuHover, isColumnsNavHover],
|
||||||
(val) => {
|
() => {
|
||||||
val.themeConfig.themeConfig.columnsAsideStyle === 'columnsRound' ? (state.difference = 3) : (state.difference = 0);
|
themeConfig.value.columnsAsideStyle === 'columnsRound' ? (state.difference = 3) : (state.difference = 0);
|
||||||
if (!val.routesList.isColumnsMenuHover && !val.routesList.isColumnsNavHover) {
|
if (!isColumnsMenuHover.value && !isColumnsNavHover.value) {
|
||||||
state.liHoverIndex = null;
|
state.liHoverIndex = null;
|
||||||
mittBus.emit('setSendColumnsChildren', setSendChildren(route.path));
|
mittBus.emit('setSendColumnsChildren', setSendChildren(route.path));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -213,7 +213,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
.layout-lock-screen-img {
|
.layout-lock-screen-img {
|
||||||
@extend .layout-lock-screen-fixed;
|
@extend .layout-lock-screen-fixed;
|
||||||
background-image: url('https://img-blog.csdnimg.cn/afa9c317667f47d5bea34b85af45979e.png#pic_center');
|
background-image: url('https://i.hd-r.cn/e4a19d84364f185266666765ac21a5db.jpg');
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
z-index: 9999991;
|
z-index: 9999991;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,11 +58,13 @@ watch(
|
|||||||
initScrollBarHeight();
|
initScrollBarHeight();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
// 监听 themeConfig isTagsview 配置文件的变化,更新菜单 el-scrollbar 的高度
|
||||||
watch(
|
watch(
|
||||||
themeConfig,
|
() => themeConfig.value.isTagsview,
|
||||||
() => {
|
() => {
|
||||||
updateScrollbar();
|
nextTick(() => {
|
||||||
|
updateScrollbar();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|||||||
@ -60,9 +60,11 @@ watch(
|
|||||||
);
|
);
|
||||||
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
||||||
watch(
|
watch(
|
||||||
themeConfig,
|
() => [themeConfig.value.isTagsview, themeConfig.value.isFixedHeader],
|
||||||
() => {
|
() => {
|
||||||
updateScrollbar();
|
nextTick(() => {
|
||||||
|
updateScrollbar();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|||||||
@ -60,9 +60,11 @@ watch(
|
|||||||
);
|
);
|
||||||
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
||||||
watch(
|
watch(
|
||||||
themeConfig,
|
() => [themeConfig.value.isTagsview, themeConfig.value.isFixedHeader],
|
||||||
() => {
|
() => {
|
||||||
updateScrollbar();
|
nextTick(() => {
|
||||||
|
updateScrollbar();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|||||||
@ -47,9 +47,11 @@ watch(
|
|||||||
);
|
);
|
||||||
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
||||||
watch(
|
watch(
|
||||||
themeConfig,
|
() => themeConfig.value.isTagsview,
|
||||||
() => {
|
() => {
|
||||||
updateScrollbar();
|
nextTick(() => {
|
||||||
|
updateScrollbar();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { storeToRefs } from 'pinia';
|
|||||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const BreadcrumbIndex = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/index.vue'));
|
const BreadcrumbIndex = defineAsyncComponent(() => import('/@/layout/navBars/topBar/index.vue'));
|
||||||
const TagsView = defineAsyncComponent(() => import('/@/layout/navBars/tagsView/tagsView.vue'));
|
const TagsView = defineAsyncComponent(() => import('/@/layout/navBars/tagsView/tagsView.vue'));
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
|
|||||||
@ -52,7 +52,6 @@ import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router';
|
|||||||
import Sortable from 'sortablejs';
|
import Sortable from 'sortablejs';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import pinia from '/@/stores/index';
|
|
||||||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||||
import { useKeepALiveNames } from '/@/stores/keepAliveNames';
|
import { useKeepALiveNames } from '/@/stores/keepAliveNames';
|
||||||
@ -586,9 +585,9 @@ onBeforeRouteUpdate(async (to) => {
|
|||||||
});
|
});
|
||||||
// 监听路由的变化,动态赋值给 tagsView
|
// 监听路由的变化,动态赋值给 tagsView
|
||||||
watch(
|
watch(
|
||||||
pinia.state,
|
() => tagsViewRoutes.value,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val.tagsViewRoutes.tagsViewRoutes.length === state.tagsViewRoutesList.length) return false;
|
if (val.length === state.tagsViewRoutesList.length) return false;
|
||||||
getTagsViewRoutes();
|
getTagsViewRoutes();
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,8 +16,8 @@ import { useThemeConfig } from '/@/stores/themeConfig';
|
|||||||
import mittBus from '/@/utils/mitt';
|
import mittBus from '/@/utils/mitt';
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue'));
|
const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/topBar/breadcrumb.vue'));
|
||||||
const User = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/user.vue'));
|
const User = defineAsyncComponent(() => import('/@/layout/navBars/topBar/user.vue'));
|
||||||
const Logo = defineAsyncComponent(() => import('/@/layout/logo/index.vue'));
|
const Logo = defineAsyncComponent(() => import('/@/layout/logo/index.vue'));
|
||||||
const Horizontal = defineAsyncComponent(() => import('/@/layout/navMenu/horizontal.vue'));
|
const Horizontal = defineAsyncComponent(() => import('/@/layout/navMenu/horizontal.vue'));
|
||||||
|
|
||||||
@ -102,6 +102,8 @@ defineExpose({
|
|||||||
.layout-search-dialog {
|
.layout-search-dialog {
|
||||||
position: relative;
|
position: relative;
|
||||||
:deep(.el-dialog) {
|
:deep(.el-dialog) {
|
||||||
|
background: unset;
|
||||||
|
box-shadow: unset;
|
||||||
.el-dialog__header,
|
.el-dialog__header,
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
display: none;
|
display: none;
|
||||||
@ -36,20 +36,25 @@
|
|||||||
<div class="layout-navbars-breadcrumb-user-icon" @click="onLayoutSetingClick">
|
<div class="layout-navbars-breadcrumb-user-icon" @click="onLayoutSetingClick">
|
||||||
<i class="icon-skin iconfont" :title="$t('message.user.title3')"></i>
|
<i class="icon-skin iconfont" :title="$t('message.user.title3')"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="layout-navbars-breadcrumb-user-icon">
|
<div class="layout-navbars-breadcrumb-user-icon" ref="userNewsBadgeRef" v-click-outside="onUserNewsClick">
|
||||||
<el-popover placement="bottom" trigger="click" transition="el-zoom-in-top" :width="300" :persistent="false">
|
<el-badge :is-dot="true">
|
||||||
<template #reference>
|
<el-icon :title="$t('message.user.title4')">
|
||||||
<el-badge :is-dot="true">
|
<ele-Bell />
|
||||||
<el-icon :title="$t('message.user.title4')">
|
</el-icon>
|
||||||
<ele-Bell />
|
</el-badge>
|
||||||
</el-icon>
|
|
||||||
</el-badge>
|
|
||||||
</template>
|
|
||||||
<template #default>
|
|
||||||
<UserNews />
|
|
||||||
</template>
|
|
||||||
</el-popover>
|
|
||||||
</div>
|
</div>
|
||||||
|
<el-popover
|
||||||
|
ref="userNewsRef"
|
||||||
|
:virtual-ref="userNewsBadgeRef"
|
||||||
|
placement="bottom"
|
||||||
|
trigger="click"
|
||||||
|
transition="el-zoom-in-top"
|
||||||
|
virtual-triggering
|
||||||
|
:width="300"
|
||||||
|
:persistent="false"
|
||||||
|
>
|
||||||
|
<UserNews />
|
||||||
|
</el-popover>
|
||||||
<div class="layout-navbars-breadcrumb-user-icon mr10" @click="onScreenfullClick">
|
<div class="layout-navbars-breadcrumb-user-icon mr10" @click="onScreenfullClick">
|
||||||
<i
|
<i
|
||||||
class="iconfont"
|
class="iconfont"
|
||||||
@ -81,9 +86,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="layoutBreadcrumbUser">
|
<script setup lang="ts" name="layoutBreadcrumbUser">
|
||||||
import { defineAsyncComponent, ref, computed, reactive, onMounted } from 'vue';
|
import { defineAsyncComponent, ref, unref, computed, reactive, onMounted } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox, ElMessage, ClickOutside as vClickOutside } from 'element-plus';
|
||||||
import screenfull from 'screenfull';
|
import screenfull from 'screenfull';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
@ -94,10 +99,12 @@ import mittBus from '/@/utils/mitt';
|
|||||||
import { Session, Local } from '/@/utils/storage';
|
import { Session, Local } from '/@/utils/storage';
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const UserNews = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/userNews.vue'));
|
const UserNews = defineAsyncComponent(() => import('/@/layout/navBars/topBar/userNews.vue'));
|
||||||
const Search = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/search.vue'));
|
const Search = defineAsyncComponent(() => import('/@/layout/navBars/topBar/search.vue'));
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
|
const userNewsRef = ref();
|
||||||
|
const userNewsBadgeRef = ref();
|
||||||
const { locale, t } = useI18n();
|
const { locale, t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const stores = useUserInfo();
|
const stores = useUserInfo();
|
||||||
@ -132,6 +139,10 @@ const onScreenfullClick = () => {
|
|||||||
else state.isScreenfull = false;
|
else state.isScreenfull = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 消息通知点击时
|
||||||
|
const onUserNewsClick = () => {
|
||||||
|
unref(userNewsRef).popperRef?.delayHide?.();
|
||||||
|
};
|
||||||
// 布局配置 icon 点击时
|
// 布局配置 icon 点击时
|
||||||
const onLayoutSetingClick = () => {
|
const onLayoutSetingClick = () => {
|
||||||
mittBus.emit('openSetingsDrawer');
|
mittBus.emit('openSetingsDrawer');
|
||||||
@ -199,7 +210,7 @@ const onLanguageChange = (lang: string) => {
|
|||||||
};
|
};
|
||||||
// 初始化组件大小/i18n
|
// 初始化组件大小/i18n
|
||||||
const initI18nOrSize = (value: string, attr: string) => {
|
const initI18nOrSize = (value: string, attr: string) => {
|
||||||
state[attr] = Local.get('themeConfig')[value];
|
(<any>state)[attr] = Local.get('themeConfig')[value];
|
||||||
};
|
};
|
||||||
// 页面加载时
|
// 页面加载时
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@ -91,9 +91,9 @@ onBeforeRouteUpdate((to) => {
|
|||||||
});
|
});
|
||||||
// 设置菜单的收起/展开
|
// 设置菜单的收起/展开
|
||||||
watch(
|
watch(
|
||||||
themeConfig.value,
|
() => themeConfig.value.isCollapse,
|
||||||
() => {
|
(isCollapse) => {
|
||||||
document.body.clientWidth <= 1000 ? (state.isCollapse = false) : (state.isCollapse = themeConfig.value.isCollapse);
|
document.body.clientWidth <= 1000 ? (state.isCollapse = false) : (state.isCollapse = isCollapse);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|||||||
@ -22,7 +22,7 @@ const state = reactive({
|
|||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
url: sponsorsOne,
|
url: sponsorsOne,
|
||||||
text: `驰骋BPM系统包含表单引擎+流程引擎+权限控制,方便集成,配置灵活,功能强大,适合中国国情的工作流引擎.演示:http://demo.ccflow.org。右上角点star方可加群: 1060674395`,
|
text: `驰骋BPM系统包含表单引擎+流程引擎+权限控制,方便集成,配置灵活,功能强大,适合中国国情的工作流引擎.演示:http://demo.ccflow.org。`,
|
||||||
link: 'http://www.ccflow.org/',
|
link: 'http://www.ccflow.org/',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@ -86,6 +86,7 @@ onMounted(() => {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.upgrade-dialog {
|
.upgrade-dialog {
|
||||||
:deep(.el-dialog) {
|
:deep(.el-dialog) {
|
||||||
|
padding: 0 !important;
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export async function initBackEndControlRoutes() {
|
|||||||
// 添加动态路由
|
// 添加动态路由
|
||||||
await setAddRoute();
|
await setAddRoute();
|
||||||
// 设置路由到 pinia routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组
|
// 设置路由到 pinia routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组
|
||||||
await setFilterMenuAndCacheTagsViewRoutes();
|
setFilterMenuAndCacheTagsViewRoutes();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -32,7 +32,7 @@ export async function initFrontEndControlRoutes() {
|
|||||||
// 添加动态路由
|
// 添加动态路由
|
||||||
await setAddRoute();
|
await setAddRoute();
|
||||||
// 设置递归过滤有权限的路由到 pinia routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组
|
// 设置递归过滤有权限的路由到 pinia routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组
|
||||||
await setFilterMenuAndCacheTagsViewRoutes();
|
setFilterMenuAndCacheTagsViewRoutes();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -121,7 +121,7 @@ export const useThemeConfig = defineStore('themeConfig', {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 布局切换
|
* 布局切换
|
||||||
* 注意:为了演示,切换布局时,颜色会被还原成默认,代码位置:/@/layout/navBars/breadcrumb/setings.vue
|
* 注意:为了演示,切换布局时,颜色会被还原成默认,代码位置:/@/layout/navBars/topBar/setings.vue
|
||||||
* 中的 `initSetLayoutChange(设置布局切换,重置主题样式)` 方法
|
* 中的 `initSetLayoutChange(设置布局切换,重置主题样式)` 方法
|
||||||
*/
|
*/
|
||||||
// 布局切换:可选值"<defaults|classic|transverse|columns>",默认 defaults
|
// 布局切换:可选值"<defaults|classic|transverse|columns>",默认 defaults
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export const useUserInfo = defineStore('userInfo', {
|
|||||||
if (Session.get('userInfo')) {
|
if (Session.get('userInfo')) {
|
||||||
this.userInfos = Session.get('userInfo');
|
this.userInfos = Session.get('userInfo');
|
||||||
} else {
|
} else {
|
||||||
const userInfos: any = await this.getApiUserInfo();
|
const userInfos = <UserInfos>await this.getApiUserInfo();
|
||||||
this.userInfos = userInfos;
|
this.userInfos = userInfos;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -63,6 +63,7 @@ export const useUserInfo = defineStore('userInfo', {
|
|||||||
roles: defaultRoles,
|
roles: defaultRoles,
|
||||||
authBtnList: defaultAuthBtnList,
|
authBtnList: defaultAuthBtnList,
|
||||||
};
|
};
|
||||||
|
Session.set('userInfo', userInfos);
|
||||||
resolve(userInfos);
|
resolve(userInfos);
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -141,6 +141,8 @@ body,
|
|||||||
.layout-aside-pc-1 {
|
.layout-aside-pc-1 {
|
||||||
width: 1px !important;
|
width: 1px !important;
|
||||||
transition: width 0.3s ease;
|
transition: width 0.3s ease;
|
||||||
|
position: relative;
|
||||||
|
left: -1px;
|
||||||
}
|
}
|
||||||
// 手机端左侧导航样式
|
// 手机端左侧导航样式
|
||||||
.layout-aside-mobile {
|
.layout-aside-mobile {
|
||||||
|
|||||||
@ -188,6 +188,18 @@
|
|||||||
color: var(--next-bg-topBarColor);
|
color: var(--next-bg-topBarColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 菜单收起时,图标不居中问题
|
||||||
|
.el-menu--collapse {
|
||||||
|
.el-menu-item .iconfont,
|
||||||
|
.el-sub-menu .iconfont,
|
||||||
|
.el-menu-item .fa,
|
||||||
|
.el-sub-menu .fa {
|
||||||
|
margin-right: 0 !important;
|
||||||
|
}
|
||||||
|
.el-sub-menu__title {
|
||||||
|
padding-right: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Tabs 标签页
|
/* Tabs 标签页
|
||||||
------------------------------- */
|
------------------------------- */
|
||||||
|
|||||||
@ -7,6 +7,10 @@
|
|||||||
.el-message-box {
|
.el-message-box {
|
||||||
width: 80% !important;
|
width: 80% !important;
|
||||||
}
|
}
|
||||||
|
// 锁屏页
|
||||||
|
.layout-lock-screen-date-top {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 页面宽度小于768px
|
/* 页面宽度小于768px
|
||||||
|
|||||||
5
src/types/global.d.ts
vendored
5
src/types/global.d.ts
vendored
@ -7,6 +7,9 @@ declare module '@wangeditor/editor-for-vue';
|
|||||||
declare module 'js-table2excel';
|
declare module 'js-table2excel';
|
||||||
declare module 'qs';
|
declare module 'qs';
|
||||||
declare module 'sortablejs';
|
declare module 'sortablejs';
|
||||||
|
declare module 'element-plus/dist/locale/en';
|
||||||
|
declare module 'element-plus/dist/locale/zh-cn';
|
||||||
|
declare module 'element-plus/dist/locale/zh-tw';
|
||||||
|
|
||||||
// 声明一个模块,防止引入文件时报错
|
// 声明一个模块,防止引入文件时报错
|
||||||
declare module '*.json';
|
declare module '*.json';
|
||||||
@ -27,6 +30,8 @@ declare module '*.vue' {
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
declare interface Window {
|
declare interface Window {
|
||||||
nextLoading: boolean;
|
nextLoading: boolean;
|
||||||
|
BMAP_SATELLITE_MAP: any;
|
||||||
|
BMap: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 声明路由当前项类型
|
// 声明路由当前项类型
|
||||||
|
|||||||
19
src/types/pinia.d.ts
vendored
19
src/types/pinia.d.ts
vendored
@ -3,15 +3,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
declare interface UserInfosState<T = any> {
|
declare interface UserInfos<T = any> {
|
||||||
userInfos: {
|
authBtnList: string[];
|
||||||
authBtnList: string[];
|
photo: string;
|
||||||
photo: string;
|
roles: string[];
|
||||||
roles: string[];
|
time: number;
|
||||||
time: number;
|
userName: string;
|
||||||
userName: string;
|
[key: string]: T;
|
||||||
[key: string]: T;
|
}
|
||||||
};
|
declare interface UserInfosState {
|
||||||
|
userInfos: UserInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 路由缓存列表
|
// 路由缓存列表
|
||||||
|
|||||||
1
src/types/views.d.ts
vendored
1
src/types/views.d.ts
vendored
@ -325,5 +325,6 @@ declare type TableDemoState = {
|
|||||||
};
|
};
|
||||||
search: TableSearchType[];
|
search: TableSearchType[];
|
||||||
param: EmptyObjectType;
|
param: EmptyObjectType;
|
||||||
|
printName: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
125
src/utils/build.ts
Normal file
125
src/utils/build.ts
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
import importToCDN from 'vite-plugin-cdn-import';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打包相关
|
||||||
|
* 注意 prodUrl:使用的是 jsdelivr 还是 unpkg。它们的 path 可能不一致
|
||||||
|
* 文章链接:https://blog.csdn.net/qq_34450741/article/details/129766676,使用的是 jsdelivr
|
||||||
|
* @description importToCDN https://github.com/mmf-fe/vite-plugin-cdn-import
|
||||||
|
* @description cdn 在线引入的 cdn 地址配置。path:https://www.jsdelivr.com/ || https://unpkg.com/
|
||||||
|
* @description external 打包时,过滤包导入。参考:https://rollupjs.org/configuration-options/#external
|
||||||
|
*/
|
||||||
|
export const buildConfig = {
|
||||||
|
cdn() {
|
||||||
|
return importToCDN({
|
||||||
|
prodUrl: 'https://unpkg.com/{name}@{version}/{path}',
|
||||||
|
modules: [
|
||||||
|
// autoComplete('vue'),
|
||||||
|
// autoComplete('axios'),
|
||||||
|
{
|
||||||
|
name: 'vue',
|
||||||
|
var: 'Vue',
|
||||||
|
path: 'dist/vue.global.js',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'vue-demi',
|
||||||
|
var: 'VueDemi',
|
||||||
|
path: 'lib/index.iife.js',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'vue-router',
|
||||||
|
var: 'VueRouter',
|
||||||
|
path: 'dist/vue-router.global.js',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'element-plus',
|
||||||
|
var: 'ElementPlus',
|
||||||
|
path: 'dist/index.full.js',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '@element-plus/icons-vue',
|
||||||
|
// var: 'ElementPlusIconsVue',
|
||||||
|
// path: 'dist/index.iife.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'echarts',
|
||||||
|
// var: 'echarts',
|
||||||
|
// path: 'dist/echarts.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'echarts-gl',
|
||||||
|
// var: 'echarts-gl',
|
||||||
|
// path: 'dist/echarts-gl.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'echarts-wordcloud',
|
||||||
|
// var: 'echarts-wordcloud',
|
||||||
|
// path: 'dist/echarts-wordcloud.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'vue-i18n',
|
||||||
|
// var: 'VueI18n',
|
||||||
|
// path: 'dist/vue-i18n.global.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'jsplumb',
|
||||||
|
// var: 'jsPlumb',
|
||||||
|
// path: 'dist/js/jsplumb.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'cropperjs',
|
||||||
|
// var: 'Cropper',
|
||||||
|
// path: 'dist/cropper.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'sortablejs',
|
||||||
|
// var: 'Sortable',
|
||||||
|
// path: 'Sortable.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'qrcodejs2-fixes',
|
||||||
|
// var: 'QRCode',
|
||||||
|
// path: 'qrcode.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'print-js',
|
||||||
|
// var: 'printJS',
|
||||||
|
// path: 'dist/print.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: '@wangeditor/editor',
|
||||||
|
// var: 'wangEditor',
|
||||||
|
// path: 'dist/index.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: '@wangeditor/editor-for-vue',
|
||||||
|
// var: 'WangEditorForVue',
|
||||||
|
// path: 'dist/index.min.js',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'vue-grid-layout',
|
||||||
|
// var: 'VueGridLayout',
|
||||||
|
// path: 'https://cdn.jsdelivr.net/npm/vue-grid-layout@3.0.0-beta1/dist/vue-grid-layout.umd.min.js',
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
external: [
|
||||||
|
'vue',
|
||||||
|
// 'axios',
|
||||||
|
'vue-router',
|
||||||
|
'element-plus',
|
||||||
|
// '@element-plus/icons-vue',
|
||||||
|
// 'echarts',
|
||||||
|
// 'echarts-gl',
|
||||||
|
// 'echarts-wordcloud',
|
||||||
|
// 'vue-i18n',
|
||||||
|
// 'jsplumb',
|
||||||
|
// 'cropperjs',
|
||||||
|
// 'sortablejs',
|
||||||
|
// 'qrcodejs2-fixes',
|
||||||
|
// 'print-js',
|
||||||
|
// '@wangeditor/editor',
|
||||||
|
// '@wangeditor/editor-for-vue',
|
||||||
|
// 'vue-grid-layout',
|
||||||
|
],
|
||||||
|
};
|
||||||
@ -51,7 +51,7 @@ const getAwesomeIconfont = () => {
|
|||||||
let sheetsList = [];
|
let sheetsList = [];
|
||||||
let sheetsIconList = [];
|
let sheetsIconList = [];
|
||||||
for (let i = 0; i < styles.length; i++) {
|
for (let i = 0; i < styles.length; i++) {
|
||||||
if (styles[i].href && styles[i].href.indexOf('netdna.bootstrapcdn.com') > -1) {
|
if (styles[i].href && styles[i].href.indexOf('https://cdn.jsdelivr.net') > -1) {
|
||||||
sheetsList.push(styles[i]);
|
sheetsList.push(styles[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ service.interceptors.response.use(
|
|||||||
}
|
}
|
||||||
return Promise.reject(service.interceptors.response);
|
return Promise.reject(service.interceptors.response);
|
||||||
} else {
|
} else {
|
||||||
return response.data;
|
return res;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// 字体图标 url
|
// 字体图标 url
|
||||||
const cssCdnUrlList: Array<string> = [
|
const cssCdnUrlList: Array<string> = [
|
||||||
'//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css',
|
'//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css',
|
||||||
'//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
|
'https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css',
|
||||||
];
|
];
|
||||||
// 第三方 js url
|
// 第三方 js url
|
||||||
const jsCdnUrlList: Array<string> = [];
|
const jsCdnUrlList: Array<string> = [];
|
||||||
|
|||||||
@ -13,9 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<img
|
<img src="https://i.hd-r.cn/2cf0d2e192660eec23eb9d0655753e7d.png" />
|
||||||
src="https://img-blog.csdnimg.cn/3333f265772a4fa89287993500ecbf96.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbHl0LXRvcA==,size_16,color_FFFFFF,t_70,g_se,x_16"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -13,9 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<img
|
<img src="https://i.hd-r.cn/1a0d90a6c1e8b0184c7299dda713effd.png" />
|
||||||
src="https://img-blog.csdnimg.cn/9eb1d85a417f4ed1ba7107f149ce3da1.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbHl0LXRvcA==,size_16,color_FFFFFF,t_70,g_se,x_16"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -27,6 +27,7 @@ import { onMounted, ref } from 'vue';
|
|||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useUserInfo } from '/@/stores/userInfo';
|
import { useUserInfo } from '/@/stores/userInfo';
|
||||||
|
import { Session } from '/@/utils/storage';
|
||||||
import { frontEndsResetRoute, setAddRoute, setFilterMenuAndCacheTagsViewRoutes } from '/@/router/frontEnd';
|
import { frontEndsResetRoute, setAddRoute, setFilterMenuAndCacheTagsViewRoutes } from '/@/router/frontEnd';
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
@ -40,6 +41,9 @@ const initUserAuth = () => {
|
|||||||
};
|
};
|
||||||
// 用户权限改变时
|
// 用户权限改变时
|
||||||
const onRadioChange = async () => {
|
const onRadioChange = async () => {
|
||||||
|
// 清空之前缓存的 userInfo,防止不请求接口。
|
||||||
|
// stores/userInfo.ts
|
||||||
|
Session.remove('userInfo');
|
||||||
// 模拟数据
|
// 模拟数据
|
||||||
frontEndsResetRoute();
|
frontEndsResetRoute();
|
||||||
Cookies.set('userName', userAuth.value);
|
Cookies.set('userName', userAuth.value);
|
||||||
|
|||||||
@ -71,6 +71,8 @@ const state = reactive<TableDemoState>({
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
|
// 打印标题
|
||||||
|
printName: 'vueNextAdmin 表格打印演示',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -226,6 +226,9 @@ const onHandleCurrentChange = (val: number) => {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
margin: 0 -5px;
|
margin: 0 -5px;
|
||||||
|
.el-row {
|
||||||
|
width: 101%;
|
||||||
|
}
|
||||||
.flex-warp-item {
|
.flex-warp-item {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -99,6 +99,9 @@ onMounted(() => {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
margin: 0 -5px;
|
margin: 0 -5px;
|
||||||
|
.el-row {
|
||||||
|
width: 101%;
|
||||||
|
}
|
||||||
.flex-warp-item {
|
.flex-warp-item {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -93,6 +93,9 @@ const onHandleCurrentChange = (val: number) => {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
margin: 0 -5px;
|
margin: 0 -5px;
|
||||||
|
.el-row {
|
||||||
|
width: 101%;
|
||||||
|
}
|
||||||
.flex-warp-item {
|
.flex-warp-item {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="layout-pd">
|
<div class="layout-pd">
|
||||||
<el-card shadow="hover" header="表单表格验证">
|
<el-card shadow="hover" header="表单表格验证">
|
||||||
<el-form ref="tableRulesRef" :model="state.tableData" size="default">
|
<el-form ref="tableRulesRef" :model="state.tableData" size="default">
|
||||||
<el-table :data="state.tableData.data" border class="module-table-uncollected">
|
<el-table ref="tableRef" :data="state.tableData.data" border class="module-table-uncollected" max-height="200">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="(item, index) in state.tableData.header"
|
v-for="(item, index) in state.tableData.header"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -55,12 +55,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="pagesTableRules">
|
<script setup lang="ts" name="pagesTableRules">
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref, nextTick } from 'vue';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import type { FormInstance } from 'element-plus';
|
import type { FormInstance } from 'element-plus';
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const tableRulesRef = ref<FormInstance>();
|
const tableRulesRef = ref<FormInstance>();
|
||||||
|
const tableRef = ref();
|
||||||
const state = reactive<TableRulesState>({
|
const state = reactive<TableRulesState>({
|
||||||
tableData: {
|
tableData: {
|
||||||
data: [],
|
data: [],
|
||||||
@ -103,5 +104,9 @@ const onAddRow = () => {
|
|||||||
a7: '',
|
a7: '',
|
||||||
a8: '',
|
a8: '',
|
||||||
});
|
});
|
||||||
|
tableRef.value.doLayout();
|
||||||
|
nextTick(() => {
|
||||||
|
tableRef.value.setScrollTop(1000000);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -222,7 +222,7 @@ defineExpose({
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.workflow-drawer-node {
|
.workflow-drawer-node {
|
||||||
:deep {
|
:deep() {
|
||||||
.el-tabs {
|
.el-tabs {
|
||||||
box-shadow: unset;
|
box-shadow: unset;
|
||||||
border: unset;
|
border: unset;
|
||||||
|
|||||||
@ -126,7 +126,7 @@ const initTime = () => {
|
|||||||
const convertData = (data: any) => {
|
const convertData = (data: any) => {
|
||||||
let res = [];
|
let res = [];
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
let geoCoord = state.echartsMapData[data[i].name];
|
let geoCoord = (<any>state.echartsMapData)[data[i].name];
|
||||||
if (geoCoord) {
|
if (geoCoord) {
|
||||||
res.push({
|
res.push({
|
||||||
name: data[i].name,
|
name: data[i].name,
|
||||||
@ -250,16 +250,16 @@ const initEchartsMap = () => {
|
|||||||
// BMAP_SATELLITE_MAP:卫星地图 (没有坐标, 绿绿的一片的卫星地图)
|
// BMAP_SATELLITE_MAP:卫星地图 (没有坐标, 绿绿的一片的卫星地图)
|
||||||
// BMAP_HYBRID_MAP:混合地图 (既有坐标,也是绿绿的一片的卫星地图)
|
// BMAP_HYBRID_MAP:混合地图 (既有坐标,也是绿绿的一片的卫星地图)
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
map.setMapType(BMAP_SATELLITE_MAP);
|
map.setMapType(window.BMAP_SATELLITE_MAP);
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
let bdary = new BMap.Boundary();
|
let bdary = new window.BMap.Boundary();
|
||||||
// 获取行政区域
|
// 获取行政区域
|
||||||
bdary.get('深圳', function (rs: any) {
|
bdary.get('深圳', function (rs: any) {
|
||||||
// 行政区域的点有多少个
|
// 行政区域的点有多少个
|
||||||
let count = rs.boundaries.length;
|
let count = rs.boundaries.length;
|
||||||
for (let i = 0; i < count; i++) {
|
for (let i = 0; i < count; i++) {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
let ply = new BMap.Polygon(rs.boundaries[i], {
|
let ply = new window.BMap.Polygon(rs.boundaries[i], {
|
||||||
// 设置多边形边线线粗
|
// 设置多边形边线线粗
|
||||||
strokeWeight: 4,
|
strokeWeight: 4,
|
||||||
// 设置多边形边线透明度0-1
|
// 设置多边形边线透明度0-1
|
||||||
@ -280,7 +280,7 @@ const initEchartsMap = () => {
|
|||||||
// 初始化地图,设置中心点坐标和地图级别
|
// 初始化地图,设置中心点坐标和地图级别
|
||||||
// new BMap.Point('深圳市', 11)
|
// new BMap.Point('深圳市', 11)
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
map.centerAndZoom(new BMap.Point(114.064524, 22.549225), 11);
|
map.centerAndZoom(new window.BMap.Point(114.064524, 22.549225), 11);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 产业概况
|
// 产业概况
|
||||||
|
|||||||
@ -235,8 +235,6 @@ import 'echarts-gl';
|
|||||||
import { formatDate } from '/@/utils/formatTime';
|
import { formatDate } from '/@/utils/formatTime';
|
||||||
import { NextLoading } from '/@/utils/loading';
|
import { NextLoading } from '/@/utils/loading';
|
||||||
import { dropdownList, skyList, dBtnList, earth3DBtnList, chartData4List } from './mock/demo2';
|
import { dropdownList, skyList, dBtnList, earth3DBtnList, chartData4List } from './mock/demo2';
|
||||||
import worldImg from './images/world.jpg';
|
|
||||||
import bathymetryImg from './images/bathymetry.jpg';
|
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const rightChartData1 = ref();
|
const rightChartData1 = ref();
|
||||||
@ -694,8 +692,8 @@ const init3DEarth = (globeRadius: any) => {
|
|||||||
const myChart = echarts.init(el);
|
const myChart = echarts.init(el);
|
||||||
const option = {
|
const option = {
|
||||||
globe: {
|
globe: {
|
||||||
baseTexture: worldImg,
|
baseTexture: 'https://i.hd-r.cn/4d572a171eb475da0c2e731d15b63aea.jpg',
|
||||||
heightTexture: bathymetryImg,
|
heightTexture: 'https://i.hd-r.cn/52356e8d906c84c5e23390f829dec7a3.jpg',
|
||||||
shading: 'realistic',
|
shading: 'realistic',
|
||||||
light: {
|
light: {
|
||||||
ambient: {
|
ambient: {
|
||||||
@ -790,7 +788,7 @@ onUnmounted(() => {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: url(https://img-blog.csdnimg.cn/6267533849444025811bf0840f9366e3.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbHl0LXRvcA==,size_20,color_FFFFFF,t_70,g_se,x_16);
|
background: url(https://i.hd-r.cn/b1040178e4a2265fe87ffbb9bda839a4.jpg);
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 607 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 783 KiB |
@ -67,8 +67,7 @@
|
|||||||
|
|
||||||
/* Advanced Options */
|
/* Advanced Options */
|
||||||
"skipLibCheck": true /* Skip type checking of declaration files. */,
|
"skipLibCheck": true /* Skip type checking of declaration files. */,
|
||||||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
|
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
||||||
"suppressImplicitAnyIndexErrors": true
|
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.vue", "src/**/*.tsx", "src/**/*.d.ts"], // **Represents any directory, and * represents any file. Indicates that all files in the src directory will be compiled
|
"include": ["src/**/*.ts", "src/**/*.vue", "src/**/*.tsx", "src/**/*.d.ts"], // **Represents any directory, and * represents any file. Indicates that all files in the src directory will be compiled
|
||||||
"exclude": ["node_modules", "dist"] // Indicates the file directory that does not need to be compiled
|
"exclude": ["node_modules", "dist"] // Indicates the file directory that does not need to be compiled
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
import { defineConfig, loadEnv, ConfigEnv } from 'vite';
|
import { defineConfig, loadEnv, ConfigEnv } from 'vite';
|
||||||
import vueSetupExtend from 'vite-plugin-vue-setup-extend';
|
import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus';
|
||||||
|
import viteCompression from 'vite-plugin-compression';
|
||||||
|
import { buildConfig } from './src/utils/build';
|
||||||
|
|
||||||
const pathResolve = (dir: string) => {
|
const pathResolve = (dir: string) => {
|
||||||
return resolve(__dirname, '.', dir);
|
return resolve(__dirname, '.', dir);
|
||||||
@ -15,13 +17,11 @@ const alias: Record<string, string> = {
|
|||||||
const viteConfig = defineConfig((mode: ConfigEnv) => {
|
const viteConfig = defineConfig((mode: ConfigEnv) => {
|
||||||
const env = loadEnv(mode.mode, process.cwd());
|
const env = loadEnv(mode.mode, process.cwd());
|
||||||
return {
|
return {
|
||||||
plugins: [vue(), vueSetupExtend()],
|
plugins: [vue(), vueSetupExtend(), viteCompression(), JSON.parse(env.VITE_OPEN_CDN) ? buildConfig.cdn() : null],
|
||||||
root: process.cwd(),
|
root: process.cwd(),
|
||||||
resolve: { alias },
|
resolve: { alias },
|
||||||
base: mode.command === 'serve' ? './' : env.VITE_PUBLIC_PATH,
|
base: mode.command === 'serve' ? './' : env.VITE_PUBLIC_PATH,
|
||||||
optimizeDeps: {
|
optimizeDeps: { exclude: ['vue-demi'] },
|
||||||
include: ['element-plus/lib/locale/lang/zh-cn', 'element-plus/lib/locale/lang/en', 'element-plus/lib/locale/lang/zh-tw'],
|
|
||||||
},
|
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: env.VITE_PORT as unknown as number,
|
port: env.VITE_PORT as unknown as number,
|
||||||
@ -41,15 +41,16 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
|
|||||||
chunkSizeWarningLimit: 1500,
|
chunkSizeWarningLimit: 1500,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: `assets/[name].[hash].js`,
|
chunkFileNames: 'assets/js/[name]-[hash].js',
|
||||||
chunkFileNames: `assets/[name].[hash].js`,
|
entryFileNames: 'assets/js/[name]-[hash].js',
|
||||||
assetFileNames: `assets/[name].[hash].[ext]`,
|
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
|
||||||
compact: true,
|
manualChunks(id) {
|
||||||
manualChunks: {
|
if (id.includes('node_modules')) {
|
||||||
vue: ['vue', 'vue-router', 'pinia'],
|
return id.toString().match(/\/node_modules\/(?!.pnpm)(?<moduleName>[^\/]*)\//)?.groups!.moduleName ?? 'vender';
|
||||||
echarts: ['echarts'],
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
...(JSON.parse(env.VITE_OPEN_CDN) ? { external: buildConfig.external } : {}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
css: { preprocessorOptions: { css: { charset: false } } },
|
css: { preprocessorOptions: { css: { charset: false } } },
|
||||||
|
|||||||
Reference in New Issue
Block a user