1- import React , { useState } from 'react' ;
2- import { SafeAreaView , TouchableHighlight , Text } from 'react-native' ;
3- import { Table } from '@uiw/react-native' ;
1+ import React from 'react' ;
2+ import { SafeAreaView , TouchableHighlight , Text } from 'react-native' ;
3+ import { Table } from '@uiw/react-native' ;
44import { ComProps } from '../../routes' ;
55import Layout from '../../Layout' ;
66const SearchBarDemo = ( props : ComProps ) => {
7-
8- const { Header } = Layout ;
7+ const { Header} = Layout ;
98 const { route} = props ;
109 const description = route . params . description ;
1110 const title = route . params . title ;
1211
13- const [ data , setData ] = useState ( [
14- { label : '上海' , value : 1 } ,
15- { label : '南京' , value : 2 }
16- ] )
1712 return (
18- < SafeAreaView style = { { flex : 1 } } >
19- < Header title = { title } description = { description } />
20- < Table
13+ < SafeAreaView style = { { flex : 1 } } >
14+ < Header title = { title } description = { description } />
15+ < Table
2116 columns = { [
2217 {
2318 title : '类型' ,
@@ -32,9 +27,9 @@ const SearchBarDemo = (props: ComProps) => {
3227 {
3328 title : '操作' ,
3429 dataIndex : 'id' ,
35- render : ( record : any ) => {
30+ render : ( ) => {
3631 return (
37- < TouchableHighlight onPress = { ( ) => { } } >
32+ < TouchableHighlight onPress = { ( ) => { } } >
3833 < Text style = { { color : '#888' } } > 查看</ Text >
3934 </ TouchableHighlight >
4035 ) ;
@@ -52,4 +47,4 @@ const SearchBarDemo = (props: ComProps) => {
5247 </ SafeAreaView >
5348 ) ;
5449} ;
55- export default SearchBarDemo ;
50+ export default SearchBarDemo ;
0 commit comments