diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index 89b1f4c..3082beb 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -126,7 +126,7 @@ const toggleDark = () => useToggle(isDark); const topNavChange = (val: any) => { if (!val) { appStore.toggleSideBarHide(false); - permissionStore.setSidebarRouters(permissionStore.defaultRoutes); + permissionStore.setSidebarRouters(permissionStore.defaultRoutes as any); } }; diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index a905c70..939d08b 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -29,13 +29,13 @@ import useSettingsStore from '@/store/modules/settings'; import usePermissionStore from '@/store/modules/permission'; import { RouteRecordRaw } from 'vue-router'; -const { proxy } = getCurrentInstance(); +const { proxy } = getCurrentInstance() as ComponentInternalInstance; const route = useRoute(); const appStore = useAppStore(); const settingsStore = useSettingsStore(); const permissionStore = usePermissionStore(); -const sidebarRouters = computed(() => permissionStore.sidebarRouters); +const sidebarRouters = computed(() => permissionStore.sidebarRouters as any); const showLogo = computed(() => settingsStore.sidebarLogo); const sideTheme = computed(() => settingsStore.sideTheme); const theme = computed(() => settingsStore.theme); diff --git a/src/layout/components/TopBar/search.vue b/src/layout/components/TopBar/search.vue index 62322a4..440b88d 100644 --- a/src/layout/components/TopBar/search.vue +++ b/src/layout/components/TopBar/search.vue @@ -54,7 +54,7 @@ const state = reactive({ const openSearch = () => { state.menuQuery = ''; state.isShowSearch = true; - state.menuList = generateRoutes(routes.value); + state.menuList = generateRoutes(routes.value as any); nextTick(() => { setTimeout(() => { layoutMenuAutocompleteRef.value.focus(); diff --git a/src/types/element.d.ts b/src/types/element.d.ts index 6a7bdef..4ab01d5 100644 --- a/src/types/element.d.ts +++ b/src/types/element.d.ts @@ -5,30 +5,30 @@ declare global { declare type ElTableInstance = ep.TableInstance; declare type ElUploadInstance = ep.UploadInstance; declare type ElScrollbarInstance = ep.ScrollbarInstance; + declare type ElInputInstance = ep.InputInstance; + declare type ElInputNumberInstance = ep.InputNumberInstance; + declare type ElRadioInstance = ep.RadioInstance; + declare type ElRadioGroupInstance = ep.RadioGroupInstance; + declare type ElRadioButtonInstance = ep.RadioButtonInstance; + declare type ElCheckboxInstance = ep.CheckboxInstance; + declare type ElSwitchInstance = ep.SwitchInstance; + declare type ElCascaderInstance = ep.CascaderInstance; + declare type ElColorPickerInstance = ep.ColorPickerInstance; + declare type ElRateInstance = ep.RateInstance; + declare type ElSliderInstance = ep.SliderInstance; + declare type TransferKey = ep.TransferKey; + declare type CheckboxValueType = ep.CheckboxValueType; + declare type ElFormRules = ep.FormRules; + declare type DateModelType = ep.DateModelType; + declare type UploadFile = ep.UploadFile; + declare type ElTreeInstance = InstanceType; declare type ElTreeSelectInstance = InstanceType; declare type ElSelectInstance = InstanceType; declare type ElCardInstance = InstanceType; declare type ElDialogInstance = InstanceType; - declare type ElInputInstance = InstanceType; - declare type ElInputNumberInstance = InstanceType; - declare type ElRadioInstance = InstanceType; - declare type ElRadioGroupInstance = InstanceType; - declare type ElRadioButtonInstance = InstanceType; - declare type ElCheckboxInstance = InstanceType; declare type ElCheckboxGroupInstance = InstanceType; - declare type ElSwitchInstance = InstanceType; declare type ElDatePickerInstance = InstanceType; declare type ElTimePickerInstance = InstanceType; declare type ElTimeSelectInstance = InstanceType; - declare type ElCascaderInstance = InstanceType; - declare type ElColorPickerInstance = InstanceType; - declare type ElRateInstance = InstanceType; - declare type ElSliderInstance = InstanceType; - - declare type TransferKey = ep.TransferKey; - declare type CheckboxValueType = ep.CheckboxValueType; - declare type ElFormRules = ep.FormRules; - declare type DateModelType = ep.DateModelType; - declare type UploadFile = typeof ep.UploadFile; } diff --git a/src/views/monitor/cache/index.vue b/src/views/monitor/cache/index.vue index c58f89c..81bbf2d 100644 --- a/src/views/monitor/cache/index.vue +++ b/src/views/monitor/cache/index.vue @@ -126,8 +126,9 @@