| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- import React, { Component } from 'react';
- import {
- StyleSheet,
- View,
- FlatList, Image,
- } from 'react-native';
- import BIChartsItem from "../commons/bi/BIChartsItem";
- export default class EChartsPage extends Component {
- static navigationOptions = {
- headerBackImage:(
- <View style={{marginLeft:18}}>
- <Image
- source={{uri: 'uu_back-icon'}}
- style={{ width: 12, height: 20,marginRight:6}}
- />
- </View>
- ), //使用组件
- }
- constructor(props){
- super(props);
- this.state={
- dataArray:['line','bar','line'],
- }
- }
- renderItem(data){
- return <BIChartsItem
- typeTitle = {data.item}
- />
- }
- render() {
- return (
- <View style={styles.container}>
- <FlatList
- data={this.state.dataArray}
- renderItem = {data=>this.renderItem(data)}
- />
- </View>
- );
- }
- }
- const styles = StyleSheet.create({
- container: {
- flex:1,
- backgroundColor: '#efefef',
- },
- title:{
- color:'white',
- fontSize:20,
- textAlign:'center',
- },
- });
|