fix(ui): 统一表格交互,调整企业技能与质量页面,修复浮层引用警告
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { TABLE_GROUP_COLUMN_WIDTH } from '@/components/common/table/TableGroupTags';
|
||||
import TableStatusSwitch from '@/components/common/table/TableStatusSwitch';
|
||||
import React from 'react';
|
||||
import { Button, Switch, Tag as AntTag } from 'antd';
|
||||
import { Button, Tag as AntTag } from 'antd';
|
||||
import { Tag, Typography, Popover } from '@/components/ui';
|
||||
import {
|
||||
renderGroup,
|
||||
@@ -21,11 +23,8 @@ const renderStatus = (status, record, t, showEnableDisableModal) => {
|
||||
(![1, 2].includes(status) ? { color: 'error', label: '未知状态' } : null);
|
||||
return (
|
||||
<div className='admin-tokens-status'>
|
||||
<Switch
|
||||
size='small'
|
||||
<TableStatusSwitch
|
||||
checked={status === 1}
|
||||
checkedChildren={t('启用')}
|
||||
unCheckedChildren={t('禁用')}
|
||||
aria-label={status === 1 ? t('禁用') : t('启用')}
|
||||
disabled={!isAdmin() || Boolean(record.DeletedAt)}
|
||||
onChange={() =>
|
||||
@@ -194,7 +193,7 @@ export const getAdminTokensColumns = ({
|
||||
{
|
||||
title: t('分组'),
|
||||
dataIndex: 'group',
|
||||
width: 110,
|
||||
width: TABLE_GROUP_COLUMN_WIDTH,
|
||||
render: (text) => <div>{renderGroup(text)}</div>,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user