Skip to content

Commit 827ab5c

Browse files
authored
fix: textarea 鸿蒙适配 (#3037)
1 parent 6697e45 commit 827ab5c

20 files changed

+53
-66
lines changed

src/packages/textarea/demo.taro.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const TextAreaDemo = () => {
9494
<Demo7 />
9595
<View className="h2">{translated.textAlign}</View>
9696
<Demo8 />
97-
<h2>{translated.error}</h2>
97+
<View className="h2">{translated.error}</View>
9898
<Demo9 />
9999
</ScrollView>
100100
</>

src/packages/textarea/demos/h5/demo1.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { Space, TextArea } from '@nutui/nutui-react'
33

4-
const Demo1 = () => {
4+
const Demo = () => {
55
return (
66
<Space direction="vertical">
77
<TextArea
@@ -20,4 +20,4 @@ const Demo1 = () => {
2020
</Space>
2121
)
2222
}
23-
export default Demo1
23+
export default Demo
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useState } from 'react'
22
import { TextArea } from '@nutui/nutui-react'
33

4-
const Demo2 = () => {
4+
const Demo = () => {
55
const [value, setValue] = useState('')
66
return <TextArea value={value} onChange={(value) => setValue(value)} />
77
}
8-
export default Demo2
8+
export default Demo
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { TextArea } from '@nutui/nutui-react'
33

4-
const Demo3 = () => {
4+
const Demo = () => {
55
return <TextArea showCount maxLength={20} />
66
}
7-
export default Demo3
7+
export default Demo
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { TextArea } from '@nutui/nutui-react'
33

4-
const Demo4 = () => {
4+
const Demo = () => {
55
return <TextArea autoSize maxLength={-1} />
66
}
7-
export default Demo4
7+
export default Demo

src/packages/textarea/demos/h5/demo5.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { ConfigProvider, TextArea } from '@nutui/nutui-react'
33

4-
const Demo5 = () => {
4+
const Demo = () => {
55
const customTheme = {
66
nutuiTextareaTextCurrorColor: `red`,
77
nutuiTextareaLimitColor: `red`,
@@ -12,4 +12,4 @@ const Demo5 = () => {
1212
</ConfigProvider>
1313
)
1414
}
15-
export default Demo5
15+
export default Demo
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import React from 'react'
22
import { TextArea } from '@nutui/nutui-react'
33

4-
const Demo6 = () => {
5-
return (
6-
<>
7-
<TextArea readOnly defaultValue="textarea只读状态" />
8-
</>
9-
)
4+
const Demo = () => {
5+
return <TextArea readOnly defaultValue="textarea只读状态" />
106
}
11-
export default Demo6
7+
export default Demo
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
import React from 'react'
22
import { TextArea } from '@nutui/nutui-react'
33

4-
const Demo7 = () => {
4+
const Demo = () => {
55
return (
6-
<>
7-
<TextArea
8-
disabled
9-
defaultValue="textarea禁用状态"
10-
showCount
11-
maxLength={20}
12-
/>
13-
</>
6+
<TextArea
7+
disabled
8+
defaultValue="textarea禁用状态"
9+
showCount
10+
maxLength={20}
11+
/>
1412
)
1513
}
16-
export default Demo7
14+
export default Demo
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { TextArea } from '@nutui/nutui-react'
33

4-
const Demo8 = () => {
4+
const Demo = () => {
55
return (
66
<TextArea
77
defaultValue="文本居右"
@@ -11,4 +11,4 @@ const Demo8 = () => {
1111
/>
1212
)
1313
}
14-
export default Demo8
14+
export default Demo
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { TextArea } from '@nutui/nutui-react'
33

4-
const Demo8 = () => {
4+
const Demo = () => {
55
return <TextArea status="error" defaultValue="输入内容错误" />
66
}
7-
export default Demo8
7+
export default Demo

0 commit comments

Comments
 (0)