-
Notifications
You must be signed in to change notification settings - Fork 293
feat(price): 支持自定义颜色&数据原样输出 #3328
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
xiaoyatong
merged 9 commits into
jdf2e:feat_v3.x
from
irisSong:feature/price/harmonycpp
Aug 15, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d7e7d86
fix(badge): 解决中文偏上问题
irisSong 532e0e1
fix: css 变量更新
irisSong c912d43
Merge branch 'feat_v3.x' of https://github.com/irisSong/nutui-react i…
irisSong 9a49448
Merge remote-tracking branch 'upstream/feat_v3.x' into feat_v3.x
irisSong 0324919
Merge remote-tracking branch 'upstream/feat_v3.x' into feat_v3.x
irisSong 87c7e2e
Merge remote-tracking branch 'upstream/feat_v3.x' into feat_v3.x
irisSong a9e16bc
feat: 支持自定义颜色&数据原样输出
irisSong 4e9f2fd
feat(price): 价格净化
irisSong a761bbb
chore: 文档更新
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import React from 'react' | ||
| import { Price, Cell, CellGroup } from '@nutui/nutui-react' | ||
|
|
||
| const Demo10 = () => { | ||
| return ( | ||
| <CellGroup> | ||
| <Cell> | ||
| <Price price={618.68} size="small" thousands color="darkgray" /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.68} size="normal" thousands color="dark" /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.68} size="large" thousands color="blue" /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.68} size="xlarge" thousands color="#b5691a" /> | ||
| </Cell> | ||
| </CellGroup> | ||
| ) | ||
| } | ||
| export default Demo10 | ||
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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import React from 'react' | ||
| import { Price, Cell, CellGroup } from '@nutui/nutui-react' | ||
|
|
||
| const Demo11 = () => { | ||
| return ( | ||
| <CellGroup> | ||
| <Cell> | ||
| <Price price={618} size="small" thousands digits={null} /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.6} size="normal" thousands digits={null} /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.18} size="large" thousands digits={null} /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.111} size="xlarge" thousands digits={null} /> | ||
| </Cell> | ||
| </CellGroup> | ||
| ) | ||
| } | ||
| export default Demo11 |
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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import React from 'react' | ||
| import { Price, Cell, CellGroup } from '@nutui/nutui-react-taro' | ||
|
|
||
| const Demo10 = () => { | ||
| return ( | ||
| <CellGroup> | ||
| <Cell> | ||
| <Price price={618.68} size="small" thousands color="darkgray" /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.68} size="normal" thousands color="dark" /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.68} size="large" thousands color="blue" /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.68} size="xlarge" thousands color="#b5691a" /> | ||
| </Cell> | ||
| </CellGroup> | ||
| ) | ||
| } | ||
| export default Demo10 |
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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import React from 'react' | ||
| import { Price, Cell, CellGroup } from '@nutui/nutui-react-taro' | ||
|
|
||
| const Demo11 = () => { | ||
| return ( | ||
| <CellGroup> | ||
| <Cell> | ||
| <Price price={618} size="small" thousands digits={null} /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.6} size="normal" thousands digits={null} /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.18} size="large" thousands digits={null} /> | ||
| </Cell> | ||
| <Cell> | ||
| <Price price={618.111} size="xlarge" thousands digits={null} /> | ||
| </Cell> | ||
| </CellGroup> | ||
| ) | ||
| } | ||
| export default Demo11 |
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
Oops, something went wrong.
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.
💡 Verification agent
🧩 Analysis chain
color="dark" 不是有效的预置 token 或 CSS 颜色名
建议改为 'darkgray'(预置 token)或一个自定义可识别颜色。
另外请同步排查 Taro 端 Demo10 是否也使用了 "dark":
🏁 Script executed:
Length of output: 285
修复 Price 示例中无效的 color="dark"
color="dark" 既不是预置 token(可用:'primary' | 'gray' | 'darkgray'),也不是标准 CSS 颜色名,会导致渲染无效。请改为 'darkgray' 或其他合法的 CSS 颜色值。
需要修改的文件:
建议修改(在两个文件中均应用):
📝 Committable suggestion
🤖 Prompt for AI Agents