--- vue2 : 在Vue.prototype中挂载 然后在组件的this 中调用
--- vue3 : 1. 挂载 app = create(); 2: app.config.globalProperties 在这里面挂载
2. 使用 方式一 全局挂载的变量 使用 import { getCurrentInstance , ComponentInternalInstance} from "vue"
const { proxy }: any = getCurrentInstance()
console.log("proxy", proxy.$DateFormat());
const { appContext: { config: { globalProperties } } } = getCurrentInstance() as ComponentInternalInstance;
* @type:1
* let obj: { [key:string]:any }= {}
* @type: 2
* let obj: Record<string,any>= {}