vue3全局挂载组件

全局挂载组件

main.ts
import { createApp } from 'vue';
import App from './App.vue';

import MyComponent from './components/MyComponent.vue';

const app = createApp(App);

app.component('MyComponent', MyComponent);

app.mount('#app');
MyComponent.vue





你可能感兴趣的:(vue3,vue.js,javascript,前端)