1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import { Input, Card, Select, Button, message } from 'antd';
- import { useEffect, useState } from 'react';
- import { Form } from 'antd';
- import { history } from 'umi';
- import ProCard from '@ant-design/pro-card';
-
- const { Option } = Select;
- const goBack = () => {
- history.goBack();
- };
- const FormItem = Form.Item;
- export default (props) => {
- const [form] = Form.useForm();
- const [loading, setLoading] = useState(false);
-
- const formItemLayout = {
- //布局
- labelCol: { span: 6 },
- wrapperCol: { span: 14 },
- };
-
- const Submit = (values) => {};
-
- return (
- <Card>
- <ProCard tabs={{ type: 'card' }} style={{ marginTop: '16px' }}>
- <ProCard.TabPane key={1} tab="资讯管理">
- <Form {...formItemLayout} onFinish={Submit} form={form}>
- <FormItem label="分类名" name="name" rules={[{ required: true, message: '请输入' }]}>
- <Input placeholder="请输入" style={{ width: '350px' }} />
- </FormItem>
- <FormItem label=" " colon={false}>
- <Button type="default" onClick={() => goBack()}>
- 返回
- </Button>
- <Button
- type="primary"
- loading={loading}
- htmlType="Submit"
- style={{ marginLeft: '4em' }}
- >
- 保存
- </Button>
- </FormItem>
- </Form>
- </ProCard.TabPane>
- </ProCard>
- </Card>
- );
- };
|