diff --git a/package.json b/package.json index a204ab5..f957184 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "front-next", - "version": "5.9.0", + "version": "5.9.1", "scripts": { "dev": "vite --host", "build": "vite build", diff --git a/src/cool/router/index.ts b/src/cool/router/index.ts index e715f1f..a1c6151 100644 --- a/src/cool/router/index.ts +++ b/src/cool/router/index.ts @@ -35,15 +35,6 @@ router.beforeResolve(() => { Loading.close(); }); -// 跳转 -router.href = function (path) { - const url = import.meta.env.BASE_URL + path; - - if (url != location.pathname) { - location.href = url; - } -}; - // 添加试图,页面路由 router.append = function (data) { const list = isArray(data) ? data : [data]; diff --git a/src/cool/service/request.ts b/src/cool/service/request.ts index ec365d0..00f1253 100644 --- a/src/cool/service/request.ts +++ b/src/cool/service/request.ts @@ -126,23 +126,23 @@ request.interceptors.response.use( if (status == 401) { user.logout(); - } - - if (isDev) { - ElMessage.error(`${config.url} ${status}`); } else { - switch (status) { - case 403: - router.href("403"); - break; + if (isDev) { + ElMessage.error(`${config.url} ${status}`); + } else { + switch (status) { + case 403: + router.push("/403"); + break; - case 500: - router.href("500"); - break; + case 500: + router.push("/500"); + break; - case 502: - router.href("502"); - break; + case 502: + router.push("/502"); + break; + } } } } diff --git a/src/cool/types/index.d.ts b/src/cool/types/index.d.ts index b89c524..bcb9348 100644 --- a/src/cool/types/index.d.ts +++ b/src/cool/types/index.d.ts @@ -27,7 +27,6 @@ export declare interface Module extends ModuleConfig { } export declare interface Router extends VueRouter { - href(path: string): void; find(path: string): RouteRecordRaw | undefined; append(data: any[] | any): void; [key: string]: any; diff --git a/src/cool/utils/loading.ts b/src/cool/utils/loading.ts index 8d49363..8b2e7da 100644 --- a/src/cool/utils/loading.ts +++ b/src/cool/utils/loading.ts @@ -5,7 +5,9 @@ export const Loading = { next: null, async set(list: any[]) { - await Promise.all(list); + try { + await Promise.all(list); + } catch (e) {} this.resolve(); }, diff --git a/src/modules/base/components/editor/wang.vue b/src/modules/base/components/editor/wang.vue index 4f13798..345e120 100644 --- a/src/modules/base/components/editor/wang.vue +++ b/src/modules/base/components/editor/wang.vue @@ -70,7 +70,6 @@ watch( () => props.modelValue, (val) => { value.value = val; - console.log(val); }, { immediate: true diff --git a/src/modules/base/layout/components/process.vue b/src/modules/base/layout/components/process.vue index 4a3e68c..9c88433 100644 --- a/src/modules/base/layout/components/process.vue +++ b/src/modules/base/layout/components/process.vue @@ -1,11 +1,16 @@ - - + + + 首页 + + + + 后退 - + - + @@ -29,7 +34,7 @@ import { watch } from "vue"; import { last } from "lodash-es"; import { useCool } from "/@/cool"; -import { ArrowLeft, Close } from "@element-plus/icons-vue"; +import { ArrowLeftBold, Close, HomeFilled } from "@element-plus/icons-vue"; import { ContextMenu } from "@cool-vue/crud"; import { useBase } from "/$/base"; import { Process } from "/$/base/types"; @@ -126,7 +131,7 @@ watch( margin-bottom: 10px; padding: 0 10px; - &__back { + &__icon { display: flex; justify-content: center; align-items: center; @@ -135,10 +140,17 @@ watch( padding: 0 10px; border-radius: 3px; margin-right: 10px; - font-size: 12px; cursor: pointer; color: #000; + span { + font-size: 12px; + } + + .el-icon { + margin-right: 2px; + } + &:hover { background-color: #eee; } @@ -147,13 +159,7 @@ watch( &__scroller { width: 100%; flex: 1; - overflow-x: auto; - overflow-y: hidden; white-space: nowrap; - - &::-webkit-scrollbar { - display: none; - } } &__item { diff --git a/src/modules/base/layout/components/route-nav.vue b/src/modules/base/layout/components/route-nav.vue index a9365e4..08fd7aa 100644 --- a/src/modules/base/layout/components/route-nav.vue +++ b/src/modules/base/layout/components/route-nav.vue @@ -6,7 +6,6 @@ - 首页 {{ item.meta?.label || item.name }} @@ -17,7 +16,7 @@ diff --git a/src/modules/demo/views/home/index.vue b/src/modules/demo/views/home/index.vue index 2548433..7a6f69e 100644 --- a/src/modules/demo/views/home/index.vue +++ b/src/modules/demo/views/home/index.vue @@ -1,5 +1,5 @@ - + @@ -64,7 +64,6 @@ import HotSearch from "./components/hot-search.vue";