-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(v15): indicator adaptation (#2746)
* feat(v14): indicator adaptation * feat(v14): indicator adaptation * feat: 增加视觉限制最大宽度 * fix: review * fix: update test * fix: 覆盖率 * fix: review * fix: review --------- Co-authored-by: xiaoyatong <[email protected]>
- Loading branch information
1 parent
f764c71
commit c3cb26b
Showing
22 changed files
with
606 additions
and
174 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1048,6 +1048,7 @@ | |
"sort": 16, | ||
"show": true, | ||
"taro": true, | ||
"v15": true, | ||
"author": "liukun" | ||
}, | ||
{ | ||
|
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
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 |
---|---|---|
@@ -1,38 +1,61 @@ | ||
import React from 'react' | ||
import { Indicator, Cell } from '@nutui/nutui-react' | ||
import { Cell, Indicator } from '@nutui/nutui-react' | ||
|
||
const Demo4 = () => { | ||
return ( | ||
<Cell> | ||
<Indicator total={6} current={5} direction="vertical"> | ||
<div | ||
<> | ||
<Cell> | ||
<Indicator total={6} current={5} direction="vertical"> | ||
<div | ||
style={{ | ||
display: 'inline-block', | ||
width: '14px', | ||
height: '14px', | ||
lineHeight: '14px', | ||
textAlign: 'center', | ||
fontSize: '12px', | ||
color: '#FFFFFF', | ||
border: '1px solid #FFFFFF', | ||
borderRadius: '50%', | ||
margin: '4px', | ||
background: `var(--nutui-color-primary)`, | ||
boxShadow: `0 0 1px 1px var(--nutui-color-primary)`, | ||
}} | ||
> | ||
{5} | ||
</div> | ||
</Indicator> | ||
<Indicator | ||
total={6} | ||
current={2} | ||
direction="vertical" | ||
style={{ | ||
display: 'inline-block', | ||
width: '14px', | ||
height: '14px', | ||
lineHeight: '14px', | ||
textAlign: 'center', | ||
fontSize: '12px', | ||
color: '#FFFFFF', | ||
border: '1px solid #FFFFFF', | ||
borderRadius: '50%', | ||
margin: '4px', | ||
background: `var(--nutui-color-primary)`, | ||
boxShadow: `0 0 1px 1px var(--nutui-color-primary)`, | ||
marginLeft: '50px', | ||
}} | ||
> | ||
{5} | ||
</div> | ||
</Indicator> | ||
<Indicator | ||
total={6} | ||
current={2} | ||
direction="vertical" | ||
style={{ | ||
marginLeft: '50px', | ||
}} | ||
/> | ||
</Cell> | ||
/> | ||
|
||
<Indicator | ||
total={6} | ||
current={5} | ||
direction="vertical" | ||
type="slide" | ||
style={{ | ||
marginLeft: '50px', | ||
}} | ||
/> | ||
</Cell> | ||
<Cell style={{ background: '#C2C4CC' }}> | ||
<Indicator | ||
total={6} | ||
current={2} | ||
direction="vertical" | ||
color="white" | ||
style={{ | ||
marginLeft: '50px', | ||
}} | ||
/> | ||
</Cell> | ||
</> | ||
) | ||
} | ||
export default Demo4 |
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,13 @@ | ||
import React from 'react' | ||
import { Cell, Indicator } from '@nutui/nutui-react' | ||
|
||
const Demo5 = () => { | ||
return ( | ||
<> | ||
<Cell style={{ background: '#C2C4CC' }}> | ||
<Indicator total={3} current={0} color="white" /> | ||
</Cell> | ||
</> | ||
) | ||
} | ||
export default Demo5 |
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,16 @@ | ||
import React from 'react' | ||
import { Cell, Indicator } from '@nutui/nutui-react' | ||
|
||
const Demo6 = () => { | ||
return ( | ||
<> | ||
<Cell> | ||
<Indicator total={3} current={2} type="slide" /> | ||
</Cell> | ||
<Cell> | ||
<Indicator total={3} current={2} type="slide" direction="vertical" /> | ||
</Cell> | ||
</> | ||
) | ||
} | ||
export default Demo6 |
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
Oops, something went wrong.