Don't hang your own things on the global
Type declaration:global.d.ts
import Vue from 'vue'
declare module 'vue/types/vue' {
interface Vue {
$message: any
}
}
declare global {
interface Window {
$message: any
Beidou: any
uploadType:string
}
}
Reason: Example this.
The variables found in the html tag are all called through the vue instance, that is, this., but the global window cannot be found.