problem description
vue+element-ui, is used in the development project to report an error when the elementui module is loaded on demand. I loaded the following three modules.
import {Message, Select, Cascader} from "element-ui";
console error: [Vue warn]: Unknown custom element: < el-option >-did you register the component correctly? For recursive components, make sure to provide the "name" option.
The error indicated above is related to the Select module, so at first I thought it was the Select module, so I disabled the Select module.import { Message, Cascader } from "element-ui";
although there is no error, the warning style of Message appears as soon as my page is refreshed, and normally it should not appear until the event is triggered.
then I disabled the Message module and reported the same error.
console error: [Vue warn]: Unknown custom element: < el-option >-did you register the component correctly? For recursive components, make sure to provide the "name" option.
then I tried various writing methods many times, and finally I singled out the Message module and introduced it separately, which did not report an error and showed normal.
import Message from "element-ui";
import { Select, Cascader } from "element-ui";
but there is a warning of "element-ui" entry multiple times.
I would like to mention that I have loaded other modules of elementUI on demand on multiple pages without errors or warnings.
I would like to ask you if you have encountered any similar problems and how to solve them.