feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面

This commit is contained in:
zhanjunhao
2026-11-09 21:45:37 +08:00
parent 6ad95e2baa
commit 5713d541b0
242 changed files with 9242 additions and 5043 deletions
+22 -7
View File
@@ -58,6 +58,7 @@ const JSONEditor = ({
template,
templateLabel,
editorType = 'keyValue',
objectValueAutoSize,
rules = [],
formApi = null,
...props
@@ -368,6 +369,7 @@ const JSONEditor = ({
return (
<TextArea
rows={2}
autosize={objectValueAutoSize}
value={JSON.stringify(value, null, 2)}
onChange={(txt) => {
try {
@@ -407,7 +409,7 @@ const JSONEditor = ({
// 渲染键值对编辑器
const renderKeyValueEditor = () => {
return (
<div className='space-y-1'>
<div className='json-editor-pairs space-y-1'>
{/* 重复键警告 */}
{duplicateKeys.size > 0 && (
<Banner
@@ -442,7 +444,12 @@ const JSONEditor = ({
keyValuePairs.slice(index + 1).every((p) => p.key !== pair.key);
return (
<Row key={pair.id} gutter={8} align='middle'>
<Row
key={pair.id}
gutter={8}
align='middle'
className='json-editor-pair'
>
<Col span={10}>
<div className='relative'>
<Input
@@ -486,7 +493,7 @@ const JSONEditor = ({
);
})}
<div className='mt-2 flex justify-center'>
<div className='json-editor-add mt-2 flex justify-center'>
<Button
icon={<IconPlus />}
type='primary'
@@ -568,7 +575,10 @@ const JSONEditor = ({
<Tooltip content={t('重复的键名')}>
<IconAlertTriangle
className='absolute right-2 top-1/2 transform -translate-y-1/2'
style={{ color: 'var(--ui-color-warning)', fontSize: '14px' }}
style={{
color: 'var(--ui-color-warning)',
fontSize: '14px',
}}
/>
</Tooltip>
)}
@@ -628,8 +638,9 @@ const JSONEditor = ({
<Form.Slot label={label}>
<Card
header={
<div className='flex justify-between items-center'>
<div className='json-editor-header flex justify-between items-center'>
<Tabs
className='json-editor-tabs'
type='slash'
activeKey={editMode}
onChange={(key) => {
@@ -651,7 +662,9 @@ const JSONEditor = ({
)}
</div>
}
headerStyle={{ padding: '12px 16px' }}
headerStyle={{
padding: 'var(--json-editor-header-padding, 12px 16px)',
}}
bodyStyle={{ padding: '16px' }}
className='!rounded-2xl'
>
@@ -670,6 +683,7 @@ const JSONEditor = ({
{renderVisualEditor()}
{/* 隐藏的Form字段用于验证和数据绑定 */}
<Form.Input
className='json-editor-bound-field'
field={field}
value={value}
rules={rules}
@@ -689,6 +703,7 @@ const JSONEditor = ({
/>
{/* 隐藏的Form字段用于验证和数据绑定 */}
<Form.Input
className='json-editor-bound-field'
field={field}
value={value}
rules={rules}
@@ -701,7 +716,7 @@ const JSONEditor = ({
{/* 额外文本显示在卡片底部 */}
{extraText && (
<Divider margin='12px' align='center'>
<Divider margin='var(--json-editor-note-margin, 12px)' align='center'>
<Text type='tertiary' size='small'>
{extraText}
</Text>