diff --git a/apps/backend-mock/api/menu/all.ts b/apps/backend-mock/api/menu/all.ts index b27b7ea4..580cee4f 100644 --- a/apps/backend-mock/api/menu/all.ts +++ b/apps/backend-mock/api/menu/all.ts @@ -1,7 +1,7 @@ import { verifyAccessToken } from '~/utils/jwt-utils'; import { unAuthorizedResponse } from '~/utils/response'; -export default eventHandler((event) => { +export default eventHandler(async (event) => { const userinfo = verifyAccessToken(event); if (!userinfo) { return unAuthorizedResponse(event); diff --git a/apps/backend-mock/api/user/info.ts b/apps/backend-mock/api/user/info.ts index e3526ae5..cfa2346c 100644 --- a/apps/backend-mock/api/user/info.ts +++ b/apps/backend-mock/api/user/info.ts @@ -6,6 +6,5 @@ export default eventHandler((event) => { if (!userinfo) { return unAuthorizedResponse(event); } - return useResponseSuccess(userinfo); }); diff --git a/internal/lint-configs/eslint-config/src/configs/unicorn.ts b/internal/lint-configs/eslint-config/src/configs/unicorn.ts index a160726f..3ce6f81c 100644 --- a/internal/lint-configs/eslint-config/src/configs/unicorn.ts +++ b/internal/lint-configs/eslint-config/src/configs/unicorn.ts @@ -26,6 +26,7 @@ export async function unicorn(): Promise { 'unicorn/prefer-at': 'off', 'unicorn/prefer-dom-node-text-content': 'off', 'unicorn/prefer-export-from': ['error', { ignoreUsedVariables: true }], + 'unicorn/prefer-global-this': 'off', 'unicorn/prefer-top-level-await': 'off', 'unicorn/prevent-abbreviations': 'off', }, diff --git a/package.json b/package.json index cb1d13ae..134ee34a 100644 --- a/package.json +++ b/package.json @@ -107,10 +107,10 @@ } }, "overrides": { - "@ctrl/tinycolor": "4.1.0", - "clsx": "2.1.1", - "pinia": "2.2.2", - "vue": "3.5.10" + "@ctrl/tinycolor": "catalog:", + "clsx": "catalog:", + "pinia": "catalog:", + "vue": "catalog:" }, "neverBuiltDependencies": [ "canvas", diff --git a/packages/effects/layouts/src/widgets/global-search/search-panel.vue b/packages/effects/layouts/src/widgets/global-search/search-panel.vue index 9f648ac3..36ad5a94 100644 --- a/packages/effects/layouts/src/widgets/global-search/search-panel.vue +++ b/packages/effects/layouts/src/widgets/global-search/search-panel.vue @@ -150,7 +150,7 @@ function removeItem(index: number) { } else { searchHistory.value.splice(index, 1); } - activeIndex.value = activeIndex.value - 1 >= 0 ? activeIndex.value - 1 : 0; + activeIndex.value = Math.max(activeIndex.value - 1, 0); scrollIntoView(); } diff --git a/packages/stores/src/modules/tabbar.ts b/packages/stores/src/modules/tabbar.ts index 6646ec9e..0c3850e7 100644 --- a/packages/stores/src/modules/tabbar.ts +++ b/packages/stores/src/modules/tabbar.ts @@ -209,7 +209,7 @@ export const useTabbarStore = defineStore('core-tabbar', { (item) => getTabPath(item) === getTabPath(tab), ); - if (index >= 0 && index < this.tabs.length - 1) { + if (index !== -1 && index < this.tabs.length - 1) { const rightTabs = this.tabs.slice(index + 1); const paths: string[] = []; diff --git a/playground/src/views/examples/vxe-table/basic.vue b/playground/src/views/examples/vxe-table/basic.vue index 69b0e090..75c034c1 100644 --- a/playground/src/views/examples/vxe-table/basic.vue +++ b/playground/src/views/examples/vxe-table/basic.vue @@ -75,7 +75,7 @@ function changeLoading() {