When importing the element ui, you need to introduce the corresponding component in element.js if you choose on-demand import.
import { ElForm } from 'element-plus'
import { ElButton } from 'element-plus'
import { ElFormItem } from 'element-plus'
import { ElInput } from 'element-plus'
import lang from 'element-plus/lib/locale/lang/zh-cn'
import locale from 'element-plus/lib/locale'
export default (app) => {
locale.use(lang)
app.use(ElButton)
app.use(ElForm)
app.use(ElFormItem)
app.use(ElInput)
}
The page can be displayed normally
Read More:
- Vue Import element-plus Error: Failed to resolve import “element-pluslibtheme-chalkindex.css“ from “src
- [Solved] Vue3 Error: Failed to resolve component:xxx
- How to Solve Vue add element Install Error
- [Solved] Vue element UI form verification error: cannot read property ‘validate’ of undefined
- Vue warn]: vue3 element Component emit Pass Event Error
- Vue element component V-for error [How to Modify)
- [Solved] Vue Element Date plug-in reports an error in form validation
- [Solved] Element form method resetfields() error: vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read properties of undefined (reading ‘indexOf’)
- [Solved] Vue eslint Error: Component name “*****“ should always be multi-word
- [Solved] vue error: error Component name “School“ should always be multi-word vue/multi-word-component-names
- Failed to resolve async component default: ChunkLoadError: Loading chunk 7 failed
- Please transfer a valid prop path to form item
- How to Solve VUE Error: Avoid mutating a prop directly since the value will be overwritten …
- [Solved] Vue2.x vue-lazyload Error: Failed to resolve directive: lazy
- 9:13 error Component name “home“ should always be multi-word vue/multi-word-component-names
- [Solved] vue3vite Error: Failed to resolve import “@vue/server-renderer from “src\App.vue“. Does the file exist
- Element-plus Warning: ElementPlusError: [Util] binding value must be a string or number.
- [Solved] error Component name “xxx“ should always be multi-word vue/multi-word-comp
- Vue wran name Error: Unkown custom element [How to Solve]
- [Solved] Error in v-on handler: “Error: please transfer a valid prop path to form item