Skip to content

Commit 47afee6

Browse files
authored
fix(safearea): harmony适配 (#2745)
* fix: harmony适配 * fix: css update
1 parent c04c36a commit 47afee6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
"author": "hx"
236236
},
237237
{
238-
"version": "2.0.0",
238+
"version": "3.0.0",
239239
"name": "SafeArea",
240240
"type": "component",
241241
"cName": "安全区",

src/packages/safearea/demos/taro/demo1.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import { View, Text } from '@tarojs/components'
2+
import { ScrollView, Text } from '@tarojs/components'
33
import { SafeArea } from '@nutui/nutui-react-taro'
44

55
function generateRandomTextArray(count: number) {
@@ -19,10 +19,10 @@ function generateRandomTextArray(count: number) {
1919

2020
const Demo1 = () => {
2121
return (
22-
<View>
22+
<ScrollView>
2323
<Text>{generateRandomTextArray(900).join(' ')}</Text>
2424
<SafeArea position="bottom" />
25-
</View>
25+
</ScrollView>
2626
)
2727
}
2828

src/packages/safearea/safearea.harmony.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.nut-safe-area {
2-
display: block;
2+
display: flex;
33
width: 100%;
44
}
55
.nut-safe-area-position-top {

src/packages/safearea/safearea.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.nut-safe-area {
2-
display: block;
2+
display: flex;
33
width: 100%;
44

55
&-position-top {

0 commit comments

Comments
 (0)