Преглед на файлове

提交

storemanagementweb
gwbvipvip преди 11 месеца
родител
ревизия
c4bde9927f
променени са 1 файла, в които са добавени 21 реда и са изтрити 9 реда
  1. +21
    -9
      src/pages/shopmanage/storeStaff/components/CreateForm.jsx

+ 21
- 9
src/pages/shopmanage/storeStaff/components/CreateForm.jsx Целия файл

@@ -40,16 +40,28 @@ const CreateForm = (props) => {
}
</Select>
</Form.Item>
<Form.Item name="status" label="状态"
rules={[{ required: true, message: '请选择状态' }]} >
<Select placeholder="请选择状态">
<OptGroup>
<Select.Option value={0}>正常</Select.Option>
<Select.Option value={1}>停用</Select.Option>
<Select.Option value={2}>删除</Select.Option>
</OptGroup>
</Select>

<Form.Item
noStyle
shouldUpdate={(prevValues, currentValues) =>
prevValues.mode !== currentValues.mode
} >
{({ getFieldValue }) =>
(props.values.id) ? (
<Form.Item name="status" label="状态"
rules={[{ required: true, message: '请选择状态' }]} >
<Select placeholder="请选择状态">
<OptGroup>
<Select.Option value={0}>正常</Select.Option>
<Select.Option value={1}>停用</Select.Option>
</OptGroup>
</Select>
</Form.Item>
) : null
}
</Form.Item>


<Form.Item>
<Button type="primary" htmlType="submit">
保存


Зареждане…
Отказ
Запис