通过命令创建VUE脚手架:
npm install -g @vue/cli?
创建VUE项目:
vue create npg***b
剩下的就是一路回车
npm install element-plus --save
入口文件main.ts
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
const app = createApp(App)
app.use(ElementPlus)
app.use(router)
app.use(store)
app.mount('#app')
vue3中使用axios
npm install axios
在项目中创建http/index.js