Skip to content

Commit 6a0736b

Browse files
committed
fix: 删无意义代码
1 parent 305215f commit 6a0736b

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

src/packages/popup/demos/taro/demo7.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useState } from 'react'
22
import { Popup, Cell, Dialog } from '@nutui/nutui-react-taro'
3+
import { Text } from '@tarojs/components'
34

45
const Demo7 = () => {
56
const [showMutiple, setShowMutiple] = useState(false)
@@ -23,13 +24,13 @@ const Demo7 = () => {
2324
setShowMutiple(false)
2425
}}
2526
>
26-
<span
27+
<Text
2728
onClick={() => {
2829
setShowMutipleInner(true)
2930
}}
3031
>
3132
Click It
32-
</span>
33+
</Text>
3334
</Popup>
3435
<Popup
3536
visible={showMutipleInner}
@@ -39,13 +40,13 @@ const Demo7 = () => {
3940
setShowMutipleInner(false)
4041
}}
4142
>
42-
<span
43+
<Text
4344
onClick={() => {
4445
setShowMutipleInner(false)
4546
}}
4647
>
4748
close
48-
</span>
49+
</Text>
4950
</Popup>
5051

5152
<Cell

src/packages/popup/popup.rn.tsx

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export const Popup: FunctionComponent<
118118
'--nutui-overlay-zIndex': index,
119119
width: '100%',
120120
height: '100%',
121+
backgroundColor: 'rgba(0, 0, 0, 0.7)',
121122
}
122123

123124
const popStyles = {
@@ -258,24 +259,6 @@ export const Popup: FunctionComponent<
258259
)
259260
}
260261
}
261-
// const renderPop = () => {
262-
// return (
263-
// <>
264-
// {innerVisible ? (
265-
// <View
266-
// ref={refObject}
267-
// style={popStyles}
268-
// className={popClassName}
269-
// onClick={onHandleClick}
270-
// catchMove={lockScroll}
271-
// >
272-
// {renderTitle()}
273-
// {showChildren ? children : ''}
274-
// </View>
275-
// ) : null}
276-
// </>
277-
// )
278-
// }
279262

280263
const renderPop = () => {
281264
return (
@@ -305,22 +288,14 @@ export const Popup: FunctionComponent<
305288
>
306289
{overlay ? (
307290
<TouchableOpacity
308-
style={overlayStyles}
309291
activeOpacity={1}
310-
className={overlayClassName}
311292
// visible={innerVisible}
312293
// closeOnOverlayClick={closeOnOverlayClick}
313294
// lockScroll={lockScroll}
314295
// duration={duration}
315296
onPress={onHandleClickOverlay}
316297
>
317-
<View
318-
style={{
319-
width: '100%',
320-
height: '100%',
321-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
322-
}}
323-
/>
298+
<View className={overlayClassName} style={overlayStyles} />
324299
</TouchableOpacity>
325300
) : null}
326301
{renderPop()}

0 commit comments

Comments
 (0)