perf: enable strict ts type checking (#4045)

This commit is contained in:
Vben
2024-08-05 21:12:22 +08:00
committed by GitHub
parent e5ec8e6b51
commit 4f5783d00b
41 changed files with 124 additions and 76 deletions

View File

@@ -1,4 +1,6 @@
<script lang="ts" setup>
import type { UseResizeObserverReturn } from '@vueuse/core';
import type {
MenuItemClicked,
MenuItemRegistered,
@@ -22,7 +24,7 @@ import { useNamespace } from '@vben-core/composables';
import { Ellipsis } from '@vben-core/icons';
import { isHttpUrl } from '@vben-core/shared';
import { useResizeObserver, UseResizeObserverReturn } from '@vueuse/core';
import { useResizeObserver } from '@vueuse/core';
import {
createMenuContext,
@@ -273,7 +275,7 @@ function close(path: string) {
*/
function closeMenu(path: string, parentPaths: string[]) {
if (props.accordion) {
openedMenus.value = subMenus.value[path]?.parentPaths;
openedMenus.value = subMenus.value[path]?.parentPaths ?? [];
}
close(path);