Vue3 introduces elementUI to report errors

Vue3 using elementUI has an unregistered error

insert image description here

First enter the command to install element-plus

console input

npm install element-plus –save

Second, register element-plus in main.js

import {
    
     createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
 
var app = createApp(App)
app.use(ElementPlus)
app.mount('#app')

Just start the project

Guess you like

Origin blog.csdn.net/YG_zhh/article/details/128566955