feat: 参考原型图 ui优化提交 个人端-用户中心 相关的页面
This commit is contained in:
@@ -18,10 +18,10 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import { Card, Divider, Button } from '@douyinfe/semi-ui';
|
||||
import { Card, Divider, Button } from '@/components/ui';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
import { IconEyeOpened, IconEyeClosed } from '@douyinfe/semi-icons';
|
||||
import { IconEyeOpened, IconEyeClosed } from '@/components/ui/icons';
|
||||
|
||||
/**
|
||||
* CardPro 高级卡片组件
|
||||
@@ -147,7 +147,7 @@ const CardPro = ({
|
||||
return (
|
||||
<div
|
||||
className={`flex w-full pt-4 border-t ${isMobile ? 'justify-center' : 'justify-between items-center'}`}
|
||||
style={{ borderColor: 'var(--semi-color-border)' }}
|
||||
style={{ borderColor: 'var(--ui-color-border)' }}
|
||||
>
|
||||
{paginationArea}
|
||||
</div>
|
||||
|
||||
@@ -28,8 +28,8 @@ import {
|
||||
Empty,
|
||||
Button,
|
||||
Collapsible,
|
||||
} from '@douyinfe/semi-ui';
|
||||
import { IconChevronDown, IconChevronUp } from '@douyinfe/semi-icons';
|
||||
} from '@/components/ui';
|
||||
import { IconChevronDown, IconChevronUp } from '@/components/ui/icons';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
import { useMinimumLoadingTime } from '../../../hooks/common/useMinimumLoadingTime';
|
||||
@@ -37,7 +37,7 @@ import { useMinimumLoadingTime } from '../../../hooks/common/useMinimumLoadingTi
|
||||
/**
|
||||
* CardTable 响应式表格组件
|
||||
*
|
||||
* 在桌面端渲染 Semi-UI 的 Table 组件,在移动端则将每一行数据渲染成 Card 形式。
|
||||
* 在桌面端渲染 Ant Design Table,在移动端则将每一行数据渲染成 Card 形式。
|
||||
* 该组件与 Table 组件的大部分 API 保持一致,只需将原 Table 换成 CardTable 即可。
|
||||
*/
|
||||
const CardTable = ({
|
||||
@@ -143,7 +143,7 @@ const CardTable = ({
|
||||
<div
|
||||
key={idx}
|
||||
className='flex justify-between items-center py-1 border-b last:border-b-0 border-dashed'
|
||||
style={{ borderColor: 'var(--semi-color-border)' }}
|
||||
style={{ borderColor: 'var(--ui-color-border)' }}
|
||||
>
|
||||
<Skeleton.Title style={{ width: 80, height: 14 }} />
|
||||
<Skeleton.Title
|
||||
@@ -197,7 +197,7 @@ const CardTable = ({
|
||||
{selectionEnabled && (
|
||||
<div
|
||||
className='flex items-center pb-1 mb-1 border-b border-dashed'
|
||||
style={{ borderColor: 'var(--semi-color-border)' }}
|
||||
style={{ borderColor: 'var(--ui-color-border)' }}
|
||||
>
|
||||
<Checkbox
|
||||
checked={selectedKeys.includes(rowKeyVal)}
|
||||
@@ -237,7 +237,7 @@ const CardTable = ({
|
||||
<div
|
||||
key={col.key || colIdx}
|
||||
className='flex justify-between items-start py-1 border-b last:border-b-0 border-dashed'
|
||||
style={{ borderColor: 'var(--semi-color-border)' }}
|
||||
style={{ borderColor: 'var(--ui-color-border)' }}
|
||||
>
|
||||
<span className='font-medium text-gray-600 mr-2 whitespace-nowrap select-none'>
|
||||
{title}
|
||||
@@ -288,7 +288,7 @@ const CardTable = ({
|
||||
return (
|
||||
<div className='flex flex-col gap-2'>
|
||||
{selectionEnabled && selectableKeys.length > 0 && (
|
||||
<div className='flex items-center justify-between px-3 py-2 rounded-xl bg-semi-color-fill-0'>
|
||||
<div className='flex items-center justify-between px-3 py-2 rounded-xl bg-ui-color-fill-0'>
|
||||
<Checkbox
|
||||
checked={allSelected}
|
||||
indeterminate={!allSelected && selectedKeys.length > 0}
|
||||
|
||||
@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Card, Button, Typography, Tag } from '@douyinfe/semi-ui';
|
||||
import { Card, Button, Typography, Tag } from '@/components/ui';
|
||||
import { copy, showSuccess } from '../../../helpers';
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Button } from '@douyinfe/semi-ui';
|
||||
import { Button } from '@/components/ui';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ import {
|
||||
Col,
|
||||
Divider,
|
||||
Tooltip,
|
||||
} from '@douyinfe/semi-ui';
|
||||
import { IconPlus, IconDelete, IconAlertTriangle } from '@douyinfe/semi-icons';
|
||||
} from '@/components/ui';
|
||||
import { IconPlus, IconDelete, IconAlertTriangle } from '@/components/ui/icons';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
@@ -463,8 +463,8 @@ const JSONEditor = ({
|
||||
className='absolute right-2 top-1/2 transform -translate-y-1/2'
|
||||
style={{
|
||||
color: isLastDuplicate
|
||||
? 'var(--semi-color-danger)'
|
||||
: 'var(--semi-color-warning)',
|
||||
? 'var(--ui-color-danger)'
|
||||
: 'var(--ui-color-warning)',
|
||||
fontSize: '14px',
|
||||
}}
|
||||
/>
|
||||
@@ -568,7 +568,7 @@ const JSONEditor = ({
|
||||
<Tooltip content={t('重复的键名')}>
|
||||
<IconAlertTriangle
|
||||
className='absolute right-2 top-1/2 transform -translate-y-1/2'
|
||||
style={{ color: 'var(--semi-color-warning)', fontSize: '14px' }}
|
||||
style={{ color: 'var(--ui-color-warning)', fontSize: '14px' }}
|
||||
/>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { InputNumber, withField } from '@douyinfe/semi-ui';
|
||||
import { InputNumber, withField } from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getQuotaPerUnit } from '../../../helpers';
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Space, Tag, Typography, Popover } from '@douyinfe/semi-ui';
|
||||
import { Space, Tag, Typography, Popover } from '@/components/ui';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
.rich-text-editor {
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background: var(--semi-color-bg-2);
|
||||
background: var(--ui-color-bg-2);
|
||||
}
|
||||
.rich-text-editor.is-invalid {
|
||||
border-color: var(--semi-color-danger);
|
||||
border-color: var(--ui-color-danger);
|
||||
}
|
||||
.rich-text-editor:focus-within {
|
||||
border-color: var(--semi-color-primary);
|
||||
border-color: var(--ui-color-primary);
|
||||
}
|
||||
.rich-text-toolbar {
|
||||
display: flex;
|
||||
@@ -16,8 +16,8 @@
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid var(--semi-color-border);
|
||||
background: var(--semi-color-fill-0);
|
||||
border-bottom: 1px solid var(--ui-color-border);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.rich-text-toolbar button,
|
||||
.rich-text-toolbar select {
|
||||
@@ -30,7 +30,7 @@
|
||||
border: 0;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
color: var(--semi-color-text-1);
|
||||
color: var(--ui-color-text-1);
|
||||
cursor: pointer;
|
||||
}
|
||||
.rich-text-toolbar select {
|
||||
@@ -39,12 +39,12 @@
|
||||
}
|
||||
.rich-text-toolbar button:hover,
|
||||
.rich-text-toolbar button[aria-pressed='true'] {
|
||||
background: var(--semi-color-primary-light-default);
|
||||
color: var(--semi-color-primary);
|
||||
background: var(--ui-color-primary-light-default);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
.rich-text-toolbar button:focus-visible,
|
||||
.rich-text-toolbar select:focus-visible {
|
||||
outline: 2px solid var(--semi-color-primary);
|
||||
outline: 2px solid var(--ui-color-primary);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.rich-text-toolbar button:disabled {
|
||||
@@ -56,14 +56,14 @@
|
||||
padding: 16px;
|
||||
outline: none;
|
||||
line-height: 1.9;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.rich-text-content .ql-editor > * + * {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.rich-text-content .ql-editor.ql-blank::before {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-style: normal;
|
||||
pointer-events: none;
|
||||
white-space: pre-wrap;
|
||||
@@ -84,20 +84,20 @@
|
||||
padding-left: 0;
|
||||
}
|
||||
.rich-text-content blockquote {
|
||||
border-left: 3px solid var(--semi-color-border);
|
||||
border-left: 3px solid var(--ui-color-border);
|
||||
padding-left: 16px;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
}
|
||||
.rich-text-content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.rich-text-count {
|
||||
border-top: 1px solid var(--semi-color-border);
|
||||
border-top: 1px solid var(--ui-color-border);
|
||||
padding: 4px 12px;
|
||||
text-align: right;
|
||||
font-size: 12px;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
}
|
||||
|
||||
.rich-text-content.ql-container,
|
||||
@@ -106,11 +106,11 @@
|
||||
font-size: 14px;
|
||||
}
|
||||
.rich-text-editor.is-invalid:focus-within {
|
||||
border-color: var(--semi-color-danger);
|
||||
border-color: var(--ui-color-danger);
|
||||
}
|
||||
.rich-text-toolbar select option {
|
||||
background: var(--semi-color-bg-2);
|
||||
color: var(--semi-color-text-0);
|
||||
background: var(--ui-color-bg-2);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
.rich-text-content .ql-editor img {
|
||||
display: inline-block;
|
||||
@@ -119,7 +119,7 @@
|
||||
.rich-text-image-error {
|
||||
padding: 8px 12px;
|
||||
font-size: 12px;
|
||||
color: var(--semi-color-danger);
|
||||
border-top: 1px solid var(--semi-color-border);
|
||||
color: var(--ui-color-danger);
|
||||
border-top: 1px solid var(--ui-color-border);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ import {
|
||||
Checkbox,
|
||||
Skeleton,
|
||||
Tooltip,
|
||||
} from '@douyinfe/semi-ui';
|
||||
import { IconChevronDown, IconChevronUp } from '@douyinfe/semi-icons';
|
||||
} from '@/components/ui';
|
||||
import { IconChevronDown, IconChevronUp } from '@/components/ui/icons';
|
||||
|
||||
/**
|
||||
* 通用可选择按钮组组件
|
||||
@@ -127,7 +127,7 @@ const SelectableButtonGroup = ({
|
||||
fontWeight: 400,
|
||||
cursor: 'pointer',
|
||||
fontSize: '12px',
|
||||
color: 'var(--semi-color-text-2)',
|
||||
color: 'var(--ui-color-text-2)',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
@@ -146,8 +146,8 @@ const SelectableButtonGroup = ({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'flex-start',
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
borderRadius: 'var(--semi-border-radius-medium)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
borderRadius: 'var(--ui-border-radius-medium)',
|
||||
padding: '0 12px',
|
||||
gap: '6px',
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user