-
Notifications
You must be signed in to change notification settings - Fork 298
fix: harmony review #3002
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
fix: harmony review #3002
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
a0bfd14
fix: checkbox review
oasis-cloud 93dd212
fix: input review
oasis-cloud b124726
fix: searchbar review
oasis-cloud c830b8f
fix: loading review
oasis-cloud fde649b
fix: indicator review
oasis-cloud 61a3914
fix: radio review
oasis-cloud 8141d2f
fix: numberkeyboard review
oasis-cloud a12c2ec
fix: button review
oasis-cloud 9122b8f
fix: linheight
oasis-cloud 90c7381
Merge branch 'feat_v3.x' into fix_harmony-review
oasis-cloud 4781391
Merge branch 'feat_v3.x' into fix_harmony-review
oasis-cloud 43844bb
feat: add new css var
oasis-cloud dc4007e
feat: update docs
oasis-cloud 136294b
fix: indicator
oasis-cloud bc5e73e
fix: checkbox
oasis-cloud 5e1131a
fix: checkbox
oasis-cloud d76112a
test: update
oasis-cloud 03119cd
test: update
oasis-cloud 7b2d59c
feat: update demos
oasis-cloud 04fbd6a
fix: checkbox
oasis-cloud d3bd366
fix: indicator
oasis-cloud 8cdf0c8
fix: indicator
oasis-cloud 8d9a7a6
fix: navbar
oasis-cloud b4abea4
fix: css var
oasis-cloud c8d910a
chore: update size
oasis-cloud 955feb2
chore: update size
oasis-cloud cba4c78
docs: update docs
oasis-cloud b8801a2
docs: update docs
oasis-cloud 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import React from 'react' | ||
| import { Text } from '@tarojs/components' | ||
| import { Button, Cell } from '@nutui/nutui-react-taro' | ||
| import { Plus, Star } from '@nutui/icons-react-taro' | ||
| import { harmony } from '@/utils/platform-taro' | ||
|
|
@@ -13,42 +14,42 @@ const Demo4 = () => { | |
| <Cell style={{ flexWrap: 'wrap' }}> | ||
| <Button | ||
| type="primary" | ||
| icon={<Star />} | ||
| rightIcon={<Star />} | ||
| icon={<Star color="#ffffff" />} | ||
| rightIcon={<Star color="#ffffff" />} | ||
| style={marginStyle} | ||
|
oasis-cloud marked this conversation as resolved.
|
||
| > | ||
| Button | ||
| </Button> | ||
| <Button | ||
| type="primary" | ||
| fill="outline" | ||
| icon={<Star />} | ||
| rightIcon={<Star />} | ||
| icon={<Star color="#ff0f23" />} | ||
| rightIcon={<Star color="#ff0f23" />} | ||
| style={marginStyle} | ||
| > | ||
| Button | ||
| </Button> | ||
| <Button | ||
| type="primary" | ||
| fill="dashed" | ||
| icon={<Star />} | ||
| rightIcon={<Star />} | ||
| icon={<Star color="#ff0f23" />} | ||
| rightIcon={<Star color="#ff0f23" />} | ||
| style={marginStyle} | ||
| > | ||
| Button | ||
| </Button> | ||
| <Button | ||
| icon={<Star />} | ||
| rightIcon={<Star />} | ||
| icon={<Star color="#ff0f23" />} | ||
| rightIcon={<Star color="#ff0f23" />} | ||
| style={{ | ||
| margin: 8, | ||
| width: harmony() ? 140 : 'auto', | ||
| backgroundColor: `var(--nutui-color-primary-light-pressed)`, | ||
| borderColor: `var(--nutui-color-primary)`, | ||
| color: `var(--nutui-color-primary)`, | ||
| backgroundColor: `#ffebf1`, | ||
|
Collaborator
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. 这种需要给它加个 harmony 判断,保留其他端自定义变量的支持~ |
||
| borderColor: `#ff0f23`, | ||
| color: `#ff0f23`, | ||
| }} | ||
| > | ||
| Button | ||
| <Text style={{ color: '#ff0f23' }}>Button</Text> | ||
| </Button> | ||
| <Button | ||
| type="default" | ||
|
|
@@ -58,8 +59,8 @@ const Demo4 = () => { | |
| style={{ | ||
| margin: 8, | ||
| width: harmony() ? 140 : 'auto', | ||
| backgroundColor: `var(--nutui-gray-3)`, | ||
| color: `var(--nutui-gray-7)`, | ||
| backgroundColor: `#f2f3f5`, | ||
| color: `#1a1a1a`, | ||
| }} | ||
| > | ||
| Button | ||
|
|
@@ -72,8 +73,8 @@ const Demo4 = () => { | |
| style={{ | ||
| margin: 8, | ||
| width: harmony() ? 140 : 'auto', | ||
| backgroundColor: `var(--nutui-gray-1)`, | ||
| color: `var(--nutui-gray-7)`, | ||
| backgroundColor: `#ffffff`, | ||
|
oasis-cloud marked this conversation as resolved.
|
||
| color: `#1a1a1a`, | ||
| }} | ||
| > | ||
| Button | ||
|
|
@@ -90,23 +91,23 @@ const Demo4 = () => { | |
| shape="square" | ||
| fill="outline" | ||
| type="primary" | ||
| icon={<Plus size={10} />} | ||
| icon={<Plus size={10} color="#ff0f23" />} | ||
| style={{ | ||
| margin: 8, | ||
| }} | ||
| /> | ||
| <Button | ||
| fill="outline" | ||
| type="primary" | ||
| icon={<Plus size={10} />} | ||
| icon={<Plus size={10} color="#ff0f23" />} | ||
| style={{ | ||
| margin: 8, | ||
| }} | ||
| /> | ||
| <Button | ||
| type="primary" | ||
| fill="dashed" | ||
| icon={<Plus size={10} />} | ||
| icon={<Plus size={10} color="#ff0f23" />} | ||
| style={{ | ||
| margin: 8, | ||
| }} | ||
|
|
@@ -115,8 +116,8 @@ const Demo4 = () => { | |
| shape="round" | ||
| type="primary" | ||
| size="large" | ||
| icon={<Star />} | ||
| rightIcon={<Star />} | ||
| icon={<Star color="#ffffff" />} | ||
| rightIcon={<Star color="#ffffff" />} | ||
| style={marginStyle} | ||
| > | ||
| Button | ||
|
|
@@ -125,8 +126,8 @@ const Demo4 = () => { | |
| shape="round" | ||
| type="primary" | ||
| size="xlarge" | ||
| icon={<Star />} | ||
| rightIcon={<Star />} | ||
| icon={<Star color="#ffffff" />} | ||
| rightIcon={<Star color="#ffffff" />} | ||
| style={marginStyle} | ||
| > | ||
| Button | ||
|
|
||
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.
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.
其实只有 鸿蒙不支持,感觉写了浪费~
默认的放在样式里写更好。
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 使用的 currentcolor,鸿蒙不支持,所以才这样写的