关于className
来源:6-2 基础架构 - Menu组件编码第一部分

寂寞追不上我
2020-04-20
蟀七的老师,请问,antd那种antd-xxx的类名是开发的时候手写的呢,还是打包时通过loader加的,非常感谢!
写回答
1回答
-
张轩
2020-04-21
你好欧 都是手写的 请看如下代码
const classes = classNames(prefixCls, className, { [`${prefixCls}-${type}`]: type, [`${prefixCls}-${shape}`]: shape, [`${prefixCls}-${sizeCls}`]: sizeCls, [`${prefixCls}-icon-only`]: !children && children !== 0 && iconType, [`${prefixCls}-loading`]: !!loading, [`${prefixCls}-background-ghost`]: ghost, [`${prefixCls}-two-chinese-chars`]: hasTwoCNChar && autoInsertSpace, [`${prefixCls}-block`]: block, });
00
相似问题