import Taro, { Component } from '@tarojs/taro' import { View, Image } from '@tarojs/components' import './index.scss' import { ComponentClass } from 'react' import SdFormid from '../sdFormid'; interface DataInterface { type: number, value: string } type PageOwnProps = { className?: string content: DataInterface[], title: string, onClickImage?: (event: any) => any, } type IProps = PageOwnProps interface Index { props: IProps; } class Index extends Component { static options = { addGlobalClass: true } viewImage = (e) => { if (this.props.onClickImage) { this.props.onClickImage(e) } } render() { const { content = [], title } = this.props return ( { title && {this.props.title} } { content.map((item, index) => { return { item.type === 1 && } { item.type === 2 && {item.value} } }) } ) } } export default Index as ComponentClass