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/@core/base/design/src/design-tokens/dark/index.css b/packages/@core/base/design/src/design-tokens/dark/index.css index 5f244442..07776f5b 100644 --- a/packages/@core/base/design/src/design-tokens/dark/index.css +++ b/packages/@core/base/design/src/design-tokens/dark/index.css @@ -39,6 +39,11 @@ /* Used for success actions such as */ + --info: 180, 1.54%, 12.75%; + --info-foreground: 220, 4%, 58%; + + /* Used for success actions such as */ + --success: 144 57% 58%; --success-foreground: 0 0% 98%; diff --git a/packages/@core/base/design/src/design-tokens/default/index.css b/packages/@core/base/design/src/design-tokens/default/index.css index aa41d23e..b999e129 100644 --- a/packages/@core/base/design/src/design-tokens/default/index.css +++ b/packages/@core/base/design/src/design-tokens/default/index.css @@ -38,6 +38,11 @@ /* Used for success actions such as */ + --info: 240, 5%, 96%; + --info-foreground: 220, 4%, 58%; + + /* Used for success actions such as */ + --success: 144 57% 58%; --success-foreground: 0 0% 98%; diff --git a/packages/effects/hooks/src/use-design-tokens.ts b/packages/effects/hooks/src/use-design-tokens.ts index 4f786302..0b4e0988 100644 --- a/packages/effects/hooks/src/use-design-tokens.ts +++ b/packages/effects/hooks/src/use-design-tokens.ts @@ -216,7 +216,7 @@ export function useElementPlusDesignTokens() { : getCssVariableValue('--destructive-50'), '--el-color-info-light-8': border, - '--el-color-info-light-9': background, + '--el-color-info-light-9': getCssVariableValue('--info'), // getCssVariableValue('--secondary'), '--el-color-primary': getCssVariableValue('--primary-500'), '--el-color-primary-dark-2': getCssVariableValue('--primary'), @@ -258,6 +258,12 @@ export function useElementPlusDesignTokens() { '--el-fill-color-blank': background, '--el-fill-color-light': getCssVariableValue('--accent'), '--el-fill-color-lighter': getCssVariableValue('--accent-lighter'), + + // 解决ElLoading背景色问题 + '--el-mask-color': isDark.value + ? 'rgba(0,0,0,.8)' + : 'rgba(255,255,255,.9)', + '--el-text-color-primary': getCssVariableValue('--foreground'), '--el-text-color-regular': getCssVariableValue('--foreground'), diff --git a/packages/effects/layouts/src/basic/content/content.vue b/packages/effects/layouts/src/basic/content/content.vue index ffeaa666..4ce9e4db 100644 --- a/packages/effects/layouts/src/basic/content/content.vue +++ b/packages/effects/layouts/src/basic/content/content.vue @@ -53,13 +53,20 @@ function transformComponent( component: VNode, route: RouteLocationNormalizedLoadedGeneric, ) { + // 组件视图未找到,如果有设置后备视图,则返回后备视图,如果没有,则抛出错误 + if (!component) { + console.error( + 'Component view not found,please check the route configuration', + ); + return undefined; + } + const routeName = route.name as string; // 如果组件没有 name,则直接返回 if (!routeName) { return component; } - - const componentName = (component.type as any).name; + const componentName = (component?.type as any)?.name; // 已经设置过 name,则直接返回 if (componentName) { 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/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue b/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue index 9a0f2d10..79695c41 100644 --- a/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue +++ b/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue @@ -174,12 +174,15 @@ if (enableShortcutKey.value) { />
{{ text }} - - {{ tagText }} - + + + {{ tagText }} + +
{{ description }} @@ -208,7 +211,7 @@ if (enableShortcutKey.value) { {{ altView }} L - + 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() {