From 49d40d685d437fb5a23424d135af13278f5d2381 Mon Sep 17 00:00:00 2001 From: invalid w Date: Mon, 9 Oct 2023 11:26:48 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B6=88=E9=99=A4Switch=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=E3=80=82close=20#?= =?UTF-8?q?3111?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/demo/system/role/role.data.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/demo/system/role/role.data.ts b/src/views/demo/system/role/role.data.ts index ace0af29d..2a24c7793 100644 --- a/src/views/demo/system/role/role.data.ts +++ b/src/views/demo/system/role/role.data.ts @@ -4,6 +4,7 @@ import { Switch } from 'ant-design-vue'; import { setRoleStatus } from '/@/api/demo/system'; import { useMessage } from '/@/hooks/web/useMessage'; +type CheckedType = boolean | string | number; export const columns: BasicColumn[] = [ { title: '角色名称', @@ -33,7 +34,7 @@ export const columns: BasicColumn[] = [ checkedChildren: '停用', unCheckedChildren: '启用', loading: record.pendingStatus, - onChange(checked: boolean) { + onChange(checked: CheckedType) { record.pendingStatus = true; const newStatus = checked ? '1' : '0'; const { createMessage } = useMessage();