Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[comp:button] add icon component #20

Closed
1 task done
danranVm opened this issue Dec 14, 2020 · 0 comments
Closed
1 task done

[comp:button] add icon component #20

danranVm opened this issue Dec 14, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@danranVm
Copy link
Member

danranVm commented Dec 14, 2020

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

What problem does this feature solve?

  • svg
  • 支持静态加载
  • 支持动态加载
  • 支持IconFont
  • 支持自定义图标(svg)

What does the proposed API look like?

ix-icon

参数 说明 类型 全局配置
[type] 图标类型,遵循图标的命名规范 string
[theme] 图标主题风格。可选实心、描线、双色等主题风格,适用于官方图标 'fill'丨'outline'丨'twotone' 'outline'
[spin] 是否有旋转动画 boolean false
[color] 仅适用双色图标,设置双色图标的主要颜色 string 'primary'
[iconfont] 指定来自 IconFont 的图标类型 string -
[rotate] 图标旋转角度 number -

[useIcon]

方法 说明 参数
addIcon() 用于静态引入图标 Array
addIconLiteral() 用于静态引入用户自定义图标 string
fetchFromIconfont() 用于从 FontIcon 获取图标资源文件 IconfontOption
changeAssetsSource() 用于修改动态加载 icon 的资源前缀,使得你可以部署图标资源到你想要的任何位置,例如 cdn string
@danranVm danranVm added the enhancement New feature or request label Dec 14, 2020
@danranVm danranVm self-assigned this Dec 14, 2020
@danranVm danranVm mentioned this issue Dec 14, 2020
95 tasks
@danranVm danranVm added this to the v1.0.0 milestone Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant