-
Notifications
You must be signed in to change notification settings - Fork 0
/
App9.js
29 lines (28 loc) · 1.28 KB
/
App9.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React, { Component } from 'react'
import { Text, View } from 'react-native'
import { List,Button, Checkbox, Radio, Provider, Modal} from '@ant-design/react-native'
export default class App9 extends Component {
state={flag:true,visible:false}
_change=event=>this.setState({flag:event.target.checked})
render() {
return (
<Provider>
<Modal popup animationType="slide-up" visible={this.state.visible}>
<View style={{height:600}}>
<Text>this is Modal</Text>
<Button onPress={()=>this.setState({visible:false})}>close</Button>
</View>
</Modal>
<View>
<Button onPress={()=>this.setState({visible:true})}>显示</Button>
<List>
<List.Item arrow='horizontal'>{this.state.flag?"OK":"not OK"}</List.Item>
<List.Item extra={<Button type="primary">open</Button>} arrow="down">项目二</List.Item>
<Checkbox.CheckboxItem checked value={this.state.flag} onChange={this._change}>问题1</Checkbox.CheckboxItem>
<Radio.RadioItem checked>男</Radio.RadioItem>
</List>
</View>
</Provider>
)
}
}