baidu / baidu/amis

sdk 2.0.2下部分className的样式失效了?

Open
#4,944 4 comments 0 reactions 0 assignees View on GitHub
need confirm
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

#### 描述问题:
sdk 2.0.2, 有些组件的className里的类名样式失效了! 而1.10.2里是正常的。
如一个简单的button

#### 截图或视频:

2.0.2下:
![image](https://user-images.githubusercontent.com/108504969/180207239-89566e6c-c62d-4004-a2ca-9a71057e836d.png)
1.10.2下:
![image](https://user-images.githubusercontent.com/108504969/180207477-61fea502-4807-48f6-82df-b7d4706308ea.png)

#### 如何复现(请务必完整填写下面内容):

1. 你是如何使用 amis 的?
sdk

2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
2.0.2

3. 粘贴有问题的完整 `amis schema` 代码:
简单的一个link button, 在1.10.2下文字颜色可以显示正确的危险红色, 2.0.2下就是错误的蓝色
```
{
"type": "page",
"body": [
{
"type": "button",
"label": "我是一个按钮",
"className": "text-danger",
"level": "link",
"id": "u:2a359e975e14"
}
],
"id": "u:af14b2badca0"
}
```

5. 操作步骤
按照上面的代码

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the provided button schema with amis SDK versions 2.0.2 and 1.10.2, then compare how the button's className is applied. The fix is complete when text-danger renders the link button text in the expected danger red in SDK 2.0.2, without regressing the older behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.