import React from "react"; import { Button, Col, Row } from "antd"; import { WeaDialog, WeaError, WeaInput } from "ecCom"; export default class AddCategoryModal extends React.Component { constructor(props) { super(props); this.state = { name: this.props.title ? this.props.title : "" }; } render() { return ( { if (!this.state.name) { this.refs.weaError.showError(); return; } this.props.onSave(this.state.name); }}>保存]} style={{ width: 600 }} visible={this.props.visible} onCancel={() => { this.props.onCancel(); }} >
分类名称 { if (value === "") { this.refs.weaError.showError(); return; } this.setState({ name: value }); }}/>
); } }