fix(ui): 统一表格筛选分页和用量明细,升级 ESLint
This commit is contained in:
@@ -24,10 +24,15 @@ import {
|
||||
Copy as ActionCopy,
|
||||
BookOpen as ActionBookOpen,
|
||||
HelpCircle as ActionHelpCircle,
|
||||
Search as ActionSearch,
|
||||
Plus as ActionPlus,
|
||||
Search as ActionSearch,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { writeClipboardText } from '../../helpers/clipboard';
|
||||
import { ConsoleCollectionSearch } from '../../components/console/ConsoleCollection';
|
||||
import {
|
||||
ConsoleFilterField,
|
||||
ConsoleFilterGrid,
|
||||
} from '../../components/console/ConsolePrimitives';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, { useState, useRef, useEffect, useContext } from 'react';
|
||||
import Table from '../../components/ui/CenterActionTable';
|
||||
@@ -892,35 +897,28 @@ const KeyManagement = ({ embedded = false }) => {
|
||||
<DesensitizeNotice t={t} />
|
||||
|
||||
<div className='km-panels'>
|
||||
<Card className='km-card km-search-card tour-search-input'>
|
||||
<label className='km-search-label' htmlFor='km-search-input'>
|
||||
{t('密钥查询')}
|
||||
</label>
|
||||
<div className='km-search-row'>
|
||||
<Input
|
||||
id='km-search-input'
|
||||
className='km-search-input'
|
||||
placeholder={t('搜索密钥名称、Key 或分组')}
|
||||
value={searchValue}
|
||||
onChange={(event) => setSearchValue(event.target.value)}
|
||||
onPressEnter={() => setSearchValue(searchValue)}
|
||||
allowClear
|
||||
/>
|
||||
<Button onClick={() => setSearchValue('')}>{t('重置')}</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<ActionSearch size={14} />}
|
||||
onClick={() => setSearchValue(searchValue)}
|
||||
>
|
||||
{t('搜索')}
|
||||
</Button>
|
||||
</div>
|
||||
</Card>
|
||||
<ConsoleCollectionSearch className='km-card km-search-card tour-search-input'>
|
||||
<ConsoleFilterGrid
|
||||
onReset={() => setSearchValue('')}
|
||||
onSearch={() => setSearchValue(searchValue.trim())}
|
||||
>
|
||||
<ConsoleFilterField label={t('密钥查询')} id='km-search-input'>
|
||||
<Input
|
||||
id='km-search-input'
|
||||
prefix={<ActionSearch size={14} />}
|
||||
placeholder={t('搜索密钥名称、Key 或分组')}
|
||||
value={searchValue}
|
||||
onChange={(event) => setSearchValue(event.target.value)}
|
||||
allowClear
|
||||
/>
|
||||
</ConsoleFilterField>
|
||||
</ConsoleFilterGrid>
|
||||
</ConsoleCollectionSearch>
|
||||
|
||||
<Card className='km-card km-list-card'>
|
||||
<div className='km-list-head'>
|
||||
<div className='km-list-head console-list-tools'>
|
||||
<h2>{t('密钥列表')}</h2>
|
||||
<div className='km-list-actions'>
|
||||
<div className='km-list-actions console-list-tool-actions'>
|
||||
<Button
|
||||
type='link'
|
||||
className='km-contact-link'
|
||||
@@ -928,14 +926,6 @@ const KeyManagement = ({ embedded = false }) => {
|
||||
>
|
||||
{t('创建密钥后不知道怎么用?联系客服')}
|
||||
</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<ActionPlus size={16} />}
|
||||
className='tour-create-btn'
|
||||
onClick={handleCreate}
|
||||
>
|
||||
{t('创建密钥')}
|
||||
</Button>
|
||||
<TableColumnSettings
|
||||
columns={COLUMN_OPTIONS.map((option) => ({
|
||||
key: option.value,
|
||||
@@ -945,6 +935,14 @@ const KeyManagement = ({ embedded = false }) => {
|
||||
defaultValue={COLUMN_OPTIONS.map((option) => option.value)}
|
||||
onChange={setVisibleColumns}
|
||||
/>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<ActionPlus size={16} />}
|
||||
className='tour-create-btn'
|
||||
onClick={handleCreate}
|
||||
>
|
||||
{t('创建密钥')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user