优化代码提示
This commit is contained in:
parent
2ba3d67397
commit
c8d8d868ac
@ -7,8 +7,8 @@ interface SiteConfig {
|
||||
|
||||
export const useSiteConfigStore = defineStore('siteConfigStore', ()=> {
|
||||
const siteConfig = ref<SiteConfig>({
|
||||
protocol: import.meta.env.VITE_PROTOCOL as string,
|
||||
host: import.meta.env.VITE_HOST as string
|
||||
protocol: import.meta.env.VITE_PROTOCOL,
|
||||
host: import.meta.env.VITE_HOST
|
||||
})
|
||||
return { siteConfig }
|
||||
})
|
10
src/vite-env.d.ts
vendored
10
src/vite-env.d.ts
vendored
@ -1 +1,11 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_PROTOCOL: string,
|
||||
readonly VITE_HOST: string,
|
||||
readonly VITE_LOCALE: string,
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
Loading…
Reference in New Issue
Block a user