Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
sobird committed Nov 18, 2024
1 parent bf834dd commit 66dbbe9
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions app/dashboard/role/components/role-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,13 @@
'use client';

import React, { PropsWithChildren } from 'react';
import { Form, Input } from 'antd';
import { RoleFormRule } from '@/zod/role';
import withActionForm from '@/components/with-action-form';

const RoleForm: React.FC<PropsWithChildren> = ({ children }) => {
const ItemList: React.FC<PropsWithChildren> = ({ children }) => {
return (
<>
<Form.Item hidden name="id">
<Input name="id" hidden />
</Form.Item>
<Form.Item label="角色名称" name="name" rules={[RoleFormRule]}>
<Input name="name" />
</Form.Item>
<Form.Item label="备注" name="description">
<Input.TextArea name="description" />
</Form.Item>
<div>
{children}
</>
</div>
);
};

export default withActionForm(RoleForm);
export default ItemList;

0 comments on commit 66dbbe9

Please sign in to comment.