-
Notifications
You must be signed in to change notification settings - Fork 268
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
feat(hoverbutton): v14 #2810
Merged
Merged
feat(hoverbutton): v14 #2810
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b4c186d
feat: hoverbutton 适配 v14
oasis-cloud a8996d0
feat: add demo, docs; update css
oasis-cloud ce87ad1
Merge branch 'feat_v3.x' into feat_v14_hoverbutton
oasis-cloud ffde486
feat: add demo, docs; update css
oasis-cloud c979752
feat: harmony doesn't support gap, so use margin-bottom instead
oasis-cloud 7cf51a7
test: update case and snap
oasis-cloud 89906af
fix: extracting constants
oasis-cloud 10c8625
fix: update demo’s order
oasis-cloud d16bb67
fix: add constant
oasis-cloud 9a10f48
chore: extract function
oasis-cloud d5e39c4
chore: test
oasis-cloud d596e96
chore: test
oasis-cloud 4b68760
chore: build
oasis-cloud 76e8f49
chore: build
oasis-cloud 58b3240
fix: 修订demo
xiaoyatong 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 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 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 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
Empty file.
This file contains 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 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 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 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,53 @@ | ||
/** | ||
* 基础用法 | ||
*/ | ||
oasis-cloud marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import React from 'react' | ||
import { HoverButton } from '@nutui/nutui-react' | ||
|
||
const Demo1 = () => { | ||
return ( | ||
<> | ||
<HoverButton> | ||
<div | ||
className="nut-hoverbutton-item-container" | ||
style={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<span | ||
style={{ | ||
fontSize: 12, | ||
fontWeight: 700, | ||
lineHeight: 1, | ||
marginTop: 5, | ||
fontFamily: 'JD', | ||
oasis-cloud marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}} | ||
> | ||
3 | ||
</span> | ||
<div | ||
style={{ | ||
height: 1, | ||
width: 20, | ||
background: '#1A1A1A', | ||
marginTop: 3, | ||
marginBottom: 3, | ||
}} | ||
/> | ||
<div | ||
style={{ | ||
fontSize: 10, | ||
lineHeight: '9px', | ||
fontFamily: 'JD', | ||
}} | ||
> | ||
238 | ||
</div> | ||
</div> | ||
</HoverButton> | ||
</> | ||
) | ||
} | ||
export default Demo1 |
This file contains 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 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,56 @@ | ||
/** | ||
* 基础用法 | ||
*/ | ||
import React from 'react' | ||
import { HoverButton } from '@nutui/nutui-react-taro' | ||
import { View } from '@tarojs/components' | ||
import pxTransform from '@/utils/px-transform' | ||
|
||
const Demo1 = () => { | ||
return ( | ||
<> | ||
<HoverButton> | ||
<View | ||
className="nut-hoverbutton-item nut-hoverbutton-item-container" | ||
style={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
marginBottom: 8, | ||
}} | ||
> | ||
<View | ||
style={{ | ||
fontSize: 12, | ||
fontWeight: 700, | ||
lineHeight: 1, | ||
marginTop: 5, | ||
fontFamily: 'JD', | ||
}} | ||
> | ||
3 | ||
</View> | ||
<View | ||
style={{ | ||
height: 1, | ||
width: 20, | ||
background: '#1A1A1A', | ||
marginTop: 3, | ||
marginBottom: 3, | ||
}} | ||
/> | ||
<View | ||
style={{ | ||
fontSize: 10, | ||
lineHeight: pxTransform(9), | ||
fontFamily: 'JD', | ||
}} | ||
> | ||
238 | ||
</View> | ||
</View> | ||
oasis-cloud marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</HoverButton> | ||
</> | ||
) | ||
} | ||
export default Demo1 |
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.
代码注释与实现不一致
上方的注释表明 RN 和鸿蒙端暂不支持 ConfigProvider,但是这里直接启用了 customSpacing 的功能。建议添加平台检测逻辑。
📝 Committable suggestion