ElemeFE / element-react

Element UI
https://elemefe.github.io/element-react/index
MIT License
2.83k stars 443 forks source link

ERROR in E:/web/node_modules/element-ui/types/element-ui.d.ts #992

Closed tianmingxing closed 5 years ago

tianmingxing commented 5 years ago

有在项目中安装infinite-scroll依赖,但仍然有下面的提示。

ERROR in E:/web/node_modules/element-ui/types/element-ui.d.ts
331:30 Cannot find name 'PluginObject'.
    329 | 
    330 | /** InfiniteScroll Directive */
  > 331 | export const InfiniteScroll: PluginObject<ElInfiniteScroll>;
        |                              ^
    332 | 
    333 | /** PageHeader Component */
    334 | export class PageHeader extends ElPageHeader {}
tianmingxing commented 5 years ago

If you want to fix this problem yourself, you can try this:

  1. Open the node_modules/element-ui/types/element-ui.d.ts file and modify the first line of content
  2. import Vue from 'vue' is modified to import Vue, {PluginObject} from 'vue'