- 修复更新 bug

pull/1/head
sin 2019-05-09 20:56:12 +08:00
parent b1e8f64a49
commit 58e7f0b19e
1 changed files with 4 additions and 1 deletions

View File

@ -99,7 +99,10 @@ const CreateForm = Form.create()(props => {
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="父级菜单">
{form.getFieldDecorator('pid', {
rules: [{ required: true, message: '' }],
initialValue: initValues.pid,
initialValue:
initValues.pid === 0
? `-${initValues.pid}`
: `${initValues.displayName}-${initValues.pid}`,
})(
<TreeSelect
showSearch