-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a720ee
commit c6abb10
Showing
33 changed files
with
737 additions
and
319 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,14 +1,21 @@ | ||
import React from 'react' | ||
import { BackTop, Cell } from '@nutui/nutui-react' | ||
import { withTranslation, propsType } from '@/translation/demo.translation' | ||
|
||
const Demo1 = () => { | ||
const Demo1 = ({ t }: propsType) => { | ||
return ( | ||
<> | ||
{new Array(24).fill(0).map((_, index) => { | ||
return <Cell key={index}>我是测试数据{index}</Cell> | ||
return ( | ||
<Cell key={index}> | ||
{t.testData} | ||
{index} | ||
</Cell> | ||
) | ||
})} | ||
<BackTop target="target" /> | ||
</> | ||
) | ||
} | ||
export default Demo1 | ||
|
||
export default withTranslation(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
import React from 'react' | ||
import { BackTop, Cell } from '@nutui/nutui-react' | ||
import { withTranslation, propsType } from '@/translation/demo.translation' | ||
|
||
const Demo2 = () => { | ||
const Demo2 = ({ t }: propsType) => { | ||
return ( | ||
<> | ||
{new Array(24).fill(0).map((_, index) => { | ||
return <Cell key={index}>我是测试数据{index}</Cell> | ||
return ( | ||
<Cell key={index}> | ||
{t.testData} | ||
{index} | ||
</Cell> | ||
) | ||
})} | ||
<BackTop target="target" threshold={200} /> | ||
</> | ||
) | ||
} | ||
export default Demo2 | ||
|
||
export default withTranslation(Demo2) |
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,18 +1,25 @@ | ||
import React from 'react' | ||
import { Top } from '@nutui/icons-react' | ||
import { BackTop, Cell } from '@nutui/nutui-react' | ||
import { withTranslation, propsType } from '@/translation/demo.translation' | ||
|
||
const Demo3 = () => { | ||
const Demo3 = ({ t }: propsType) => { | ||
return ( | ||
<> | ||
{new Array(24).fill(0).map((_, index) => { | ||
return <Cell key={index}>我是测试数据{index}</Cell> | ||
return ( | ||
<Cell key={index}> | ||
{t.testData} | ||
{index} | ||
</Cell> | ||
) | ||
})} | ||
<BackTop threshold={100} target="target"> | ||
<Top width={12} height={12} /> | ||
<div style={{ fontSize: '12px' }}>顶部</div> | ||
<div style={{ fontSize: '12px' }}>{t.top}</div> | ||
</BackTop> | ||
</> | ||
) | ||
} | ||
export default Demo3 | ||
|
||
export default withTranslation(Demo3) |
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,14 +1,21 @@ | ||
import React from 'react' | ||
import { BackTop, Cell } from '@nutui/nutui-react' | ||
import { withTranslation, propsType } from '@/translation/demo.translation' | ||
|
||
const Demo4 = () => { | ||
const Demo4 = ({ t }: propsType) => { | ||
return ( | ||
<div id="target2" style={{ height: '800px', overflowY: 'auto' }}> | ||
{new Array(24).fill(0).map((_, index) => { | ||
return <Cell key={index}>我是测试数据{index}</Cell> | ||
return ( | ||
<Cell key={index}> | ||
{t.testData} | ||
{index} | ||
</Cell> | ||
) | ||
})} | ||
<BackTop target="target2" threshold={100} /> | ||
</div> | ||
) | ||
} | ||
export default Demo4 | ||
|
||
export default withTranslation(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
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
Oops, something went wrong.