File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
2- import { Text , StyleSheet } from 'react-native' ;
3- import { MenuDropdown } from '@uiw/react-native' ;
2+ import { Text , View , StyleSheet , TouchableOpacity } from 'react-native' ;
3+ import { MenuDropdown , Toast } from '@uiw/react-native' ;
44import Layout , { Container } from '../../Layout' ;
55import { ComProps } from '../../routes' ;
66
@@ -29,6 +29,12 @@ export default class MenuDropdownView extends Component<MenuDropdownProps> {
2929 < MenuDropdown . Item >
3030 < Text > 列表</ Text >
3131 </ MenuDropdown . Item >
32+ < MenuDropdown . Item >
33+ < TouchableOpacity
34+ onPress = { ( ) => Toast . info ( '你点击了选择一' , 2 , 'info' ) } >
35+ < Text > 选择一</ Text >
36+ </ TouchableOpacity >
37+ </ MenuDropdown . Item >
3238 </ MenuDropdown >
3339 </ Card >
3440 </ Body >
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export default class MenuDropdown extends React.Component<MenuDropdownProps> {
6868
6969 const { btnIcon, listHeightValue, listHeight } = this . state ;
7070 return (
71- < View style = { styles . menuBox } >
71+ < View style = { [ styles . menuBox , { height : this . state . listHeight + 50 } ] } >
7272 < Button { ...btnProps } onPress = { this . handleonPress } size = { size } >
7373 < Text > { title } </ Text >
7474 < Icon name = { btnIcon } size = { 17 } />
You can’t perform that action at this time.
0 commit comments