amis
amis copied to clipboard
js sdk 2.1.0 的antd.css的按钮组件的className的样式失效了
描述问题:
js sdk 2.1.0 的antd.css 在crud下 操作栏的 按钮组件的className的样式失效了
截图或视频:
如何复现(请务必完整填写下面内容):
-
你是如何使用 amis 的?
sdk
、 -
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 2.1.0
-
粘贴有问题的完整
amis schema
代码:
{
"type": "button",
"label": "删除",
"actionType": "ajax",
"level": "link",
"className": "text-danger",
"confirmText": "确定要删除?",
"api": {
"method": "delete",
"url": "/rampub/crond/${NO}"
}
}
...
<link rel="stylesheet" title="default" href="/static/amis/antd.css" />
<link rel="stylesheet" href="/static/amis/helper.css" />
<link rel="stylesheet" href="/static/amis/iconfont.css" />
....
theme: 'antd',
- 操作步骤 请简单描述一下复现的操作步骤...
👍 Thanks for this! 🏷 I have applied any labels matching special text in your issue.
Please review the labels and make any necessary changes.
@2betop @nwind @lurunze1226 这个建议调整工具类的优先级为最好,整体加上!important
看了下,应该是2.0版本开始,把工具类移到help里面去了 导致之前的工具类前面是有.amis-scope
的,而现在没有了,导致样式的优先级降级了,所以失效了,能想到的解决方案:
1、在help的工具类加上!important
来提升优先级,但是这样导致在disabled下面样式异常
2、去掉sdk主题样式打包前面的.amis-scope
前缀,使得优先级保持一致,
@2betop @nwind @lurunze1226 麻烦各位评估一下,谢谢!