Skip to content

Empty setting configProvider prefixcls does not take effect #4446

@candy-Tong

Description

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

Version

1.7.6

Environment

windows10,google chrome 79.0.3945.130,vue 2.6.10

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. 用configProvider设置prefixCls
  2. 使用empty组件

What is expected?

empty组件的class,会被改变成设置的prefixCls

What is actually happening?

empty组件的class,没有被改变成设置的prefixCls


https://github.com/vueComponent/ant-design-vue/blob/1.7.3/components/empty/index.jsx#L32
不应该使用ConfigConsumerProps.getPrefixCls方法
应该像下面代码,inject configProvider
https://github.com/vueComponent/ant-design-vue/blob/1.7.3/components/input/Input.jsx#L62

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions