Skip to content

Commit

Permalink
chore: 消除Switch组件类型错误。close #3111
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Oct 9, 2023
1 parent e53fefb commit 49d40d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/demo/system/role/role.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '角色名称',
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 49d40d6

Please sign in to comment.