perf: enable strict ts type checking (#4045)
This commit is contained in:
@@ -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);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import type { SubMenuProvider } from '../interface';
|
||||
|
||||
import { computed, getCurrentInstance } from 'vue';
|
||||
|
||||
import { SubMenuProvider } from '../interface';
|
||||
import { findComponentUpward } from '../utils';
|
||||
|
||||
function useMenu() {
|
||||
|
@@ -1,10 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import type { MenuRecordRaw } from '@vben-core/typings';
|
||||
|
||||
import type { MenuProps } from './interface';
|
||||
|
||||
import { useForwardProps } from '@vben-core/composables';
|
||||
|
||||
import { Menu } from './components';
|
||||
import { MenuProps } from './interface';
|
||||
import SubMenu from './sub-menu.vue';
|
||||
|
||||
interface Props extends MenuProps {
|
||||
|
Reference in New Issue
Block a user