From 912fe84fba85bf99233ec739c9e5f2c79f65815e Mon Sep 17 00:00:00 2001 From: lu <2478382412@qq.com> Date: Wed, 22 Mar 2023 09:46:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E8=B7=AF=E7=94=B1=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=EF=BC=8Curl=E8=B7=AF=E5=BE=84=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/SystemSettings/RoleManagement/AddMan.tsx | 8 ++------ src/views/SystemSettings/RoleManagement/ManTable.tsx | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/views/SystemSettings/RoleManagement/AddMan.tsx b/src/views/SystemSettings/RoleManagement/AddMan.tsx index 0901b5b..1dc95a2 100644 --- a/src/views/SystemSettings/RoleManagement/AddMan.tsx +++ b/src/views/SystemSettings/RoleManagement/AddMan.tsx @@ -5,12 +5,11 @@ import { Button, Drawer, Form, Input, Select, Tree, DatePicker, Upload, message, import type { FormInstance } from 'antd/es/form'; import { useNavigate, useSearchParams } from 'react-router-dom'; import { User_add, User_list } from '../../../axios/Login' -import type { DatePickerProps, RangePickerProps } from 'antd/es/date-picker'; const { Option } = Select; interface Props { id: React.Key; - phone: string; + phone: number; pass: string; name: string; roles: []; @@ -34,18 +33,15 @@ const PubText: React.FC = () => { } // 权限数据 - // const [admins, setAdmins] = useState([]); - // const [newRoles, setNewRoles] = useState({}); // const [selectedKeys, setSelectedKeys] = useState([]); const [checkedKeys, setCheckedKeys] = useState([]); const onCheck = (checkedKeysValue: any, e: any) => { console.log('onCheck', checkedKeysValue); - form.setFieldValue('roles', checkedKeys) console.log('onCheck.e', e); let arr = [...checkedKeysValue, ...e.halfCheckedKeys]; console.log("arr", arr); - console.log('onCheck', checkedKeysValue); setCheckedKeys(arr); + form.setFieldValue('roles', arr) }; // 实现input的响应式数据 diff --git a/src/views/SystemSettings/RoleManagement/ManTable.tsx b/src/views/SystemSettings/RoleManagement/ManTable.tsx index 73d608a..9ec67cc 100644 --- a/src/views/SystemSettings/RoleManagement/ManTable.tsx +++ b/src/views/SystemSettings/RoleManagement/ManTable.tsx @@ -8,7 +8,7 @@ import { useNavigate } from 'react-router-dom'; interface DataType { id: React.Key; - phone: string; + phone: number; pass: string; name: string; // roles: []; -- Gitee