import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
const app = createApp(App)
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$abc: any
}
}
app.use(router).mount('#app')
<script setup lang="ts">
import { getCurrentInstance, ComponentPublicInstance } from 'vue'
const instance = getCurrentInstance();
const proxy = instance?.proxy as ComponentPublicInstance
proxy.$abc = '12321312'
</script>