Skip to content

ts got error when using <icon-font/> in ts #618

@Mister-Hope

Description

@Mister-Hope
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.3.7

Environment

win10 1809, chrome74, Vue 2.6.10

Reproduction link

https://github.com/GodofHope/antdVueBug

Steps to reproduce

Open about page, the icon can display, but there is something wrong

What is expected?

No error triggered

What is actually happening?

An error orrued:

Argument of type '{ components: { IconFont: Icon; }; }' is not assignable to parameter of type 'VueClass<Vue>'.
  Object literal may only specify known properties, but 'components' does not exist in type 'VueClass<Vue>'. Did you mean to write 'component'?

I looked the ts file and fount Icon.createFromIconfontCN type is Icon, and Icon is an extend from AntdComponent, AntdComponent is an extent of Vue. Do I write incorrect or there is something wrong with the ts file?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions