import React, { ReactNode } from "react"; import { Modal, Button, Card } from "antd"; import LtmplTable, { LtmplTableProps } from "./ltmpl-table"; import Scrollbars from "react-custom-scrollbars"; import { LocaleContext } from "../locale/LocaleProvider"; import DraggableModal from "./draggable-modal"; interface LtmplDrawPageProps extends LtmplTableProps { onCancel: () => void; title?: ReactNode; width?: number | string; height?: number | string; open: boolean; } interface LtmplDrawPageState {} export default class LtmplDrawer extends React.PureComponent< LtmplDrawPageProps, LtmplDrawPageState > { static defaultProps = { showConfirm: true, height: "82vh", width: "82vw", forceRender: true, style: { maxWidth: "calc(100vw - 60px)", maxHeight: "calc(100vh - 50px)", padding: 10, }, okText: "确定", cancelText: "取消", }; state = {}; static contextType = LocaleContext; context: React.ContextType; render() { const { title, height, width, onCancel, open, ...other } = this.props; const { translate } = this.context; return ( {translate("${关闭}")}]} > ); } }