vue 3.0 + Typescript + Element plus build project

Install Element plus

npm install element-plus --save

full import

// main.ts

import {
    
     createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import store from './store'

const app = createApp(App)

app.use(ElementPlus)
app.use(store)
app.use(router)
app.mount('#app')
// tsconfig.json
{
    
    
  "compilerOptions": {
    
    
    // ...
    "types": ["element-plus/global"]
  }
}

The next chapter is about the secondary packaging of Element plus

Guess you like

Origin blog.csdn.net/weixin_44872023/article/details/128928044