编辑Modal

This commit is contained in:
MustangDeng 2022-06-15 16:20:59 +08:00
parent 711beb5cff
commit 1ce692421a
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ export default class AddCategoryModal extends React.Component {
}
render() {
return (
<Modal title="新增分类" footer={<Button type="primary" onClick={() => {this.props.onSave(this.state.name)}}>保存</Button>} width={600}
<Modal title={this.props.title && this.props.title !== '' ? "修改分类" : "新增分类"} footer={<Button type="primary" onClick={() => {this.props.onSave(this.state.name)}}>保存</Button>} width={600}
visible={this.props.visible} onCancel={() => {this.props.onCancel()}}
>
<div style={{padding: "20px"}}>