We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我是直接下载的这个模版项目,但是因为t-design里的t-class无法识别!的通配符,看到issue#129,issue#134的解释,想增加配置项customAttributes到config里,但是不知道应该加到哪里,可以请给个示例吗?
The text was updated successfully, but these errors were encountered:
比如 https://tdesign.tencent.com/miniprogram/components/button?tab=api#button-%E5%A4%96%E9%83%A8%E6%A0%B7%E5%BC%8F%E7%B1%BB
这个 t-button 有三个外部样式类 ['t-class', 't-class-icon', 't-class-loading'],你就可以这样配置: 来到 webpack.config.js 找到 UnifiedWebpackPluginV5:
t-button
['t-class', 't-class-icon', 't-class-loading']
webpack.config.js
UnifiedWebpackPluginV5
new UnifiedWebpackPluginV5({ customAttributes: { // 只对 t-button 标签生效 't-button': ['t-class', 't-class-icon', 't-class-loading'], //'*' 代表对所有的标签生效 //'*': ['t-class', 't-class-icon', 't-class-loading'], }, }),
同理,其他的组件的外部样式类,也可以这样配置。
当然,如果你能总结出转换属性名称的规律的话,数组里面也是允许传入正则表达式的。
Sorry, something went wrong.
sonofmagic
No branches or pull requests
我是直接下载的这个模版项目,但是因为t-design里的t-class无法识别!的通配符,看到issue#129,issue#134的解释,想增加配置项customAttributes到config里,但是不知道应该加到哪里,可以请给个示例吗?
The text was updated successfully, but these errors were encountered: