首页 > 解决方案 > 如何让 Vue Element.io 在本地工作?

问题描述

我正在尝试在本地下载 Vue Element.io 。如果我使用 CDN 中的示例,则一切正常。但是,如果我链接到放置在文件系统上的组件,我会收到错误消息。

<script src="js/index.js"></script>

代替:

<script src="https://unpkg.com/element-ui/lib/index.js"></script>

我收到错误:

Unknown custom element: <el-button> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

我试图链接所有包和它的一部分(像按钮这样的单个元素)。你的错误是一样的。

在此处输入图像描述

标签: vue.js

解决方案


推荐阅读