import type { Store } from 'vuex' declare module '@vue/runtime-core' { // 声明自己的 store state interface State { count: number } // 为 `this.$store` 提供类型声明 interface ComponentCustomProperties { $store: Store } } interface ImportMetaEnv { readonly VITE_API_BASE_URL: string // 更多环境变量... }