Quellcode durchsuchen

update:department rules

dev
powersir vor 11 Monaten
Ursprung
Commit
dbfdd939b9
1 geänderte Dateien mit 17 neuen und 3 gelöschten Zeilen
  1. +17
    -3
      src/pages/system/dept/create-department.tsx

+ 17
- 3
src/pages/system/dept/create-department.tsx Datei anzeigen

@@ -42,6 +42,7 @@ const DepartmentEditor: React.FC<EditorProps> = (props) => {
}, [visible]);

const save = async () => {
await form.validateFields();
setSaveLoading(true);
const fieldValues = form.getFieldsValue();
const newValue = isEdit ? { ...data, ...fieldValues } : fieldValues;
@@ -65,7 +66,7 @@ const DepartmentEditor: React.FC<EditorProps> = (props) => {
width={640}
onOk={save}
onCancel={() => onCancel()}
confirmLoading= {saveLoading}
confirmLoading={saveLoading}
destroyOnClose
>
<Form
@@ -107,11 +108,24 @@ const DepartmentEditor: React.FC<EditorProps> = (props) => {
<Input />
</Form.Item>

<Form.Item name="sort" label="显示排序" >
<Form.Item name="sort" label="显示排序"
rules={[
{
required: true,
message: '请输入显示排序',
},
]}
>
<InputNumber min={1} max={100} />
</Form.Item>

<Form.Item name="status" label="状态">
<Form.Item name="status" label="状态"
rules={[
{
required: true,
message: '请设置状态',
},
]}>
<Radio.Group options={[
{ value: 0, label: "开启" },
{ value: 1, label: "关闭" }


Laden…
Abbrechen
Speichern