-
Notifications
You must be signed in to change notification settings - Fork 298
feat(switch): 适配 v16 #3483
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
feat(switch): 适配 v16 #3483
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3329762
fix: 移除jmfe桥接方式
irisSong da24c2c
feat(switch): 适配 v16
irisSong 033f713
fix: 优化wcsc 对嵌套 calc + var 解析成本高问题
irisSong e893795
style: 更新导出变量类型
irisSong 40ffbfe
Merge remote-tracking branch 'upstream/feat_v4.x' into feat_4.x
irisSong 1270145
style: theme-dark 变量更新
irisSong 92f8c1e
Merge remote-tracking branch 'upstream/feat_v4.x' into feat_4.x
irisSong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,15 +151,15 @@ $color-border-disabled: var(--nutui-color-border-disabled, #c2c4cc) !default; | |
| $color-title: var(--nutui-color-title, #1a1a1a) !default; | ||
| $color-text: var(--nutui-color-text, #505259) !default; | ||
| $color-text-help: var(--nutui-color-text-help, #888b94) !default; | ||
| $color-text-disabled: var(--nutui-color-text-disabled, #c2c4cc) !default; | ||
| $color-text-disabled: var(--nutui-color-text-disabled, #b4b8bf) !default; | ||
| $color-text-dark: var( | ||
| --nutui-color-text-dark, | ||
| rgba(255, 255, 255, 0.9) | ||
| ) !default; | ||
| $color-text-link: var(--nutui-color-text-link, #0c82f7) !default; | ||
|
|
||
| // 与品牌色一起使用,默认为白色,不区分暗黑与明亮模式。 | ||
| $color-primary-text: #ffffff !default; | ||
| $color-primary-text: var(--nutui-color-primary-text, #ffffff) !default; | ||
| $white: #ffffff !default; | ||
| $black: #000000 !default; | ||
|
|
||
|
|
@@ -1040,45 +1040,36 @@ $switch-active-disabled-background-color: var( | |
| ) !default; | ||
| $switch-inactive-disabled-background-color: var( | ||
| --nutui-switch-inactive-disabled-background-color, | ||
| $color-background | ||
| var(--nutui-color-background-component) | ||
| ) !default; | ||
| $switch-inactive-line-background-color: var( | ||
| --nutui-switch-inactive-line-background-color, | ||
| #ffffff | ||
| $color-primary-text | ||
| ) !default; | ||
| $switch-width: var(--nutui-switch-width, scale-px(46px)) !default; | ||
| $switch-height: var(--nutui-switch-height, scale-px(28px)) !default; | ||
| $switch-line-height: var(--nutui-switch-line-height, scale-px(28px)) !default; | ||
| $switch-width: var(--nutui-switch-width, scale-px(56px)) !default; | ||
| $switch-height: var(--nutui-switch-height, scale-px(24px)) !default; | ||
| $switch-inside-width: var(--nutui-switch-inside-width, scale-px(32px)) !default; | ||
| $switch-inside-height: var(--nutui-switch-inside-height, scale-px(20px)) !default; | ||
| $switch-border-radius: var( | ||
| --nutui-switch-border-radius, | ||
| $radius-circle | ||
| ) !default; | ||
| $switch-border-width: var(--nutui-switch-border-width, scale-px(2px)) !default; | ||
| $switch-inside-border-radius: var( | ||
| --nutui-switch-inside-border-radius, | ||
| $radius-full | ||
| ) !default; | ||
| /* #ifdef harmony */ | ||
| $switch-inside-box-shadow: var( | ||
| --nutui-switch-inside-box-shadow, | ||
| 0px scale-px(2px) scale-px(6px) 0px rgba(0, 0, 0, 0.1) | ||
| $radius-circle | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 验证 $radius-circle 的使用是否符合预期。 Line 1060 将
🤖 Prompt for AI Agents |
||
| ) !default; | ||
| /* #endif */ | ||
| /* #ifndef harmony */ | ||
| $switch-inside-box-shadow: var( | ||
| --nutui-switch-inside-box-shadow, | ||
| 0px scale-px(2px) scale-px(1px) 0px rgba(0, 0, 0, 0.06), | ||
| 0px scale-px(2px) scale-px(6px) 0px rgba(0, 0, 0, 0.1), | ||
| 0px 0px 0px scale-px(1px) rgba(0, 0, 0, 0.02) | ||
| 0px scale-px(4px) scale-px(8px) 0px rgba(0, 0, 0, 0.12) | ||
| ) !default; | ||
| /* #endif */ | ||
| $switch-label-text-color: var( | ||
| --nutui-switch-label-text-color, | ||
| $color-primary-text | ||
| ) !default; | ||
| $switch-label-font-size: var( | ||
| --nutui-switch-label-font-size, | ||
| $font-size-s | ||
| $font-size-xs | ||
| ) !default; | ||
| $switch-inactive-disabled-label-text-color: var( | ||
| --nutui-switch-inactive-disabled-label-text-color, | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
检查 icon 颜色语义:不应使用背景色 token 作为 icon 颜色。
Lines 72-76 将
.nut-icon的颜色设置为$switch-active-disabled-background-color,这在语义上不正确:$switch-active-disabled-background-color是一个背景颜色 token,用于禁用状态的背景相比之下,Line 91 的标签内 icon 正确使用了
$switch-label-text-color。建议修改:
$color-primary-text(按钮背景)对比的颜色,可能是$color-primary或新增的 icon 专用 token🤖 Prompt for AI Agents