feat: 参考原型图 ui优化提交 企业端-企业中心 相关的页面

This commit is contained in:
zhanjunhao
2026-11-06 20:19:43 +08:00
parent bc6af74e9e
commit d58e468969
147 changed files with 9816 additions and 8768 deletions
+24 -4
View File
@@ -20,7 +20,8 @@ For commercial licensing, please contact support@quantumnous.com
import React, { forwardRef } from 'react';
import * as Ant from 'antd';
import { controlSize, placement } from './controls';
import { paginationEvents } from './pagination';
import { paginationEvents, paginationShowTotal } from './pagination';
import { overlayMaskClosable } from './overlayPolicy';
export * from './controls';
export { Form, withField } from './form';
@@ -124,7 +125,7 @@ export const Space = ({ spacing, vertical, size, ...props }) => (
<Ant.Space
{...props}
direction={vertical ? 'vertical' : 'horizontal'}
size={spacing ?? size}
size={spacing === 'medium' ? 'middle' : (spacing ?? size)}
/>
);
export const Divider = ({ margin, align, layout, style, ...props }) => (
@@ -271,6 +272,7 @@ export function Table({
current: pagination.currentPage ?? pagination.current,
pageSizeOptions:
pagination.pageSizeOpts ?? pagination.pageSizeOptions,
showTotal: paginationShowTotal(pagination.showTotal),
...paginationEvents(pagination),
}
: false
@@ -301,7 +303,7 @@ export function Pagination({
})}
pageSizeOptions={pageSizeOpts ?? props.pageSizeOptions}
size={size === 'small' ? 'small' : 'default'}
showTotal={showTotal === true ? (total) => `${total}` : showTotal}
showTotal={paginationShowTotal(showTotal)}
/>
);
}
@@ -516,6 +518,7 @@ function modalProps({
}) {
return {
...props,
maskClosable: overlayMaskClosable(props.maskClosable),
open: visible,
title: header === null ? null : (props.title ?? header),
keyboard: closeOnEsc,
@@ -556,6 +559,7 @@ export const SideSheet = ({
}) => (
<Ant.Drawer
{...props}
maskClosable={overlayMaskClosable(props.maskClosable)}
open={visible}
onClose={onCancel}
keyboard={closeOnEsc}
@@ -681,6 +685,7 @@ export const Dropdown = Object.assign(
const NavItem = ({ children }) => children;
const NavSub = ({ children }) => children;
const NavGroup = ({ children }) => children;
export const Nav = Object.assign(
function Nav({
children,
@@ -701,6 +706,21 @@ export const Nav = Object.assign(
return React.Children.toArray(nodes).flatMap((child, index) => {
if (!React.isValidElement(child)) return [];
const p = child.props;
if (child.type === NavGroup) {
const children = items(p.children, `${prefix}${p.itemKey}-`);
if (children.length === 0) return [];
// Collapsed menus keep their icon tooltips without group headings.
if (isCollapsed) return children;
return [
{
type: 'group',
key: p.itemKey,
label: p.text,
className: p.className,
children: p.folded ? [] : children,
},
];
}
if (child.type === NavItem || child.type === NavSub) {
const label = renderWrapper
? renderWrapper({ itemElement: <span>{p.text}</span>, props: p })
@@ -736,5 +756,5 @@ export const Nav = Object.assign(
/>
);
},
{ Item: NavItem, Sub: NavSub },
{ Item: NavItem, Sub: NavSub, Group: NavGroup },
);