UNPKG

tengits-debug-tool

Version:

debug-tool for react-native

37 lines (31 loc) 1.26 kB
import React, {Component} from 'react'; import {ScrollView, StyleSheet, Text, View} from 'react-native'; import {DebugColors} from '../utils/DebugConst'; import {showMsg} from '../utils/DebugUtils'; import DebugManager from '../DebugManager'; export default class SubViewException extends Component { render() { return <ScrollView style={{backgroundColor: DebugColors.white}}> {DebugManager.getExceptionLogText().map((item, index) => { return <View key={index} style={styles.borderStyle}> <Text style={styles.title} onPress={() => showMsg(item.log)}>日志: <Text style={{color: DebugColors.blue}}>{item.log}</Text> </Text> <Text style={styles.title}> <Text style={{color: DebugColors.text_light}}>时间:</Text>{item.timeStr} </Text> </View> })} </ScrollView>; } } const styles = StyleSheet.create({ title: { fontSize: 16, marginTop: 1, color: DebugColors.text, paddingVertical: 5, paddingHorizontal: 15, backgroundColor: DebugColors.disable, }, });