Skip to content

feat(radio): v15 #2879

New issue

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

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@
"sort": 6,
"show": true,
"taro": true,
"v15": true,
"author": "oasis"
},
{
Expand Down Expand Up @@ -740,7 +741,7 @@
"sort": 4,
"show": true,
"taro": true,
"v14": true,
"v15": true,
"author": "lzz"
},
{
Expand Down
3 changes: 3 additions & 0 deletions src/packages/radio/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@
&-icon {
&-checked {
color: $color-primary;
box-shadow: 0px 2px 4px 0px #ff0f2333;
border-radius: 50%;
Comment on lines +42 to +43
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

建议使用 rgba() 格式替代 #RRGGBBAA 格式的颜色值

在项目中发现了两处使用 #RRGGBBAA 格式的颜色值:

  • src/packages/radio/radio.scss: #ff0f2333
  • src/packages/popover/popover.scss: #3232331f

建议改为使用更广泛支持的 rgba() 格式,以提高兼容性。可参考项目中大量使用的 rgba() 写法,如:

  • 对应的透明度 0.2 (33/255) 可写为:rgba(255, 15, 35, 0.2)
  • 对应的透明度 0.12 (1f/255) 可写为:rgba(50, 50, 51, 0.12)
🔗 Analysis chain

建议检查颜色值的透明度表达方式。
“#ff0f2333” 的格式为 #RRGGBBAA,可能部分编译器或旧的 CSS 语法无法正常解析,也可考虑使用 RGBA。

以下脚本可协助搜索项目内其他类似用法并确认兼容性:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 在整个仓库搜索 “#RRGGBBAA” 格式的用法
rg --color=never "#[0-9A-Fa-f]\{8\}" -A 2

Length of output: 43


Script:

#!/bin/bash
# 修正正则表达式语法,搜索8位十六进制颜色值
rg --color=never "#[0-9A-Fa-f]{8}" -A 2

# 同时搜索其他透明度表达方式
rg --color=never "rgba?\(" -A 2

Length of output: 70757


&.nut-radio-icon-disabled {
color: $color-primary-disabled-special;
box-shadow: none;
}
}

Expand Down
Loading