mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
chore: 消除Switch组件类型错误。close #3111
This commit is contained in:
parent
e53fefb310
commit
49d40d685d
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user