-
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.
Co-authored-by: xiaoyatong <hanyuxingint@sina.cn>
- Loading branch information
1 parent
f848fcb
commit 3770b6d
Showing
10 changed files
with
79 additions
and
239 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
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,28 @@ | ||
import React from 'react' | ||
import { SafeArea } from '@nutui/nutui-react' | ||
|
||
function generateRandomTextArray(count: number) { | ||
const characters = 'abcdefghijklmnopqrstuvwxyz' | ||
const textArray = [] | ||
for (let j = 0; j < count; j++) { | ||
const randomLength = Math.floor(Math.random() * 5) + 4 // 随机生成长度在4到8之间的数 | ||
let randomText = '' | ||
for (let i = 0; i < randomLength; i++) { | ||
const randomIndex = Math.floor(Math.random() * characters.length) | ||
randomText += characters.charAt(randomIndex) | ||
} | ||
textArray.push(randomText) | ||
} | ||
return textArray | ||
} | ||
|
||
const Demo1 = () => { | ||
return ( | ||
<> | ||
<div>{generateRandomTextArray(900).join(' ')}</div> | ||
<SafeArea position="bottom" /> | ||
</> | ||
) | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react' | ||
import { SafeArea } from '@nutui/nutui-react-taro' | ||
|
||
function generateRandomTextArray(count: number) { | ||
const characters = 'abcdefghijklmnopqrstuvwxyz' | ||
const textArray = [] | ||
for (let j = 0; j < count; j++) { | ||
const randomLength = Math.floor(Math.random() * 5) + 4 // 随机生成长度在4到8之间的数 | ||
let randomText = '' | ||
for (let i = 0; i < randomLength; i++) { | ||
const randomIndex = Math.floor(Math.random() * characters.length) | ||
randomText += characters.charAt(randomIndex) | ||
} | ||
textArray.push(randomText) | ||
} | ||
return textArray | ||
} | ||
|
||
const Demo1 = () => { | ||
return ( | ||
<> | ||
<div>{generateRandomTextArray(900).join(' ')}</div> | ||
<SafeArea position="bottom" /> | ||
</> | ||
) | ||
} | ||
|
||
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
Oops, something went wrong.