import React, { ReactNode } from "react"; import { Button } from "antd"; import { DetailTable, Panel } from "@mcf/components"; import { IRFormProps, IRFormState} from "@mcf/crud"; import { RFormPage } from "@mcf/crud"; import Model from "../model"; interface FormProps extends IRFormProps { locale: Function; querys: Function; spins: Function; reducer: Object; item:any } interface FormState extends IRFormState{ // value: number } export default class DetailView extends RFormPage, FormState> { handleSubmit(value: any): void { throw new Error("Method not implemented."); } componentDidMount(): void { const { actions, match: { params } } = this.props; actions.fetchItem({ id: params.id }); } handleCancel(values: object): void { this.goBack(); } renderPanelFooter(): ReactNode { const { locale } = this.props; return ( ); } render(): ReactNode { const { item, locale } = this.props; const source = [ { label: locale("name.label"), value: item.name }, { label: locale("title.label"), value: item.nickname } ]; return ( ); } }