Skip to content

Commit 59b4d8e

Browse files
committed
fix some already know issue
1 parent d3daa39 commit 59b4d8e

File tree

9 files changed

+30
-16
lines changed

9 files changed

+30
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The framework is available in js,ts, plus and electron versions
2828
- ts version:[vue3-element-ts](https://github.com/jzfai/vue3-admin-ts.git)
2929
- ts version for plus:[vue3-element-plus](https://github.com/jzfai/vue3-admin-plus.git)
3030
- ts version for electron:[vue3-element-electron](https://github.com/jzfai/vue3-admin-electron.git)
31-
- java Micro-service background data:[micro-service-plus](https://github.com/jzfai/micro-service-plus)
31+
- java Micro-service background data:[micro-service-single](https://github.com/jzfai/micro-service-single)
3232

3333

3434
## Build Setup

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue3-admin-template",
3-
"version": "2.0.2",
3+
"version": "2.0.5",
44
"license": "MIT",
55
"author": "kuanghua",
66
"packageManager": "pnpm@7.9.0",

src/hooks/use-error-log.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import settings from '@/settings'
55
import bus from '@/utils/bus'
66
import axiosReq from 'axios'
77
const reqUrl = '/integration-front/errorCollection/insert'
8+
let repeatErrorLogJudge = ''
9+
810
const errorLogReq = (errLog) => {
911
axiosReq({
10-
url: reqUrl,
12+
url: import.meta.env.VITE_APP_BASE_URL+reqUrl,
1113
data: {
12-
pageUrl: window.location.href,
14+
pageUrl: window.location.href,
1315
errorLog: errLog,
1416
browserType: navigator.userAgent,
1517
version: pack.version
@@ -25,8 +27,11 @@ export const useErrorLog = () => {
2527
//判断该环境是否需要收集错误日志,由settings配置决定
2628
if (settings.errorLog?.includes(import.meta.env.VITE_APP_ENV)) {
2729
jsErrorCollection({ runtimeError: true, rejectError: true, consoleError: true }, (errLog) => {
28-
//判断是否是reqUrl错误,避免死循环
29-
if (!errLog.includes(reqUrl)) errorLogReq(errLog)
30+
if (!repeatErrorLogJudge || !errLog.includes(repeatErrorLogJudge)) {
31+
errorLogReq(errLog)
32+
//移除重复日志,fix重复提交错误日志,避免造成死循环
33+
repeatErrorLogJudge = errLog.slice(0, 20)
34+
}
3035
})
3136
}
3237
}

src/layout/sidebar/index.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import Logo from './Logo.vue'
2525
import SidebarItem from './SidebarItem.vue'
2626
import { useBasicStore } from '@/store/basic'
2727
const { settings, allRoutes, sidebar } = storeToRefs(useBasicStore())
28-
const route = useRoute()
28+
const routeInstance = useRoute()
2929
const activeMenu = computed(() => {
30-
const { meta, path } = route
30+
const { meta, path } = routeInstance
3131
// if set path, the sidebar will highlight the path you set
3232
if (meta.activeMenu) {
3333
return meta.activeMenu
@@ -40,4 +40,7 @@ const activeMenu = computed(() => {
4040
.el-menu-vertical {
4141
width: var(--side-bar-width);
4242
}
43+
.reset-menu-style {
44+
border-right: 1px solid var(--side-bar-border-right-color);
45+
}
4346
</style>

src/permission.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { filterAsyncRouter, progressClose, progressStart } from '@/hooks/use-per
33
import { useBasicStore } from '@/store/basic'
44
import { userInfoReq } from '@/api/user'
55
import { langTitle } from '@/hooks/use-common'
6+
import settings from './settings'
67

78
//路由进入前拦截
89
//to:将要进入的页面 vue-router4.0 不推荐使用next()
@@ -11,6 +12,11 @@ router.beforeEach(async (to) => {
1112
progressStart()
1213
document.title = langTitle(to.meta?.title) // i18 page title
1314
const basicStore = useBasicStore()
15+
//not login
16+
if (!settings.isNeedLogin) {
17+
basicStore.setFilterAsyncRoutes([])
18+
return true
19+
}
1420
//1.判断token
1521
if (basicStore.token) {
1622
if (to.path === '/login') {

src/theme/base/custom/ct-css-vars.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ html.base-theme {
2424
--sidebar-logo-height: 32px;
2525
--sidebar-logo-title-color: #fff;
2626
--side-bar-width: 210px;
27-
--side-bar-border-right-color: #ddd;
27+
--side-bar-border-right-color: #eee;
2828
//TagsView
2929
--tags-view-background: #fff;
30-
--tags-view-border-bottom-color: #d8dce5;
30+
--tags-view-border-bottom: #eee;
3131
--tags-view-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
3232
--tags-view-item-background: #fff;
3333
--tags-view-item-border-color: #d8dce5;

src/theme/china-red/custom/ct-css-vars.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ html.china-red {
4747
--sidebar-logo-height: 32px;
4848
--sidebar-logo-title-color: #2b2f3a;
4949
--side-bar-width: 210px;
50-
--side-bar-border-right-color: #ddd;
50+
--side-bar-border-right-color: #eee;
5151
//TagsView
5252
--tags-view-background: #fff;
53-
--tags-view-border-bottom-color: #d8dce5;
53+
--tags-view-border-bottom: #d8dce5;
5454
--tags-view-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
5555
--tags-view-item-background: #fff;
5656
--tags-view-item-border-color: #d8dce5;

src/theme/dark/custom/ct-css-vars.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ html.dark {
2828
--side-bar-border-right-color: #2b2f3a;
2929
//TagsView
3030
--tags-view-background: #304156;
31-
--tags-view-border-bottom-color: #2b2f3a;
31+
--tags-view-border-bottom: #2b2f3a;
3232
--tags-view-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
3333
--tags-view-item-background: #fff;
3434
--tags-view-item-border-color: #d8dce5;

src/theme/lighting/custom/ct-css-vars.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ html.lighting-theme {
66
//--el-menu-bg-color: #304156;
77
//--el-menu-hover-bg-color: #263445;
88
//--el-menu-item-height: 56px;
9-
//--el-menu-border-color: none;
9+
--el-menu-border-color: none;
1010
/*layout section*/
1111
//layout
1212
--layout-border-left-color: #ddd;
@@ -24,10 +24,10 @@ html.lighting-theme {
2424
--sidebar-logo-height: 32px;
2525
--sidebar-logo-title-color: #2b2f3a;
2626
--side-bar-width: 210px;
27-
--side-bar-border-right-color: #ddd;
27+
--side-bar-border-right-color: #eee;
2828
//TagsView
2929
--tags-view-background: #fff;
30-
--tags-view-border-bottom-color: #d8dce5;
30+
--tags-view-border-bottom: #d8dce5;
3131
--tags-view-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
3232
--tags-view-item-background: #fff;
3333
--tags-view-item-border-color: #d8dce5;

0 commit comments

Comments
 (0)