import * as React from "react"; import {StyleSheet} from "react-native"; import Basic from "../../basicPage"; import app, {ThemeCss} from "../../app"; import {IProps} from "./noData"; const CompositeNoData: React.FC = (props) => { const css = app.theme.useGet(); const styles = styleSheet(css); const direction = props.direction ?? 'centerTop'; let defaultStyle = css.colCenter; if (direction === 'left') defaultStyle = css.rowStartCenter else if (direction === 'right') defaultStyle = css.rowEndCenter else if (direction === 'top') defaultStyle = css.colStartCenter else if (direction === 'bottom') defaultStyle = css.colEndCenter // 图片 let imageView = undefined if (typeof props.image === 'object') imageView = props.image; else if (typeof props.image === 'number') imageView = // 图标 let iconView = undefined if (typeof props.icon === 'object') iconView = props.icon; else if (typeof props.icon === 'string') iconView = // 内容 let contentView = undefined if (typeof props.content === 'object') contentView = props.content; else if (typeof props.content === 'string') contentView = return {imageView} {iconView} {contentView} { direction === 'centerTop' ? : undefined } } const styleSheet = (css: ThemeCss) => StyleSheet.create({ imageStyle: { width: 100, height: 100, } }); export default CompositeNoData