The project is a vue3 project created with vite, using js language
1.npm installation
npm install element-plus --save
2.Introduce element plus globally in main.js
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router/index'//引入路由
import store from '@/store/index' //引入vuex
import ElementPlus from 'element-plus' // 引入element-plus
import '../node_modules/element-plus/theme-chalk/index.css'
createApp(App)
.use(router)
.use(store)
.use(ElementPlus)
.mount('#app')
3. Use the test, find a piece of code from the official website and put it into the project to see if it can be displayed.
I found that vue3 now supports ts better. Most of the online literature is also a vue3 project based on ts syntax. Element-plus also uses ts syntax. It’s so embarrassing. ts has been included in the study plan.