您好,我有一个新的Vue3应用程序使用Vite。我正在全局注册我的UserTextInput
组件,但在我的所有组件this.$options.components
是空的
import UserTextInput from "./components/defaultComponents/UserTextInput.vue";
const app = createApp(App);
app.component('UserTextInput', UserTextInput);
app.mount('#app');
在任何其他组件内部
mounted() {
console.log(this.$options.components); // {} empty object
},
我正在寻找一种方法来查看哪些组件已在全球注册。任何想法?
2条答案
按热度按时间tv6aics11#
你可以试试这个
mspsb9vt2#
我在我的Vue 3应用程序中找到了列表:
应用程序示例应用程序上下文组件