From 4f5783d00bdf332176e8b2ad1b2550d9796afafc Mon Sep 17 00:00:00 2001 From: Vben Date: Mon, 5 Aug 2024 21:12:22 +0800 Subject: [PATCH] perf: enable strict ts type checking (#4045) --- apps/web-antd/src/layouts/basic.vue | 3 ++- apps/web-antd/src/locales/index.ts | 4 ++-- .../src/views/demos/access/button-control.vue | 8 +++++--- apps/web-antd/src/views/demos/access/index.vue | 11 ++++++++--- apps/web-ele/src/layouts/basic.vue | 3 ++- apps/web-ele/src/locales/index.ts | 6 +++--- apps/web-naive/src/app.vue | 3 ++- apps/web-naive/src/layouts/basic.vue | 3 ++- apps/web-naive/src/locales/index.ts | 4 ++-- docs/src/guide/essentials/icons.md | 2 -- internal/tsconfig/base.json | 3 +++ .../base/shared/src/colorful/generator.ts | 18 ++++++++++-------- .../preferences/src/update-css-variables.ts | 7 +++---- .../@core/ui-kit/layout-ui/src/vben-layout.vue | 3 ++- .../ui-kit/menu-ui/src/components/menu.vue | 6 ++++-- .../@core/ui-kit/menu-ui/src/hooks/use-menu.ts | 3 ++- packages/@core/ui-kit/menu-ui/src/menu.vue | 3 ++- .../src/components/button/icon-button.vue | 3 ++- .../count-to-animator/count-to-animator.vue | 2 +- .../src/components/hover-card/hover-card.vue | 11 ++++++++--- .../src/components/popover/popover.vue | 3 ++- .../render-content/render-content.vue | 5 ++++- .../src/components/tooltip/tooltip.vue | 4 ++-- .../tabs-ui/src/components/tabs/tabs.vue | 5 +++-- .../@core/ui-kit/tabs-ui/src/tabs-view.vue | 3 ++- packages/effects/access/src/accessible.ts | 2 +- .../src/authentication/login-expired-modal.vue | 3 ++- .../common-ui/src/authentication/login.vue | 3 ++- .../analysis/analysis-charts-tabs.vue | 2 +- packages/effects/layouts/src/basic/layout.vue | 3 ++- .../layouts/src/basic/menu/extra-menu.vue | 3 ++- .../effects/layouts/src/basic/menu/menu.vue | 3 ++- .../widgets/global-search/global-search.vue | 2 +- .../src/widgets/global-search/search-panel.vue | 10 ++++++---- .../preferences/blocks/layout/tabbar.vue | 3 ++- .../widgets/user-dropdown/user-dropdown.vue | 6 +++--- .../src/request-client/modules/interceptor.ts | 4 ++-- packages/locales/src/i18n.ts | 6 ++++-- packages/locales/src/typing.ts | 2 +- packages/stores/src/modules/tabbar.ts | 14 +++++++++++--- .../src/helpers/generate-routes-backend.ts | 8 ++++---- 41 files changed, 124 insertions(+), 76 deletions(-) diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index ab1832c2..630d8bdd 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -1,4 +1,6 @@ diff --git a/apps/web-antd/src/views/demos/access/index.vue b/apps/web-antd/src/views/demos/access/index.vue index 9bb5be54..7955d335 100644 --- a/apps/web-antd/src/views/demos/access/index.vue +++ b/apps/web-antd/src/views/demos/access/index.vue @@ -41,12 +41,17 @@ async function changeAccount(role: string) { const account = accounts[role]; resetAllStores(); - await accessStore.authLogin(account, async () => { - router.go(0); - }); + if (account) { + await accessStore.authLogin(account, async () => { + router.go(0); + }); + } } async function handleToggleAccessMode() { + if (!accounts.super) { + return; + } await toggleAccessMode(); resetAllStores(); diff --git a/apps/web-ele/src/layouts/basic.vue b/apps/web-ele/src/layouts/basic.vue index ab1832c2..630d8bdd 100644 --- a/apps/web-ele/src/layouts/basic.vue +++ b/apps/web-ele/src/layouts/basic.vue @@ -1,4 +1,6 @@ diff --git a/packages/effects/layouts/src/basic/layout.vue b/packages/effects/layouts/src/basic/layout.vue index b3e4c606..dd6099de 100644 --- a/packages/effects/layouts/src/basic/layout.vue +++ b/packages/effects/layouts/src/basic/layout.vue @@ -1,4 +1,6 @@