feat: 参考原型图 ui优化提交 企业端-企业中心 相关的页面
This commit is contained in:
@@ -51,7 +51,15 @@ const parseGroups = (raw) => {
|
||||
* - scopeLabel: '部门' | '项目'(用于弹窗标题与文案)
|
||||
* - onSaved: 保存成功后回调(刷新列表)
|
||||
*/
|
||||
const OrgScopedLimitButtons = ({ orgId, record, apiBase, scopeLabel, onSaved }) => {
|
||||
// variant='link':企业中心已按原型对齐的列表页使用 link 按钮(无图标、13px);默认保持原描边按钮
|
||||
const OrgScopedLimitButtons = ({
|
||||
orgId,
|
||||
record,
|
||||
apiBase,
|
||||
scopeLabel,
|
||||
onSaved,
|
||||
variant = 'default',
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [modelModalVisible, setModelModalVisible] = useState(false);
|
||||
@@ -155,10 +163,14 @@ const OrgScopedLimitButtons = ({ orgId, record, apiBase, scopeLabel, onSaved })
|
||||
<>
|
||||
<Tooltip content={t('设置该{{scope}}成员默认可用的模型范围(与成员/项目/部门限制取交集)', { scope: t(scopeLabel) })}>
|
||||
<Button
|
||||
size='small'
|
||||
theme='light'
|
||||
type={modelConfigured ? 'primary' : 'tertiary'}
|
||||
icon={<Layers size={14} />}
|
||||
{...(variant === 'link'
|
||||
? { type: 'link' }
|
||||
: {
|
||||
size: 'small',
|
||||
theme: 'light',
|
||||
type: modelConfigured ? 'primary' : 'tertiary',
|
||||
icon: <Layers size={14} />,
|
||||
})}
|
||||
onClick={openModelModal}
|
||||
>
|
||||
{t('模型')}
|
||||
@@ -166,10 +178,14 @@ const OrgScopedLimitButtons = ({ orgId, record, apiBase, scopeLabel, onSaved })
|
||||
</Tooltip>
|
||||
<Tooltip content={t('设置该{{scope}}成员默认可调用的分组(与成员/项目/部门限制取交集)', { scope: t(scopeLabel) })}>
|
||||
<Button
|
||||
size='small'
|
||||
theme='light'
|
||||
type={groupConfigured ? 'primary' : 'tertiary'}
|
||||
icon={<Layers size={14} />}
|
||||
{...(variant === 'link'
|
||||
? { type: 'link' }
|
||||
: {
|
||||
size: 'small',
|
||||
theme: 'light',
|
||||
type: groupConfigured ? 'primary' : 'tertiary',
|
||||
icon: <Layers size={14} />,
|
||||
})}
|
||||
onClick={openGroupsModal}
|
||||
>
|
||||
{t('分组')}
|
||||
|
||||
Reference in New Issue
Block a user