mirror of
https://gitee.com/lyt-top/vue-next-admin
synced 2026-07-04 13:02:39 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cbc0f1b4e | |||
| bf9fce206a | |||
| 9195d8367f | |||
| 1b3600f394 | |||
| 16823b2ef7 | |||
| 9d794f2309 | |||
| bd8ac2cc94 | |||
| 2b9506845c |
@ -1,5 +1,5 @@
|
|||||||
# 本地环境
|
# 本地环境
|
||||||
ENV = 'development'
|
ENV = development
|
||||||
|
|
||||||
# 本地环境接口地址
|
# 本地环境接口地址
|
||||||
VITE_API_URL = 'http://localhost:8888/'
|
VITE_API_URL = http://localhost:8888/
|
||||||
@ -1,5 +1,5 @@
|
|||||||
# 线上环境
|
# 线上环境
|
||||||
ENV = 'production'
|
ENV = production
|
||||||
|
|
||||||
# 线上环境接口地址
|
# 线上环境接口地址
|
||||||
VITE_API_URL = 'https://lyt-top.gitee.io/vue-next-admin-preview/'
|
VITE_API_URL = https://lyt-top.gitee.io/vue-next-admin-preview/
|
||||||
26
CHANGELOG.md
26
CHANGELOG.md
@ -2,6 +2,32 @@
|
|||||||
|
|
||||||
🎉🎉🔥 `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.3
|
||||||
|
|
||||||
|
`2023.02.22`
|
||||||
|
|
||||||
|
🚩🚩🚩 感谢 [驰骋工作流引擎-表单引擎-低代码开发平台](http://www.ccflow.org/) 赞助商的赞助。驰骋公司为社会提供流程引擎+表单引擎+低代码开发平台一体的开源软件解决方案,欢迎广大开发者前去体验!
|
||||||
|
|
||||||
|
- 🌟 更新 依赖更新最新版本
|
||||||
|
- 🎉 新增 赞助商组件(`/src/layout/sponsors`),[项目目录结构查看](https://lyt-top.gitee.io/vue-next-admin-doc-preview/config/)
|
||||||
|
- 🐞 修复 [过滤筛选组件展开点击不了](https://gitee.com/lyt-top/vue-next-admin/issues/I688WG)
|
||||||
|
- 🐞 修复 [设置锁屏时间时直接白屏了不能恢复,除非删除主题配置才会重新加载](https://gitee.com/lyt-top/vue-next-admin/issues/I6AF8P),感谢[@baizunxian](https://gitee.com/xb_xiaobai)
|
||||||
|
- 🐞 修复 `分栏布局` 地址栏输入不存在的路由报错问题
|
||||||
|
- 🎨 合并 [!44 tagsViewName 正则匹配错误,匹配到含 en 单词](https://gitee.com/lyt-top/vue-next-admin/pulls/44/files),感谢[@tony 星](https://gitee.com/tony_tong_xin)
|
||||||
|
- 🎨 合并 [!45 fix 地址栏出现 false 问题](https://gitee.com/lyt-top/vue-next-admin/pulls/45),感谢[@随心](https://gitee.com/jiangqiang1996)
|
||||||
|
- 🎯 优化 `/src/utils/storage` 下 `key` 编写成 `${__NEXT_NAME__}:${key}`,防止部署多套系统到同一域名不同目录时,变量共用的问题(`__NEXT_NAME__`为 `package.json` 中的 `name`)
|
||||||
|
- 🎯 优化 watermark 单词拼写错误
|
||||||
|
|
||||||
|
## 2.4.21
|
||||||
|
|
||||||
|
`2022.12.12`
|
||||||
|
|
||||||
|
- 🌟 更新 依赖更新最新版本
|
||||||
|
- 🎉 新增 菜单背景高亮颜色可自定义,通过 `布局配置 -> 菜单设置 -> 菜单高亮背景色` 进行设置
|
||||||
|
- 🐞 修复 `分栏布局` 二级导航菜单内容多时,无法滚动问题,感谢群友@静雨轩主人
|
||||||
|
- 🐞 修复 [!42 修复 工作流无法添加新节点问题](https://gitee.com/lyt-top/vue-next-admin/pulls/42),感谢[@beta](https://gitee.com/beta_dz)
|
||||||
|
- 🎯 优化 `/make/tableDemo` 表头很多时,无法滚动问题,感谢群友@糊涂涂涂
|
||||||
|
|
||||||
## 2.4.2
|
## 2.4.2
|
||||||
|
|
||||||
`2022.12.09`
|
`2022.12.09`
|
||||||
|
|||||||
26
README.md
26
README.md
@ -1,25 +1,31 @@
|
|||||||
<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://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">
|
||||||
<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">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://element-plus.gitee.io/#/zh-CN/component/changelog" target="_blank">
|
<a href="https://element-plus.gitee.io/#/zh-CN/component/changelog" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/element--plus-%3E1.0.0-blue" alt="element plus">
|
<img src="https://img.shields.io/badge/element--plus-%3E1.0.0-blue" alt="element plus">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.tslang.cn/" target="_blank">
|
<a href="https://www.tslang.cn/" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/typescript-%3E4.0.0-blue" alt="typescript">
|
<img src="https://img.shields.io/badge/typescript-%3E4.0.0-blue" alt="typescript">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://vitejs.dev/" target="_blank">
|
<a href="https://vitejs.dev/" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/vite-%3E2.0.0-yellow" alt="vite">
|
<img src="https://img.shields.io/badge/vite-%3E2.0.0-yellow" alt="vite">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://gitee.com/lyt-top/vue-next-admin/blob/master/LICENSE" target="_blank">
|
<a href="https://gitee.com/lyt-top/vue-next-admin/blob/master/LICENSE" target="_blank">
|
||||||
<img src="https://img.shields.io/badge/license-MIT-success" alt="license">
|
<img src="https://img.shields.io/badge/license-MIT-success" alt="license">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
#### 💝 长期赞助商
|
||||||
|
|
||||||
|
<a href="http://www.ccflow.org/" target="_blank">
|
||||||
|
<img src="./src/assets/ccflowRightNextAdmin.png" width="50%" height="70px">
|
||||||
|
</a>
|
||||||
|
|
||||||
#### 🌈 介绍
|
#### 🌈 介绍
|
||||||
|
|
||||||
基于 vue3.x + CompositionAPI setup 语法糖 + typescript + vite + element plus + vue-router-next + pinia 技术,适配手机、平板、pc 的后台开源免费模板,希望减少工作量,帮助大家实现快速开发。
|
基于 vue3.x + CompositionAPI setup 语法糖 + typescript + vite + element plus + vue-router-next + pinia 技术,适配手机、平板、pc 的后台开源免费模板,希望减少工作量,帮助大家实现快速开发。
|
||||||
|
|||||||
1296
package-lock.json
generated
1296
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
34
package.json
34
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-next-admin",
|
"name": "vue-next-admin",
|
||||||
"version": "2.4.2",
|
"version": "2.4.3",
|
||||||
"description": "vue3 vite next admin template",
|
"description": "vue3 vite next admin template",
|
||||||
"author": "lyt_20201208",
|
"author": "lyt_20201208",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -13,45 +13,45 @@
|
|||||||
"@element-plus/icons-vue": "^2.0.10",
|
"@element-plus/icons-vue": "^2.0.10",
|
||||||
"@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.2.1",
|
"axios": "^1.3.3",
|
||||||
"countup.js": "^2.3.2",
|
"countup.js": "^2.4.2",
|
||||||
"cropperjs": "^1.5.13",
|
"cropperjs": "^1.5.13",
|
||||||
"echarts": "^5.4.0",
|
"echarts": "^5.4.1",
|
||||||
"echarts-gl": "^2.0.9",
|
"echarts-gl": "^2.0.9",
|
||||||
"echarts-wordcloud": "^2.1.0",
|
"echarts-wordcloud": "^2.1.0",
|
||||||
"element-plus": "^2.2.26",
|
"element-plus": "^2.2.32",
|
||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
"js-table2excel": "^1.0.3",
|
"js-table2excel": "^1.0.3",
|
||||||
"jsplumb": "^2.15.6",
|
"jsplumb": "^2.15.6",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.0.28",
|
"pinia": "^2.0.32",
|
||||||
"print-js": "^1.6.0",
|
"print-js": "^1.6.0",
|
||||||
"qrcodejs2-fixes": "^0.0.2",
|
"qrcodejs2-fixes": "^0.0.2",
|
||||||
"qs": "^6.11.0",
|
"qs": "^6.11.0",
|
||||||
"screenfull": "^6.0.2",
|
"screenfull": "^6.0.2",
|
||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"splitpanes": "^3.1.5",
|
"splitpanes": "^3.1.5",
|
||||||
"vue": "^3.2.45",
|
"vue": "^3.2.47",
|
||||||
"vue-clipboard3": "^2.0.0",
|
"vue-clipboard3": "^2.0.0",
|
||||||
"vue-grid-layout": "^3.0.0-beta1",
|
"vue-grid-layout": "^3.0.0-beta1",
|
||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.2.2",
|
||||||
"vue-router": "^4.1.6"
|
"vue-router": "^4.1.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.11.12",
|
"@types/node": "^18.14.0",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
"@types/sortablejs": "^1.15.0",
|
"@types/sortablejs": "^1.15.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
||||||
"@typescript-eslint/parser": "^5.46.0",
|
"@typescript-eslint/parser": "^5.53.0",
|
||||||
"@vitejs/plugin-vue": "^4.0.0",
|
"@vitejs/plugin-vue": "^4.0.0",
|
||||||
"@vue/compiler-sfc": "^3.2.45",
|
"@vue/compiler-sfc": "^3.2.47",
|
||||||
"eslint": "^8.29.0",
|
"eslint": "^8.34.0",
|
||||||
"eslint-plugin-vue": "^9.8.0",
|
"eslint-plugin-vue": "^9.9.0",
|
||||||
"prettier": "^2.8.1",
|
"prettier": "^2.8.4",
|
||||||
"sass": "^1.56.2",
|
"sass": "^1.58.3",
|
||||||
"typescript": "^4.9.4",
|
"typescript": "^4.9.5",
|
||||||
"vite": "^4.0.0",
|
"vite": "^4.1.4",
|
||||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||||
"vue-eslint-parser": "^9.1.0"
|
"vue-eslint-parser": "^9.1.0"
|
||||||
},
|
},
|
||||||
|
|||||||
14
src/App.vue
14
src/App.vue
@ -1,10 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-config-provider :size="getGlobalComponentSize" :locale="getGlobalI18n">
|
<el-config-provider :size="getGlobalComponentSize" :locale="getGlobalI18n">
|
||||||
<router-view v-show="themeConfig.lockScreenTime > 1" />
|
<router-view v-show="setLockScreen" />
|
||||||
<LockScreen v-if="themeConfig.isLockScreen" />
|
<LockScreen v-if="themeConfig.isLockScreen" />
|
||||||
<Setings ref="setingsRef" v-show="themeConfig.lockScreenTime > 1" />
|
<Setings ref="setingsRef" v-show="setLockScreen" />
|
||||||
<CloseFull v-if="!themeConfig.isLockScreen" />
|
<CloseFull v-if="!themeConfig.isLockScreen" />
|
||||||
<Upgrade v-if="getVersion" />
|
<Upgrade v-if="getVersion" />
|
||||||
|
<Sponsors />
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -25,6 +26,7 @@ const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index
|
|||||||
const Setings = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/setings.vue'));
|
const Setings = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/setings.vue'));
|
||||||
const CloseFull = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/closeFull.vue'));
|
const CloseFull = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/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 { messages, locale } = useI18n();
|
const { messages, locale } = useI18n();
|
||||||
@ -34,12 +36,18 @@ const stores = useTagsViewRoutes();
|
|||||||
const storesThemeConfig = useThemeConfig();
|
const storesThemeConfig = useThemeConfig();
|
||||||
const { themeConfig } = storeToRefs(storesThemeConfig);
|
const { themeConfig } = storeToRefs(storesThemeConfig);
|
||||||
|
|
||||||
|
// 设置锁屏时组件显示隐藏
|
||||||
|
const setLockScreen = computed(() => {
|
||||||
|
// 防止锁屏后,刷新出现不相关界面
|
||||||
|
// https://gitee.com/lyt-top/vue-next-admin/issues/I6AF8P
|
||||||
|
return themeConfig.value.isLockScreen ? themeConfig.value.lockScreenTime > 1 : themeConfig.value.lockScreenTime >= 0;
|
||||||
|
});
|
||||||
// 获取版本号
|
// 获取版本号
|
||||||
const getVersion = computed(() => {
|
const getVersion = computed(() => {
|
||||||
let isVersion = false;
|
let isVersion = false;
|
||||||
if (route.path !== '/login') {
|
if (route.path !== '/login') {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if ((Local.get('version') && Local.get('version') !== __VERSION__) || !Local.get('version')) isVersion = true;
|
if ((Local.get('version') && Local.get('version') !== __NEXT_VERSION__) || !Local.get('version')) isVersion = true;
|
||||||
}
|
}
|
||||||
return isVersion;
|
return isVersion;
|
||||||
});
|
});
|
||||||
|
|||||||
BIN
src/assets/ccflowRightNextAdmin.png
Normal file
BIN
src/assets/ccflowRightNextAdmin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 153 KiB |
@ -71,26 +71,28 @@
|
|||||||
<SvgIcon name="iconfont icon-quanjushezhi_o" :size="22" title="设置" />
|
<SvgIcon name="iconfont icon-quanjushezhi_o" :size="22" title="设置" />
|
||||||
</template>
|
</template>
|
||||||
<template #default>
|
<template #default>
|
||||||
<div ref="toolSetRef">
|
<div class="tool-box">
|
||||||
<div class="tool-box">
|
<el-tooltip content="拖动进行排序" placement="top-start">
|
||||||
<el-tooltip content="拖动进行排序" placement="top-start">
|
<SvgIcon name="fa fa-question-circle-o" :size="17" class="ml11" color="#909399" />
|
||||||
<SvgIcon name="fa fa-question-circle-o" :size="17" class="ml11" color="#909399" />
|
</el-tooltip>
|
||||||
</el-tooltip>
|
<el-checkbox
|
||||||
<el-checkbox
|
v-model="state.checkListAll"
|
||||||
v-model="state.checkListAll"
|
:indeterminate="state.checkListIndeterminate"
|
||||||
:indeterminate="state.checkListIndeterminate"
|
class="ml10 mr1"
|
||||||
class="ml10 mr1"
|
label="列显示"
|
||||||
label="列显示"
|
@change="onCheckAllChange"
|
||||||
@change="onCheckAllChange"
|
/>
|
||||||
/>
|
<el-checkbox v-model="getConfig.isSerialNo" class="ml12 mr1" label="序号" />
|
||||||
<el-checkbox v-model="getConfig.isSerialNo" class="ml12 mr1" label="序号" />
|
<el-checkbox v-model="getConfig.isSelection" class="ml12 mr1" label="多选" />
|
||||||
<el-checkbox v-model="getConfig.isSelection" class="ml12 mr1" label="多选" />
|
|
||||||
</div>
|
|
||||||
<div class="tool-item" v-for="v in header" :key="v.key" :data-key="v.key">
|
|
||||||
<i class="fa fa-arrows-alt handle cursor-pointer"></i>
|
|
||||||
<el-checkbox v-model="v.isCheck" class="ml12 mr8" :label="v.title" @change="onCheckChange" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<el-scrollbar>
|
||||||
|
<div ref="toolSetRef" class="tool-sortable">
|
||||||
|
<div class="tool-sortable-item" v-for="v in header" :key="v.key" :data-key="v.key">
|
||||||
|
<i class="fa fa-arrows-alt handle cursor-pointer"></i>
|
||||||
|
<el-checkbox v-model="v.isCheck" size="default" class="ml12 mr8" :label="v.title" @change="onCheckChange" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-scrollbar>
|
||||||
</template>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { useThemeConfig } from '/@/stores/themeConfig';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:
|
* 说明:
|
||||||
* 须在 pages 下新建文件夹(建议 `要国际化界面目录` 与 `i18 目录` 相同,方便查找),
|
* 须在 pages 下新建文件夹(建议 `要国际化界面目录` 与 `i18n 目录` 相同,方便查找),
|
||||||
* 注意国际化定义的字段,不要与原有的定义字段相同。
|
* 注意国际化定义的字段,不要与原有的定义字段相同。
|
||||||
* 1、/src/i18n/lang 下的 ts 为框架的国际化内容
|
* 1、/src/i18n/lang 下的 ts 为框架的国际化内容
|
||||||
* 2、/src/i18n/pages 下的 ts 为各界面的国际化内容
|
* 2、/src/i18n/pages 下的 ts 为各界面的国际化内容
|
||||||
|
|||||||
@ -137,6 +137,7 @@ export default {
|
|||||||
twoIsTopBarColorGradual: 'Top bar gradient',
|
twoIsTopBarColorGradual: 'Top bar gradient',
|
||||||
twoMenuBar: 'Menu background',
|
twoMenuBar: 'Menu background',
|
||||||
twoMenuBarColor: 'Menu default font color',
|
twoMenuBarColor: 'Menu default font color',
|
||||||
|
twoMenuBarActiveColor: 'Menu Highlight Color',
|
||||||
twoIsMenuBarColorGradual: 'Menu gradient',
|
twoIsMenuBarColorGradual: 'Menu gradient',
|
||||||
twoColumnsMenuBar: 'Column menu background',
|
twoColumnsMenuBar: 'Column menu background',
|
||||||
twoColumnsMenuBarColor: 'Default font color bar menu',
|
twoColumnsMenuBarColor: 'Default font color bar menu',
|
||||||
|
|||||||
@ -137,6 +137,7 @@ export default {
|
|||||||
twoIsTopBarColorGradual: '顶栏背景渐变',
|
twoIsTopBarColorGradual: '顶栏背景渐变',
|
||||||
twoMenuBar: '菜单背景',
|
twoMenuBar: '菜单背景',
|
||||||
twoMenuBarColor: '菜单默认字体颜色',
|
twoMenuBarColor: '菜单默认字体颜色',
|
||||||
|
twoMenuBarActiveColor: '菜单高亮背景色',
|
||||||
twoIsMenuBarColorGradual: '菜单背景渐变',
|
twoIsMenuBarColorGradual: '菜单背景渐变',
|
||||||
twoColumnsMenuBar: '分栏菜单背景',
|
twoColumnsMenuBar: '分栏菜单背景',
|
||||||
twoColumnsMenuBarColor: '分栏菜单默认字体颜色',
|
twoColumnsMenuBarColor: '分栏菜单默认字体颜色',
|
||||||
|
|||||||
@ -137,6 +137,7 @@ export default {
|
|||||||
twoIsTopBarColorGradual: '頂欄背景漸變',
|
twoIsTopBarColorGradual: '頂欄背景漸變',
|
||||||
twoMenuBar: '選單背景',
|
twoMenuBar: '選單背景',
|
||||||
twoMenuBarColor: '選單默認字體顏色',
|
twoMenuBarColor: '選單默認字體顏色',
|
||||||
|
twoMenuBarActiveColor: '選單高亮背景色',
|
||||||
twoIsMenuBarColorGradual: '選單背景漸變',
|
twoIsMenuBarColorGradual: '選單背景漸變',
|
||||||
twoColumnsMenuBar: '分欄選單背景',
|
twoColumnsMenuBar: '分欄選單背景',
|
||||||
twoColumnsMenuBarColor: '分欄選單默認字體顏色',
|
twoColumnsMenuBarColor: '分欄選單默認字體顏色',
|
||||||
|
|||||||
@ -74,6 +74,7 @@ const state = reactive<ColumnsAsideState>({
|
|||||||
|
|
||||||
// 设置菜单高亮位置移动
|
// 设置菜单高亮位置移动
|
||||||
const setColumnsAsideMove = (k: number) => {
|
const setColumnsAsideMove = (k: number) => {
|
||||||
|
if (k === undefined) return false;
|
||||||
state.liIndex = k;
|
state.liIndex = k;
|
||||||
columnsAsideActiveRef.value.style.top = `${columnsAsideOffsetTopRefs.value[k].offsetTop + state.difference}px`;
|
columnsAsideActiveRef.value.style.top = `${columnsAsideOffsetTopRefs.value[k].offsetTop + state.difference}px`;
|
||||||
};
|
};
|
||||||
@ -198,7 +199,8 @@ watch(
|
|||||||
background: var(--next-bg-columnsMenuBar);
|
background: var(--next-bg-columnsMenuBar);
|
||||||
ul {
|
ul {
|
||||||
position: relative;
|
position: relative;
|
||||||
.layout-columns-active {
|
.layout-columns-active,
|
||||||
|
.layout-columns-active a {
|
||||||
color: var(--next-bg-columnsMenuBarColor) !important;
|
color: var(--next-bg-columnsMenuBarColor) !important;
|
||||||
transition: 0.3s ease-in-out;
|
transition: 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,17 @@
|
|||||||
<el-color-picker v-model="getThemeConfig.menuBarColor" size="default" @change="onBgColorPickerChange('menuBarColor')"> </el-color-picker>
|
<el-color-picker v-model="getThemeConfig.menuBarColor" size="default" @change="onBgColorPickerChange('menuBarColor')"> </el-color-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layout-breadcrumb-seting-bar-flex">
|
||||||
|
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.twoMenuBarActiveColor') }}</div>
|
||||||
|
<div class="layout-breadcrumb-seting-bar-flex-value">
|
||||||
|
<el-color-picker
|
||||||
|
v-model="getThemeConfig.menuBarActiveColor"
|
||||||
|
size="default"
|
||||||
|
show-alpha
|
||||||
|
@change="onBgColorPickerChange('menuBarActiveColor')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layout-breadcrumb-seting-bar-flex mt14">
|
<div class="layout-breadcrumb-seting-bar-flex mt14">
|
||||||
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.twoIsMenuBarColorGradual') }}</div>
|
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.twoIsMenuBarColorGradual') }}</div>
|
||||||
<div class="layout-breadcrumb-seting-bar-flex-value">
|
<div class="layout-breadcrumb-seting-bar-flex-value">
|
||||||
@ -427,7 +438,7 @@ import { useThemeConfig } from '/@/stores/themeConfig';
|
|||||||
import { useChangeColor } from '/@/utils/theme';
|
import { useChangeColor } from '/@/utils/theme';
|
||||||
import { verifyAndSpace } from '/@/utils/toolsValidate';
|
import { verifyAndSpace } from '/@/utils/toolsValidate';
|
||||||
import { Local } from '/@/utils/storage';
|
import { Local } from '/@/utils/storage';
|
||||||
import Watermark from '/@/utils/wartermark';
|
import Watermark from '/@/utils/watermark';
|
||||||
import commonFunction from '/@/utils/commonFunction';
|
import commonFunction from '/@/utils/commonFunction';
|
||||||
import other from '/@/utils/other';
|
import other from '/@/utils/other';
|
||||||
import mittBus from '/@/utils/mitt';
|
import mittBus from '/@/utils/mitt';
|
||||||
@ -577,6 +588,7 @@ const onSetLayout = (layout: string) => {
|
|||||||
const initLayoutChangeFun = () => {
|
const initLayoutChangeFun = () => {
|
||||||
onBgColorPickerChange('menuBar');
|
onBgColorPickerChange('menuBar');
|
||||||
onBgColorPickerChange('menuBarColor');
|
onBgColorPickerChange('menuBarColor');
|
||||||
|
onBgColorPickerChange('menuBarActiveColor');
|
||||||
onBgColorPickerChange('topBar');
|
onBgColorPickerChange('topBar');
|
||||||
onBgColorPickerChange('topBarColor');
|
onBgColorPickerChange('topBarColor');
|
||||||
onBgColorPickerChange('columnsMenuBar');
|
onBgColorPickerChange('columnsMenuBar');
|
||||||
@ -620,7 +632,7 @@ const onResetConfigClick = () => {
|
|||||||
Local.clear();
|
Local.clear();
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
Local.set('version', __VERSION__);
|
Local.set('version', __NEXT_VERSION__);
|
||||||
};
|
};
|
||||||
// 初始化菜单样式等
|
// 初始化菜单样式等
|
||||||
const initSetStyle = () => {
|
const initSetStyle = () => {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="layout-padding layout-padding-unset layout-iframe">
|
<div class="layout-padding layout-padding-unset layout-iframe">
|
||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<div class="w100" v-for="v in setIframeList" :key="v.path" v-loading="v.meta.loading" element-loading-background="white">
|
<div class="w100" v-for="v in setIframeList" :key="v.path" v-loading="v.meta.loading" element-loading-background="white">
|
||||||
<transition-group :name="name" mode="out-in">
|
<transition-group :name="name">
|
||||||
<iframe
|
<iframe
|
||||||
:src="v.meta.isLink"
|
:src="v.meta.isLink"
|
||||||
:key="v.path"
|
:key="v.path"
|
||||||
|
|||||||
108
src/layout/sponsors/index.vue
Normal file
108
src/layout/sponsors/index.vue
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
<template>
|
||||||
|
<div class="sponsors-container" title="点击前往体验" v-show="state.sponsors.isShow" @click="onSponsorsClick">
|
||||||
|
<el-carousel height="240px" indicator-position="none" :arrow="setCarouselShow" @change="onCarouselChange">
|
||||||
|
<el-carousel-item v-for="(v, k) in state.sponsors.list" :key="k">
|
||||||
|
<img :src="v.url" class="sponsors-img" />
|
||||||
|
<div class="sponsors-text" v-html="v.text"></div>
|
||||||
|
</el-carousel-item>
|
||||||
|
</el-carousel>
|
||||||
|
<div class="sponsors-close">
|
||||||
|
<SvgIcon name="ele-Close" :size="12" title="关闭赞助商" @click.stop="onCloseSponsors" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="layoutSponsors">
|
||||||
|
import { reactive, computed, onMounted } from 'vue';
|
||||||
|
import sponsorsOne from '/@/assets/ccflowRightNextAdmin.png';
|
||||||
|
|
||||||
|
// 定义变量内容
|
||||||
|
const state = reactive({
|
||||||
|
sponsors: {
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
url: sponsorsOne,
|
||||||
|
text: `驰骋BPM系统包含表单引擎+流程引擎+权限控制,方便集成,配置灵活,功能强大,适合中国国情的工作流引擎.演示:http://demo.ccflow.org。右上角点star方可加群: 1060674395`,
|
||||||
|
link: 'http://www.ccflow.org/',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
isShow: false,
|
||||||
|
index: 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// 设置轮播图箭头显示
|
||||||
|
const setCarouselShow = computed(() => {
|
||||||
|
return state.sponsors.list.length <= 1 ? 'never' : 'hover';
|
||||||
|
});
|
||||||
|
// 关闭赞助商
|
||||||
|
const onCloseSponsors = () => {
|
||||||
|
state.sponsors.isShow = false;
|
||||||
|
};
|
||||||
|
// 轮播图改变时
|
||||||
|
const onCarouselChange = (e: number) => {
|
||||||
|
state.sponsors.index = e;
|
||||||
|
};
|
||||||
|
// 当前项内容点击
|
||||||
|
const onSponsorsClick = () => {
|
||||||
|
window.open(state.sponsors.list[state.sponsors.index].link);
|
||||||
|
};
|
||||||
|
// 延迟显示,防止影响其它界面加载
|
||||||
|
const delayShow = () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
state.sponsors.isShow = true;
|
||||||
|
}, 3000);
|
||||||
|
};
|
||||||
|
// 页面加载时
|
||||||
|
onMounted(() => {
|
||||||
|
delayShow();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.sponsors-container {
|
||||||
|
position: fixed;
|
||||||
|
right: 15px;
|
||||||
|
bottom: 15px;
|
||||||
|
z-index: 3;
|
||||||
|
width: 200px;
|
||||||
|
background-color: var(--next-bg-main-color);
|
||||||
|
box-shadow: var(--el-box-shadow-lighter);
|
||||||
|
border-radius: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: pointer;
|
||||||
|
.sponsors-img {
|
||||||
|
width: 100%;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
.sponsors-text {
|
||||||
|
padding: 10px;
|
||||||
|
color: var(--el-text-color-regular);
|
||||||
|
font-size: var(--el-dialog-content-font-size);
|
||||||
|
}
|
||||||
|
.sponsors-close {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
position: absolute;
|
||||||
|
right: -35px;
|
||||||
|
bottom: -35px;
|
||||||
|
:deep(i) {
|
||||||
|
position: absolute;
|
||||||
|
left: 9px;
|
||||||
|
top: 9px;
|
||||||
|
color: #afafaf;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
:deep(i) {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -45,7 +45,7 @@ const { themeConfig } = storeToRefs(storesThemeConfig);
|
|||||||
const state = reactive({
|
const state = reactive({
|
||||||
isUpgrade: false,
|
isUpgrade: false,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
version: __VERSION__,
|
version: __NEXT_VERSION__,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
btnTxt: '',
|
btnTxt: '',
|
||||||
});
|
});
|
||||||
|
|||||||
@ -23,10 +23,7 @@ export const useThemeConfig = defineStore('themeConfig', {
|
|||||||
isIsDark: false,
|
isIsDark: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单 / 顶栏
|
* 顶栏设置
|
||||||
* 注意:v1.0.17 版本去除设置布局切换,重置主题样式(initSetLayoutChange),
|
|
||||||
* 切换布局需手动设置样式,设置的样式自动同步各布局,
|
|
||||||
* 代码位置:/@/layout/navBars/breadcrumb/setings.vue
|
|
||||||
*/
|
*/
|
||||||
// 默认顶栏导航背景颜色
|
// 默认顶栏导航背景颜色
|
||||||
topBar: '#ffffff',
|
topBar: '#ffffff',
|
||||||
@ -34,12 +31,22 @@ export const useThemeConfig = defineStore('themeConfig', {
|
|||||||
topBarColor: '#606266',
|
topBarColor: '#606266',
|
||||||
// 是否开启顶栏背景颜色渐变
|
// 是否开启顶栏背景颜色渐变
|
||||||
isTopBarColorGradual: false,
|
isTopBarColorGradual: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单设置
|
||||||
|
*/
|
||||||
// 默认菜单导航背景颜色
|
// 默认菜单导航背景颜色
|
||||||
menuBar: '#545c64',
|
menuBar: '#545c64',
|
||||||
// 默认菜单导航字体颜色
|
// 默认菜单导航字体颜色
|
||||||
menuBarColor: '#eaeaea',
|
menuBarColor: '#eaeaea',
|
||||||
|
// 默认菜单高亮背景色
|
||||||
|
menuBarActiveColor: 'rgba(0, 0, 0, 0.2)',
|
||||||
// 是否开启菜单背景颜色渐变
|
// 是否开启菜单背景颜色渐变
|
||||||
isMenuBarColorGradual: false,
|
isMenuBarColorGradual: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分栏设置
|
||||||
|
*/
|
||||||
// 默认分栏菜单背景颜色
|
// 默认分栏菜单背景颜色
|
||||||
columnsMenuBar: '#545c64',
|
columnsMenuBar: '#545c64',
|
||||||
// 默认分栏菜单字体颜色
|
// 默认分栏菜单字体颜色
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
--next-bg-topBarColor: var(--next-color-bar) !important;
|
--next-bg-topBarColor: var(--next-color-bar) !important;
|
||||||
--next-bg-menuBar: var(--next-color-disabled) !important;
|
--next-bg-menuBar: var(--next-color-disabled) !important;
|
||||||
--next-bg-menuBarColor: var(--next-color-bar) !important;
|
--next-bg-menuBarColor: var(--next-color-bar) !important;
|
||||||
|
--next-bg-menuBarActiveColor: var(--next-color-hover-rgba) !important;
|
||||||
--next-bg-columnsMenuBar: var(--next-color-disabled) !important;
|
--next-bg-columnsMenuBar: var(--next-color-disabled) !important;
|
||||||
--next-bg-columnsMenuBarColor: var(--next-color-bar) !important;
|
--next-bg-columnsMenuBarColor: var(--next-color-bar) !important;
|
||||||
--next-border-color-light: var(--next-border-black) !important;
|
--next-border-color-light: var(--next-border-black) !important;
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
------------------------------- */
|
------------------------------- */
|
||||||
// 鼠标 hover 时颜色
|
// 鼠标 hover 时颜色
|
||||||
.el-menu-hover-bg-color {
|
.el-menu-hover-bg-color {
|
||||||
background-color: var(--next-color-menu-hover) !important;
|
background-color: var(--next-bg-menuBarActiveColor) !important;
|
||||||
}
|
}
|
||||||
// 默认样式修改
|
// 默认样式修改
|
||||||
.el-menu {
|
.el-menu {
|
||||||
@ -108,6 +108,9 @@
|
|||||||
.el-sub-menu:not(.is-opened):hover .el-sub-menu__title {
|
.el-sub-menu:not(.is-opened):hover .el-sub-menu__title {
|
||||||
@extend .el-menu-hover-bg-color;
|
@extend .el-menu-hover-bg-color;
|
||||||
}
|
}
|
||||||
|
.el-menu-item:hover {
|
||||||
|
@extend .el-menu-hover-bg-color;
|
||||||
|
}
|
||||||
.el-sub-menu.is-active.is-opened .el-sub-menu__title {
|
.el-sub-menu.is-active.is-opened .el-sub-menu__title {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
}
|
}
|
||||||
@ -279,6 +282,10 @@
|
|||||||
.layout-container-view .el-scrollbar__view {
|
.layout-container-view .el-scrollbar__view {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
/*防止分栏布局二级菜单很多时,滚动条消失问题*/
|
||||||
|
.layout-columns-warp .layout-aside .el-scrollbar__view {
|
||||||
|
height: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Pagination 分页
|
/* Pagination 分页
|
||||||
------------------------------- */
|
------------------------------- */
|
||||||
|
|||||||
@ -8,18 +8,20 @@
|
|||||||
height: 40px;
|
height: 40px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.tool-item {
|
.tool-sortable {
|
||||||
display: flex;
|
max-height: 303px;
|
||||||
box-sizing: border-box;
|
.tool-sortable-item {
|
||||||
color: var(--el-text-color-primary);
|
display: flex;
|
||||||
height: 35px;
|
box-sizing: border-box;
|
||||||
align-items: center;
|
color: var(--el-text-color-primary);
|
||||||
padding: var(--el-popover-padding);
|
align-items: center;
|
||||||
&:hover {
|
padding: 0 12px;
|
||||||
background: var(--el-fill-color-lighter);
|
&:hover {
|
||||||
}
|
background: var(--el-fill-color-lighter);
|
||||||
i {
|
}
|
||||||
opacity: 0.7;
|
i {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
src/types/pinia.d.ts
vendored
1
src/types/pinia.d.ts
vendored
@ -48,6 +48,7 @@ declare interface ThemeConfigState {
|
|||||||
isTopBarColorGradual: boolean;
|
isTopBarColorGradual: boolean;
|
||||||
menuBar: string;
|
menuBar: string;
|
||||||
menuBarColor: string;
|
menuBarColor: string;
|
||||||
|
menuBarActiveColor: string;
|
||||||
isMenuBarColorGradual: boolean;
|
isMenuBarColorGradual: boolean;
|
||||||
columnsMenuBar: string;
|
columnsMenuBar: string;
|
||||||
columnsMenuBarColor: string;
|
columnsMenuBarColor: string;
|
||||||
|
|||||||
2
src/types/views.d.ts
vendored
2
src/types/views.d.ts
vendored
@ -242,8 +242,6 @@ declare type XyState = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
declare type WorkflowState<T = any> = {
|
declare type WorkflowState<T = any> = {
|
||||||
workflowRightRef: HTMLDivElement | null;
|
|
||||||
leftNavRefs: HTMLElement[];
|
|
||||||
leftNavList: T[];
|
leftNavList: T[];
|
||||||
dropdownNode: XyState;
|
dropdownNode: XyState;
|
||||||
dropdownLine: XyState;
|
dropdownLine: XyState;
|
||||||
|
|||||||
@ -53,8 +53,11 @@ export function useTitle() {
|
|||||||
export function setTagsViewNameI18n(item: any) {
|
export function setTagsViewNameI18n(item: any) {
|
||||||
let tagsViewName: string = '';
|
let tagsViewName: string = '';
|
||||||
const { query, params, meta } = item;
|
const { query, params, meta } = item;
|
||||||
|
// 修复tagsViewName匹配到其他含下列单词的路由
|
||||||
|
// https://gitee.com/lyt-top/vue-next-admin/pulls/44/files
|
||||||
|
const pattern = /^\{("(zh-cn|en|zh-tw)":"[^,]+",?){1,3}}$/;
|
||||||
if (query?.tagsViewName || params?.tagsViewName) {
|
if (query?.tagsViewName || params?.tagsViewName) {
|
||||||
if (/\/zh-cn|en|zh-tw\//.test(query?.tagsViewName) || /\/zh-cn|en|zh-tw\//.test(params?.tagsViewName)) {
|
if (pattern.test(query?.tagsViewName) || pattern.test(params?.tagsViewName)) {
|
||||||
// 国际化
|
// 国际化
|
||||||
const urlTagsParams = (query?.tagsViewName && JSON.parse(query?.tagsViewName)) || (params?.tagsViewName && JSON.parse(params?.tagsViewName));
|
const urlTagsParams = (query?.tagsViewName && JSON.parse(query?.tagsViewName)) || (params?.tagsViewName && JSON.parse(params?.tagsViewName));
|
||||||
tagsViewName = urlTagsParams[i18n.global.locale.value];
|
tagsViewName = urlTagsParams[i18n.global.locale.value];
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
|
import axios, { AxiosInstance } from 'axios';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
import { Session } from '/@/utils/storage';
|
import { Session } from '/@/utils/storage';
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
@ -17,7 +17,7 @@ const service: AxiosInstance = axios.create({
|
|||||||
|
|
||||||
// 添加请求拦截器
|
// 添加请求拦截器
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
(config: AxiosRequestConfig) => {
|
(config) => {
|
||||||
// 在发送请求之前做些什么 token
|
// 在发送请求之前做些什么 token
|
||||||
if (Session.get('token')) {
|
if (Session.get('token')) {
|
||||||
config.headers!['Authorization'] = `${Session.get('token')}`;
|
config.headers!['Authorization'] = `${Session.get('token')}`;
|
||||||
|
|||||||
@ -8,18 +8,23 @@ import Cookies from 'js-cookie';
|
|||||||
* @method clear 移除全部永久缓存
|
* @method clear 移除全部永久缓存
|
||||||
*/
|
*/
|
||||||
export const Local = {
|
export const Local = {
|
||||||
|
// 查看 v2.4.3版本更新日志
|
||||||
|
setKey(key: string) {
|
||||||
|
// @ts-ignore
|
||||||
|
return `${__NEXT_NAME__}:${key}`;
|
||||||
|
},
|
||||||
// 设置永久缓存
|
// 设置永久缓存
|
||||||
set(key: string, val: any) {
|
set<T>(key: string, val: T) {
|
||||||
window.localStorage.setItem(key, JSON.stringify(val));
|
window.localStorage.setItem(Local.setKey(key), JSON.stringify(val));
|
||||||
},
|
},
|
||||||
// 获取永久缓存
|
// 获取永久缓存
|
||||||
get(key: string) {
|
get(key: string) {
|
||||||
let json = <string>window.localStorage.getItem(key);
|
let json = <string>window.localStorage.getItem(Local.setKey(key));
|
||||||
return JSON.parse(json);
|
return JSON.parse(json);
|
||||||
},
|
},
|
||||||
// 移除永久缓存
|
// 移除永久缓存
|
||||||
remove(key: string) {
|
remove(key: string) {
|
||||||
window.localStorage.removeItem(key);
|
window.localStorage.removeItem(Local.setKey(key));
|
||||||
},
|
},
|
||||||
// 移除全部永久缓存
|
// 移除全部永久缓存
|
||||||
clear() {
|
clear() {
|
||||||
@ -36,20 +41,20 @@ export const Local = {
|
|||||||
*/
|
*/
|
||||||
export const Session = {
|
export const Session = {
|
||||||
// 设置临时缓存
|
// 设置临时缓存
|
||||||
set(key: string, val: any) {
|
set<T>(key: string, val: T) {
|
||||||
if (key === 'token') return Cookies.set(key, val);
|
if (key === 'token') return Cookies.set(key, val);
|
||||||
window.sessionStorage.setItem(key, JSON.stringify(val));
|
window.sessionStorage.setItem(Local.setKey(key), JSON.stringify(val));
|
||||||
},
|
},
|
||||||
// 获取临时缓存
|
// 获取临时缓存
|
||||||
get(key: string) {
|
get(key: string) {
|
||||||
if (key === 'token') return Cookies.get(key);
|
if (key === 'token') return Cookies.get(key);
|
||||||
let json = <string>window.sessionStorage.getItem(key);
|
let json = <string>window.sessionStorage.getItem(Local.setKey(key));
|
||||||
return JSON.parse(json);
|
return JSON.parse(json);
|
||||||
},
|
},
|
||||||
// 移除临时缓存
|
// 移除临时缓存
|
||||||
remove(key: string) {
|
remove(key: string) {
|
||||||
if (key === 'token') return Cookies.remove(key);
|
if (key === 'token') return Cookies.remove(key);
|
||||||
window.sessionStorage.removeItem(key);
|
window.sessionStorage.removeItem(Local.setKey(key));
|
||||||
},
|
},
|
||||||
// 移除全部临时缓存
|
// 移除全部临时缓存
|
||||||
clear() {
|
clear() {
|
||||||
|
|||||||
@ -8,21 +8,12 @@
|
|||||||
element-loading-background="rgba(255, 255, 255, 0.1)"
|
element-loading-background="rgba(255, 255, 255, 0.1)"
|
||||||
:class="{ 'min-h-360': state.tableData.data.length <= 0 }"
|
:class="{ 'min-h-360': state.tableData.data.length <= 0 }"
|
||||||
>
|
>
|
||||||
<div
|
<div v-for="(val, key) in state.filtering" :key="key" ref="dlRefs" class="filtering-list-flex">
|
||||||
v-for="(val, key) in filtering"
|
|
||||||
:key="key"
|
|
||||||
:ref="
|
|
||||||
(el) => {
|
|
||||||
if (el) dlRefs[key] = el;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
class="filtering-list-flex"
|
|
||||||
>
|
|
||||||
<div class="filtering-list-title">{{ val.title }}</div>
|
<div class="filtering-list-title">{{ val.title }}</div>
|
||||||
<div class="filtering-list-item" :style="{ height: val.isMore ? 'auto' : '50px' }">
|
<div class="filtering-list-item" :style="{ height: val.isMore ? 'auto' : '50px' }">
|
||||||
<span class="span" :class="v.active ? 'dd-active' : ''" v-for="(v, k) in val.children" :key="k" @click="onSelItem(val, v)">{{
|
<span class="span" :class="v.active ? 'dd-active' : ''" v-for="(v, k) in val.children" :key="k" @click="onSelItem(val, v)">
|
||||||
v.label
|
{{ v.label }}
|
||||||
}}</span>
|
</span>
|
||||||
<div class="dd-more" v-if="val.isShowMore" @click="val.isMore = !val.isMore">
|
<div class="dd-more" v-if="val.isShowMore" @click="val.isMore = !val.isMore">
|
||||||
<span>{{ val.isMore ? '收起' : '展开' }}</span>
|
<span>{{ val.isMore ? '收起' : '展开' }}</span>
|
||||||
<i :class="val.isMore ? 'el-icon-arrow-down' : 'el-icon-arrow-right'"></i>
|
<i :class="val.isMore ? 'el-icon-arrow-down' : 'el-icon-arrow-right'"></i>
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div
|
<div
|
||||||
ref="leftNavRefs"
|
ref="leftNavRefs"
|
||||||
v-for="val in leftNavList"
|
v-for="val in state.leftNavList"
|
||||||
:key="val.id"
|
:key="val.id"
|
||||||
:style="{ height: val.isOpen ? 'auto' : '50px', overflow: 'hidden' }"
|
:style="{ height: val.isOpen ? 'auto' : '50px', overflow: 'hidden' }"
|
||||||
class="workflow-left-id"
|
class="workflow-left-id"
|
||||||
@ -86,6 +86,8 @@ const Drawer = defineAsyncComponent(() => import('./component/drawer/index.vue')
|
|||||||
const Help = defineAsyncComponent(() => import('./component/tool/help.vue'));
|
const Help = defineAsyncComponent(() => import('./component/tool/help.vue'));
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
|
const leftNavRefs = ref([]);
|
||||||
|
const workflowRightRef = ref();
|
||||||
const contextmenuNodeRef = ref();
|
const contextmenuNodeRef = ref();
|
||||||
const contextmenuLineRef = ref();
|
const contextmenuLineRef = ref();
|
||||||
const drawerRef = ref();
|
const drawerRef = ref();
|
||||||
@ -95,8 +97,6 @@ const storesThemeConfig = useThemeConfig();
|
|||||||
const { themeConfig } = storeToRefs(storesThemeConfig);
|
const { themeConfig } = storeToRefs(storesThemeConfig);
|
||||||
const { copyText } = commonFunction();
|
const { copyText } = commonFunction();
|
||||||
const state = reactive<WorkflowState>({
|
const state = reactive<WorkflowState>({
|
||||||
workflowRightRef: null,
|
|
||||||
leftNavRefs: [],
|
|
||||||
leftNavList: [],
|
leftNavList: [],
|
||||||
dropdownNode: { x: '', y: '' },
|
dropdownNode: { x: '', y: '' },
|
||||||
dropdownLine: { x: '', y: '' },
|
dropdownLine: { x: '', y: '' },
|
||||||
@ -151,7 +151,7 @@ const initLeftNavList = () => {
|
|||||||
};
|
};
|
||||||
// 左侧导航-初始化拖动
|
// 左侧导航-初始化拖动
|
||||||
const initSortable = () => {
|
const initSortable = () => {
|
||||||
state.leftNavRefs.forEach((v) => {
|
leftNavRefs.value.forEach((v) => {
|
||||||
Sortable.create(v as HTMLDivElement, {
|
Sortable.create(v as HTMLDivElement, {
|
||||||
group: {
|
group: {
|
||||||
name: 'vue-next-admin-1',
|
name: 'vue-next-admin-1',
|
||||||
@ -165,7 +165,7 @@ const initSortable = () => {
|
|||||||
onEnd: function (evt: any) {
|
onEnd: function (evt: any) {
|
||||||
const { name, icon, id } = evt.clone.dataset;
|
const { name, icon, id } = evt.clone.dataset;
|
||||||
const { layerX, layerY, clientX, clientY } = evt.originalEvent;
|
const { layerX, layerY, clientX, clientY } = evt.originalEvent;
|
||||||
const el = state.workflowRightRef!;
|
const el = workflowRightRef.value!;
|
||||||
const { x, y, width, height } = el.getBoundingClientRect();
|
const { x, y, width, height } = el.getBoundingClientRect();
|
||||||
if (clientX < x || clientX > width + x || clientY < y || y > y + height) {
|
if (clientX < x || clientX > width + x || clientY < y || y > y + height) {
|
||||||
ElMessage.warning('请把节点拖入到画布中');
|
ElMessage.warning('请把节点拖入到画布中');
|
||||||
|
|||||||
@ -25,7 +25,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
|
|||||||
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,
|
||||||
open: env.VITE_OPEN,
|
open: JSON.parse(env.VITE_OPEN),
|
||||||
hmr: true,
|
hmr: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/gitee': {
|
'/gitee': {
|
||||||
@ -57,7 +57,8 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
|
|||||||
__VUE_I18N_LEGACY_API__: JSON.stringify(false),
|
__VUE_I18N_LEGACY_API__: JSON.stringify(false),
|
||||||
__VUE_I18N_FULL_INSTALL__: JSON.stringify(false),
|
__VUE_I18N_FULL_INSTALL__: JSON.stringify(false),
|
||||||
__INTLIFY_PROD_DEVTOOLS__: JSON.stringify(false),
|
__INTLIFY_PROD_DEVTOOLS__: JSON.stringify(false),
|
||||||
__VERSION__: JSON.stringify(process.env.npm_package_version),
|
__NEXT_VERSION__: JSON.stringify(process.env.npm_package_version),
|
||||||
|
__NEXT_NAME__: JSON.stringify(process.env.npm_package_name),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user