fix(ui): 统一三中心表格交互并优化企业及配套页面
- 公共表格:统一分组标签、状态开关和危险操作确认,支持防重复提交和失败重试,修复浮层触发组件的 ref 转发。 - 控制台:统一用户和渠道编辑抽屉,修正分组回填与提交格式,对齐系统设置操作区和预约列表。 - 企业中心:调整技能中心页签和窄屏布局,优化质量监控提示栏、效能分析及成本对账,统一消耗明细和审计日志筛选。 - 用户中心及公共页面:优化密钥和消费记录展示,对齐模型超市筛选,统一公开与内嵌客户端下载页。 - 同步多语言文案、组件规范与移动端视口要求。
This commit is contained in:
+16
-30
@@ -35,6 +35,7 @@ import i18next from 'i18next';
|
||||
// React 18-compatible LobeHub icons lack these brands; use generic icons.
|
||||
import { Lock, Bot as FastGPT, Image as Jimeng } from 'lucide-react';
|
||||
import { Modal, Tag, Typography } from '@/components/ui';
|
||||
import TableGroupTags from '@/components/common/table/TableGroupTags';
|
||||
import { copy, getCurrencySymbol, showSuccess } from './utils';
|
||||
import { visit } from 'unist-util-visit';
|
||||
import { toFiniteNumber } from './safeDisplay';
|
||||
@@ -595,38 +596,23 @@ export function renderGroup(group) {
|
||||
);
|
||||
}
|
||||
|
||||
const tagColors = {
|
||||
vip: 'yellow',
|
||||
pro: 'yellow',
|
||||
svip: 'red',
|
||||
premium: 'red',
|
||||
};
|
||||
|
||||
const groups = group.split(',').sort();
|
||||
const groups = typeof group === 'string' ? group.split(',').sort() : group;
|
||||
|
||||
return (
|
||||
<span key={group}>
|
||||
{groups.map((group) => (
|
||||
<Tag
|
||||
color={tagColors[group] || stringToColor(group)}
|
||||
key={group}
|
||||
shape='circle'
|
||||
onClick={async (event) => {
|
||||
event.stopPropagation();
|
||||
if (await copy(group)) {
|
||||
showSuccess(i18next.t('已复制:{{name}}', { name: group }));
|
||||
} else {
|
||||
Modal.error({
|
||||
title: i18next.t('无法复制到剪贴板,请手动复制'),
|
||||
content: group,
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
{group}
|
||||
</Tag>
|
||||
))}
|
||||
</span>
|
||||
<TableGroupTags
|
||||
groups={groups}
|
||||
onGroupClick={async (name, event) => {
|
||||
event.stopPropagation();
|
||||
if (await copy(name)) {
|
||||
showSuccess(i18next.t('已复制:{{name}}', { name }));
|
||||
} else {
|
||||
Modal.error({
|
||||
title: i18next.t('无法复制到剪贴板,请手动复制'),
|
||||
content: name,
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user