diff --git a/src/pages/system/adminroles/compenents/create.tsx b/src/pages/system/adminroles/compenents/create.tsx index 7acf767..329407f 100644 --- a/src/pages/system/adminroles/compenents/create.tsx +++ b/src/pages/system/adminroles/compenents/create.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from "react"; -import { Modal, Select, Form, Input, message } from "antd"; +import { Drawer, Select, Space, Button, Form, Input, message } from "antd"; import styles from "./create.module.less"; import { adminRole } from "../../../../api/index"; @@ -74,37 +74,45 @@ export const SystemAdminrolesCreate: React.FC = ({ return ( <> - form.submit()} - onCancel={() => onCancel()} + onClose={onCancel} maskClosable={false} + open={open} + footer={ + + + + + } + width={634} >
- + = ({
-
+ ); }; diff --git a/src/pages/system/adminroles/compenents/update.tsx b/src/pages/system/adminroles/compenents/update.tsx index 9486fd6..9a2b17c 100644 --- a/src/pages/system/adminroles/compenents/update.tsx +++ b/src/pages/system/adminroles/compenents/update.tsx @@ -1,10 +1,10 @@ import React, { useState, useEffect } from "react"; -import { Modal, Form, Input, Select, message } from "antd"; +import { Drawer, Select, Space, Button, Form, Input, message } from "antd"; import styles from "./update.module.less"; import { adminRole } from "../../../../api/index"; interface PropInterface { - id: number; + id: any; open: boolean; onCancel: () => void; } @@ -24,7 +24,7 @@ export const SystemAdminrolesUpdate: React.FC = ({ }, []); useEffect(() => { - if (id === 0 || "undefined" || "") { + if (id === undefined) { return; } getDetail(); @@ -86,22 +86,27 @@ export const SystemAdminrolesUpdate: React.FC = ({ return ( <> - form.submit()} - onCancel={() => onCancel()} + + + + + } + width={634} >
= ({ name="name" rules={[{ required: true, message: "请输入角色名!" }]} > - + = ({
-
+ ); };