feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面
This commit is contained in:
@@ -36,6 +36,7 @@ import {
|
||||
Space as AntSpace,
|
||||
} from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
import { useConsoleControlSize } from '../console/ConsoleContext';
|
||||
|
||||
export const controlSize = (size) => (size === 'default' ? 'middle' : size);
|
||||
export const placement = (position) =>
|
||||
@@ -73,7 +74,7 @@ export const Input = forwardRef(function Input(
|
||||
<Component
|
||||
{...props}
|
||||
ref={ref}
|
||||
size={controlSize(size)}
|
||||
size={useConsoleControlSize(size)}
|
||||
readOnly={readonly ?? props.readOnly}
|
||||
variant={borderless ? 'borderless' : undefined}
|
||||
status={statusOf(validateStatus || status)}
|
||||
@@ -126,7 +127,7 @@ export const Button = forwardRef(function Button(
|
||||
ref={ref}
|
||||
type={buttonType}
|
||||
danger={danger}
|
||||
size={controlSize(size)}
|
||||
size={useConsoleControlSize(size)}
|
||||
shape={circle ? 'circle' : undefined}
|
||||
iconPosition={iconPosition === 'right' ? 'end' : 'start'}
|
||||
/>
|
||||
@@ -152,7 +153,7 @@ export const InputNumber = forwardRef(function InputNumber(
|
||||
<AntInputNumber
|
||||
{...props}
|
||||
ref={ref}
|
||||
size={controlSize(size)}
|
||||
size={useConsoleControlSize(size)}
|
||||
controls={!hideButtons}
|
||||
suffix={suffix}
|
||||
status={statusOf(validateStatus)}
|
||||
@@ -199,7 +200,7 @@ export function Select({
|
||||
return (
|
||||
<AntSelect
|
||||
{...props}
|
||||
size={controlSize(size)}
|
||||
size={useConsoleControlSize(size)}
|
||||
mode={
|
||||
allowCreate || allowAdditions
|
||||
? 'tags'
|
||||
@@ -311,7 +312,7 @@ export const RadioGroup = forwardRef(function RadioGroup(
|
||||
<AntRadio.Group
|
||||
{...props}
|
||||
ref={ref}
|
||||
size={controlSize(size || buttonSize)}
|
||||
size={useConsoleControlSize(size || buttonSize)}
|
||||
optionType={type === 'button' ? 'button' : 'default'}
|
||||
className={[
|
||||
props.className,
|
||||
@@ -380,7 +381,7 @@ export function DatePicker({
|
||||
defaultValue={
|
||||
defaultValue === undefined ? undefined : convert(defaultValue)
|
||||
}
|
||||
size={controlSize(size)}
|
||||
size={useConsoleControlSize(size)}
|
||||
allowClear={showClear}
|
||||
showTime={type?.toLowerCase().includes('time')}
|
||||
inputReadOnly={inputReadOnly}
|
||||
@@ -470,7 +471,7 @@ export function AutoComplete({
|
||||
typeof item === 'string' ? { value: item } : item,
|
||||
)}
|
||||
notFoundContent={emptyContent}
|
||||
size={controlSize(size)}
|
||||
size={useConsoleControlSize(size)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter') onEnterPress?.(e);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user