Vue3 工程文件、目录说明 作者:马育民 • 2025-06-07 20:20 • 阅读:10003 # 工程根目录 [](https://www.malaoshi.top/upload/0/0/1GW1GhbuZerd.png) - index.html:是入口文件,引入 `src/main.ts` 文件。与 Vue2不同 # src目录 [](https://www.malaoshi.top/upload/0/0/1GW1Ghe2VBFj.png) - main.ts:入口文件 `index.html` 引入该文件 ### main.ts ``` // 引入createApp,用于创建应用 import { createApp } from 'vue' // 引入App.vue 根组件,相当于一个 .html 页面 import App from './App.vue' // 将 App.vue 页面显示到 id 是 app的标签中 createApp(App).mount('#app') ``` **根组件:**其他子组件显示在根组件中 原文出处:http://malaoshi.top/show_1GW1GiXNsYUW.html