How to adjust the prefixCls value in component js in antd

The purpose of

is to prefix styles and avoid style conflicts.

When defining styles in

less, they themselves use uniform variables, so in less-loader, I can solve the prefix problem in css by directly giving a variable value of ant-prefix .

however, when writing className in js, it also involves the class name. I see that each component has a props value of prefixCls, which has a default value, and I can also pass in the value to change it. However, every time I use a component, I have to send a prefixCls into it. This method is too scary. There should be ways to use it that I don"t know.

so, the question is, if I have changed the value of ant-prefix in less, is there any way I can uniformly change the corresponding class name in the corresponding js, that is, the value of prefixCls this props?

Mar.05,2021

antd has a global configuration component of ConfigProvider, in which the prefixCls, prefix can be set uniformly. For more information, please see ider-cn/" rel=" nofollow noreferrer "> https://ant-design.gitee.io/c.

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8b6b-47cd1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8b6b-47cd1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?