Skip to content

ConfigProvider 设置 iconPrefixCls,@ant-design/icons-vue 的 icon 样式并没有变化过来 #7147

@nd-lqj

Description

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

Version

4.0.7

Environment

ant-design-vue@4.0.6

Reproduction link

Edit on CodeSandbox

Steps to reproduce

ConfigProvider.config({
prefixCls: 'antvprefix',
iconPrefixCls: 'antviconprefix',
});
带icon的 a-button 会生成样式对应的样式如下:
.antvprefix-btn >span .antviconprefix{margin-inline-start:8px;}
但是生成的dom结构里面icon的样式为anticon anticon-plus,iconPrefixCls 属性没有注入到 ant-design/icons-vue 中

What is expected?

iconPrefixCls 属性注入到 ant-design/icons-vue 中生成的icon的样式为 antviconprefix antviconprefix-plus

What is actually happening?

icon 的样式名还是默认的前缀 anticon anticon-plus

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