import { ComponentClass } from 'react'
import Taro, { Component } from '@tarojs/taro'
import { View, Image, Text } from '@tarojs/components'
import './index.scss'
import SdFormid from '../sdFormid';
interface DataInterface {
image: string
name: string
buildingSiteId?: string
}
interface ProcessConfigInterface {
active?: any
used: any
process: string
}
type PageOwnProps = {
className?: string
data: DataInterface
editable?: boolean
children?: any
onEdit?: any
onImageClick?: any
processConfig: ProcessConfigInterface[]
}
type IProps = PageOwnProps
interface Index {
props: IProps;
}
class Index extends Component {
static options = {
addGlobalClass: true
}
handleImageClick = (e) => {
this.props.onImageClick(e)
}
handleOnEdit = () => {
this.props.onEdit(this.props.data.buildingSiteId)
}
render() {
const { data, processConfig, editable } = this.props
return (
{
data.image &&
{/*
*/}
{editable && 编辑封面
//
//
}
{this.props.children}
}
{/* 标题 */}
{data.name}
{
processConfig.map(item => {
return
{item.process}
})
}
)
}
}
export default Index as ComponentClass