UNPKG

react-native-lib-cus-com

Version:

react-native 自定义辅助组件库,完美的网路请求,带加载条,可上传、下载文件,等等多种ui,可自定义删除;可节省应用级软件的开发时间

45 lines (40 loc) 913 B
import React, {Component} from 'react'; import { Text, } from 'react-native' import { StyleSheetAdapt, ViewTitle, BaseComponent, ViewCtrl, Alert, BarcodeView, } from "react-native-lib-cus-com"; type Props = {}; export default class Test extends BaseComponent<Props> { constructor(props) { super(props); } render() { return ( <ViewTitle> <BarcodeView ref={c=>this.barcodeView} style={styles.testStyle}/> <Text onPress={()=>this.barcodeView.startScan()}> 开始扫码 </Text> </ViewTitle> ); } } const styles = StyleSheetAdapt.create({ testStyle2:{ width:100, height:200, }, testStyle:{ transform:[ {rotateX:'180deg'} ], }, });