Skip to content

暴露 icon 组件的内置 type 数组 #1769

@EmiyaYang

Description

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

What problem does this feature solve?

暴露内置 iconTypeArr 数组, 便于开发者在使用自定义 SVG 图标时抹平 type 与 component 的差异.

import { iconTypeArr } from 'ant-design-vue'

function sample (type) {
    return iconTypeArr.includes(type) 
              ? <a-icon type={type} />
              : <a-icon component={type} />
}

What does the proposed API look like?

import { iconTypeArr } from 'ant-design-vue'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions