geneeantd 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +605 -0
  2. package/dist/assets/BUTTON-41.png +0 -0
  3. package/dist/assets/Frame1.png +0 -0
  4. package/dist/assets/bell.png +0 -0
  5. package/dist/assets/button_icon.png +0 -0
  6. package/dist/assets/demo/logo1.png +0 -0
  7. package/dist/assets/down.png +0 -0
  8. package/dist/assets/react.svg +1 -0
  9. package/dist/assets/svg/bell.svg +5 -0
  10. package/dist/assets/svg/down.svg +5 -0
  11. package/dist/assets/svg/homepage.svg +1 -0
  12. package/dist/assets/svg/kefu.svg +8 -0
  13. package/dist/components/AvatarUpload/index.d.ts +3 -0
  14. package/dist/components/AvatarUpload/types.d.ts +10 -0
  15. package/dist/components/DetailView/index.d.ts +3 -0
  16. package/dist/components/DetailView/types.d.ts +17 -0
  17. package/dist/components/DoubleColLayout/index.d.ts +8 -0
  18. package/dist/components/DoubleColLayout/type.d.ts +86 -0
  19. package/dist/components/DynamicForm/index.d.ts +8 -0
  20. package/dist/components/DynamicForm/index.test.d.ts +1 -0
  21. package/dist/components/DynamicForm/types.d.ts +44 -0
  22. package/dist/components/FilterForm/index.d.ts +7 -0
  23. package/dist/components/FilterForm/types.d.ts +6 -0
  24. package/dist/components/FloatCard/index.d.ts +9 -0
  25. package/dist/components/FloatCard/types.d.ts +15 -0
  26. package/dist/components/GlobalHeader/components/AppStorePop/index.d.ts +3 -0
  27. package/dist/components/GlobalHeader/components/UserActions/index.d.ts +6 -0
  28. package/dist/components/GlobalHeader/components/UserPop/index.d.ts +5 -0
  29. package/dist/components/GlobalHeader/index.d.ts +3 -0
  30. package/dist/components/GlobalHeader/types.d.ts +50 -0
  31. package/dist/components/Login/components/OutLogin.d.ts +26 -0
  32. package/dist/components/Login/components/QrcodeLogin.d.ts +15 -0
  33. package/dist/components/Login/components/RegisterForm.d.ts +9 -0
  34. package/dist/components/Login/components/RegisterType.d.ts +13 -0
  35. package/dist/components/Login/components/SsoLogin.d.ts +16 -0
  36. package/dist/components/Login/index.d.ts +8 -0
  37. package/dist/components/Login/types.d.ts +47 -0
  38. package/dist/components/PageHeader/index.d.ts +7 -0
  39. package/dist/components/RemoteSelect/index.d.ts +3 -0
  40. package/dist/components/RemoteSelect/types.d.ts +15 -0
  41. package/dist/components/SelectedFilterTags/index.d.ts +8 -0
  42. package/dist/components/SelectedFilterTags/types.d.ts +11 -0
  43. package/dist/components/SidebarMenu/index.d.ts +7 -0
  44. package/dist/components/SidebarMenu/types.d.ts +14 -0
  45. package/dist/components/TablePlus/components/TableProvider/index.d.ts +2 -0
  46. package/dist/components/TablePlus/components/ToolBar/Setting.d.ts +6 -0
  47. package/dist/components/TablePlus/components/ToolBar/index.d.ts +7 -0
  48. package/dist/components/TablePlus/context.d.ts +3 -0
  49. package/dist/components/TablePlus/index.d.ts +5 -0
  50. package/dist/components/TablePlus/types.d.ts +74 -0
  51. package/dist/components/index.d.ts +18 -0
  52. package/dist/genee-antd.es.js +8434 -0
  53. package/dist/genee-antd.umd.js +157 -0
  54. package/dist/index.d.ts +1 -0
  55. package/dist/style.css +1 -0
  56. package/dist/vite.svg +1 -0
  57. package/package.json +121 -0
@@ -0,0 +1,17 @@
1
+ export type TabItem = {
2
+ key: string;
3
+ label: string;
4
+ childrenContent: React.ReactNode;
5
+ };
6
+ export type Tabs = {
7
+ defaultActiveKey: string;
8
+ items: TabItem[];
9
+ onChange?: (key: string) => void;
10
+ };
11
+ export type Props = {
12
+ title?: React.ReactNode;
13
+ buttonBar?: React.ReactNode;
14
+ statistic?: React.ReactNode;
15
+ overview?: React.ReactNode;
16
+ tabs?: Tabs;
17
+ };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { DoubleColLayoutProps } from './type';
3
+ /**
4
+ * 双列布局组件
5
+ * 提供灵活的左右两栏布局方案
6
+ */
7
+ declare const DoubleColLayout: React.FC<DoubleColLayoutProps>;
8
+ export default DoubleColLayout;
@@ -0,0 +1,86 @@
1
+ import { CSSProperties } from 'react';
2
+ export type menuItem = {
3
+ label: string;
4
+ key: string;
5
+ };
6
+ /**
7
+ * 拖拽相关配置
8
+ */
9
+ export interface ResizeConfig {
10
+ /**
11
+ * 是否启用拖拽功能
12
+ */
13
+ enabled?: boolean;
14
+ /**
15
+ * 最小宽度限制
16
+ */
17
+ minWidth?: number;
18
+ /**
19
+ * 最大宽度限制
20
+ */
21
+ maxWidth?: number;
22
+ /**
23
+ * 宽度变化回调
24
+ */
25
+ onWidthChange?: (width: number) => void;
26
+ }
27
+ export interface DoubleColLayoutProps {
28
+ /**
29
+ * 左侧侧边栏内容
30
+ */
31
+ leftMenu: menuItem[];
32
+ /**
33
+ * 左侧侧边的激活模式
34
+ */
35
+ activeMode?: 'normal' | 'scroll';
36
+ /**
37
+ * 当前选中的菜单项key
38
+ */
39
+ menuActiveKey?: string;
40
+ /**
41
+ * 点击菜单项回调
42
+ */
43
+ menuItemClick?: (item: menuItem) => void;
44
+ /**
45
+ * 右侧主内容
46
+ */
47
+ rightContent: React.ReactNode;
48
+ topBarOptions?: {
49
+ barList: {
50
+ label: string;
51
+ key: string;
52
+ }[];
53
+ /**
54
+ * 当前选中的顶部栏项key
55
+ */
56
+ barActiveKey?: string;
57
+ barClick?: (item: {
58
+ label: string;
59
+ key: string;
60
+ }) => void;
61
+ };
62
+ /**
63
+ * 左侧侧边栏宽度,默认为250px
64
+ */
65
+ leftWidth?: number;
66
+ /**
67
+ * 侧边栏样式
68
+ */
69
+ siderStyle?: CSSProperties;
70
+ /**
71
+ * 拖拽配置
72
+ */
73
+ resizeConfig?: ResizeConfig;
74
+ /**
75
+ * 内容区域样式
76
+ */
77
+ contentStyle?: CSSProperties;
78
+ /**
79
+ * 整体布局样式
80
+ */
81
+ layoutStyle?: CSSProperties;
82
+ /**
83
+ * 折叠状态变化回调
84
+ */
85
+ onCollapse?: (collapsed: boolean) => void;
86
+ }
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { FormConfig } from './types';
3
+ /**
4
+ * 动态表单组件
5
+ * 支持多种表单项类型,可配置展开/收起功能
6
+ */
7
+ declare const DynamicForm: React.FC<FormConfig>;
8
+ export default DynamicForm;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,44 @@
1
+ import { FormInstance } from 'antd';
2
+ export interface FormItem {
3
+ label: string;
4
+ name: string;
5
+ type: 'text' | 'select' | 'date' | 'number' | 'checkbox' | 'radio' | 'cascader' | 'custom';
6
+ props?: Record<string, unknown>;
7
+ options?: {
8
+ label: string;
9
+ value: string | number;
10
+ }[];
11
+ rules?: Record<string, unknown>[];
12
+ customRender?: React.ReactNode;
13
+ wrapperCol?: {
14
+ span?: number;
15
+ offset?: number;
16
+ };
17
+ labelCol?: {
18
+ span?: number;
19
+ offset?: number;
20
+ };
21
+ }
22
+ export interface FormConfig {
23
+ items: FormItem[];
24
+ onSubmit: (values: Record<string, unknown>) => void;
25
+ onReset?: () => void;
26
+ labelWidth?: number;
27
+ form?: FormInstance;
28
+ collapsed?: boolean;
29
+ layout?: 'inline' | 'horizontal' | 'vertical';
30
+ defaultShowCount?: number;
31
+ onCollapseChange?: (collapsed: boolean) => void;
32
+ labelCol?: Record<string, unknown>;
33
+ wrapperCol?: Record<string, unknown>;
34
+ itemsPerRow?: number;
35
+ scrollToFirstError?: boolean;
36
+ actionProps?: {
37
+ actionColSpan?: number;
38
+ submitBtnStyle?: React.CSSProperties;
39
+ submitText?: string;
40
+ resetText?: string;
41
+ };
42
+ onValuesChange?: (values: Record<string, unknown>) => void;
43
+ initialValues?: Record<string, unknown>;
44
+ }
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { FilterFormProps } from './types';
3
+ /**
4
+ * 合并了表单和列表功能的页面组件
5
+ */
6
+ declare const FilterForm: React.FC<FilterFormProps>;
7
+ export default FilterForm;
@@ -0,0 +1,6 @@
1
+ import { FormConfig } from '../DynamicForm/types';
2
+ export interface FilterFormProps {
3
+ isFloating?: boolean;
4
+ formConfig: FormConfig;
5
+ isShowFilterTags?: boolean;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { FloatCardProps } from './types';
3
+ /**
4
+ * 浮动卡片组件
5
+ * 当isFloating为true时,卡片会浮动显示在父容器顶部,并有阴影效果
6
+ * 同时在下方创建占位元素,防止其他元素上移
7
+ */
8
+ declare const FloatCard: React.FC<FloatCardProps>;
9
+ export default FloatCard;
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ export interface FloatCardProps {
3
+ /** 是否处于浮动状态 */
4
+ isFloating: boolean;
5
+ /** 卡片内容 */
6
+ children: ReactNode;
7
+ /** 自定义样式 */
8
+ style?: React.CSSProperties;
9
+ /** 占位元素的最大高度,单位px */
10
+ placeholderMaxHeight?: number;
11
+ /** 卡片阴影,当isFloating为true时使用 */
12
+ floatingShadow?: string;
13
+ /** 卡片背景色 */
14
+ backgroundColor?: string;
15
+ }
@@ -0,0 +1,3 @@
1
+ import { AppStoreProps } from '../../types';
2
+ declare const AppStorePop: (props: AppStoreProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default AppStorePop;
@@ -0,0 +1,6 @@
1
+ import { GlobalHeaderProps } from '../../types';
2
+ declare const UserActions: (props: {
3
+ noticeListProps: GlobalHeaderProps["noticeListProps"];
4
+ userInfo?: GlobalHeaderProps["userInfo"];
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default UserActions;
@@ -0,0 +1,5 @@
1
+ import { GlobalHeaderProps } from '../../types';
2
+ declare const UserPop: (props: {
3
+ userInfo?: GlobalHeaderProps["userInfo"];
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default UserPop;
@@ -0,0 +1,3 @@
1
+ import { GlobalHeaderProps } from './types';
2
+ declare const GlobalHeader: (props: GlobalHeaderProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default GlobalHeader;
@@ -0,0 +1,50 @@
1
+ import { default as React } from 'react';
2
+ export interface AppStoreItem {
3
+ txt: string;
4
+ image?: React.ReactNode;
5
+ onClick?: () => void;
6
+ }
7
+ export interface AppStoreList {
8
+ items: AppStoreItem[];
9
+ style?: React.CSSProperties;
10
+ }
11
+ export interface AppStoreProps {
12
+ appStoreList?: AppStoreList;
13
+ isShow?: boolean;
14
+ }
15
+ export interface GlobalHeaderProps {
16
+ appStoreProps?: AppStoreProps;
17
+ searchProps?: {
18
+ placeholder?: string;
19
+ onSearch?: (value: string) => void;
20
+ onChange?: (value: string) => void;
21
+ };
22
+ centerTabsProps?: {
23
+ onChange?: (key: string) => void;
24
+ centerTabs?: {
25
+ key: string;
26
+ label: string;
27
+ }[];
28
+ currentTabKey?: string;
29
+ };
30
+ noticeListProps?: {
31
+ seeAll: (type?: any) => void;
32
+ noticeList: {
33
+ title: string;
34
+ content: string;
35
+ time: string;
36
+ type: 'notice' | 'message' | 'todo';
37
+ }[];
38
+ };
39
+ userInfo?: {
40
+ avatar: string;
41
+ name: string;
42
+ acount: string;
43
+ logout: () => void;
44
+ userOptions?: {
45
+ label: string;
46
+ icon?: React.ReactNode;
47
+ onClick: () => void;
48
+ }[];
49
+ };
50
+ }
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+ interface OutLoginProps {
3
+ /** 按钮文字 */
4
+ buttonText?: string;
5
+ /** 点击事件处理 */
6
+ onLogin?: () => void;
7
+ /** 自定义样式 */
8
+ style?: React.CSSProperties;
9
+ /** 自定义类名 */
10
+ className?: string;
11
+ /** 返回登录页的回调函数 */
12
+ onBack?: () => void;
13
+ /** 校外登录提交回调 */
14
+ onSubmit?: (values: any) => void;
15
+ /** 校外登录忘记密码回调 */
16
+ onForgetPassword?: (values: any) => void;
17
+ }
18
+ /**
19
+ * 校外用户登录组件
20
+ *
21
+ */
22
+ declare const OutLogin: React.FC<OutLoginProps & {
23
+ onSubmit?: (values: any) => void;
24
+ onForgetPassword?: (values: any) => void;
25
+ }>;
26
+ export default OutLogin;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ interface QrcodeLoginProps {
3
+ /** 按钮文字 */
4
+ qrcodeUrl?: string;
5
+ /** 返回登录页的回调函数 */
6
+ onBack?: () => void;
7
+ /** 二维码登录loading */
8
+ qrcodeLoginLoading?: boolean;
9
+ }
10
+ /**
11
+ * 校外用户登录组件
12
+ *
13
+ */
14
+ declare const QrcodeLogin: React.FC<QrcodeLoginProps>;
15
+ export default QrcodeLogin;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { ViewType } from '../types';
3
+ import { FormConfig } from '../../DynamicForm/types';
4
+ declare const RegisterForm: React.FC<{
5
+ onBack: (type: ViewType) => void;
6
+ registerType: string;
7
+ formConfig: FormConfig;
8
+ }>;
9
+ export default RegisterForm;
@@ -0,0 +1,13 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ interface RegisterTypeProps {
3
+ onBack?: () => void;
4
+ onRegisterClick?: (registerType: string) => void;
5
+ registerTypeList?: Array<{
6
+ desc: string;
7
+ icon: ReactNode;
8
+ key: string;
9
+ name: string;
10
+ }>;
11
+ }
12
+ declare const RegisterType: React.FC<RegisterTypeProps>;
13
+ export default RegisterType;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ interface LoginType {
3
+ key: string;
4
+ name: string;
5
+ icon: React.ReactNode;
6
+ onClick: () => void;
7
+ }
8
+ interface LoginProps {
9
+ ssoLoginUrl?: string;
10
+ otherLoginTypes?: LoginType[];
11
+ onRegisterClick?: () => void;
12
+ onLoginTypeClick?: (key: string) => void;
13
+ ssoBtnbgUrl?: string;
14
+ }
15
+ declare const SsoLogin: React.FC<LoginProps>;
16
+ export default SsoLogin;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { LoginLayoutProps } from './types';
3
+ /**
4
+ * 登录页布局组件(通用版)
5
+ * 不依赖路由,通过props传入右侧内容
6
+ */
7
+ declare const LoginLayout: React.FC<LoginLayoutProps>;
8
+ export default LoginLayout;
@@ -0,0 +1,47 @@
1
+ import { FormConfig } from '../../components/DynamicForm/types';
2
+ export type ViewType = 'login' | 'registertype' | 'outlogin' | 'registerform' | 'qrcodelogin' | 'other';
3
+ export interface LoginLayoutProps {
4
+ layout?: 'left' | 'right' | 'center';
5
+ /** 左侧Logo文本 */
6
+ logoText?: string;
7
+ /** 左侧描述文本 */
8
+ descriptionText?: string;
9
+ /** 自定义样式 */
10
+ style?: React.CSSProperties;
11
+ /** 自定义类名 */
12
+ className?: string;
13
+ /** 统一身份认证的跳转链接 */
14
+ ssoLoginUrl?: string;
15
+ /** 当前视图 */
16
+ currentView?: ViewType;
17
+ /** 切换视图的回调函数 */
18
+ onViewChange?: (view: ViewType) => void;
19
+ /** 登录类型点击回调 */
20
+ onLoginTypeClick?: (key: string) => void;
21
+ /** 二维码登录loading */
22
+ qrcodeLoginLoading?: boolean;
23
+ /** 统一身份认证按钮背景图片 */
24
+ ssoBtnbgUrl?: string;
25
+ /** 其他登录方式类型数组 */
26
+ otherLoginTypes?: Array<{
27
+ key: string;
28
+ name: string;
29
+ icon: React.ReactNode;
30
+ onClick: () => void;
31
+ outLoginSubmit?: (values: any) => void;
32
+ outLoginForgetPassword?: (values: any) => void;
33
+ qrcodeUrl?: string;
34
+ }>;
35
+ /** 左侧背景图片 */
36
+ leftBackgroudImg?: string;
37
+ /** 左侧Logo图片 */
38
+ logoUrl?: string;
39
+ /** 注册类型列表 */
40
+ registerTypeList?: Array<{
41
+ key: string;
42
+ name: string;
43
+ desc: string;
44
+ icon: React.ReactNode;
45
+ formConfig: FormConfig;
46
+ }>;
47
+ }
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * 页面头部组件
4
+ * 用于显示页面标题、操作按钮等信息
5
+ */
6
+ declare const PageHeader: React.FC;
7
+ export default PageHeader;
@@ -0,0 +1,3 @@
1
+ import { RemoteSelectProps } from './types';
2
+ declare const RemoteSelect: (props: RemoteSelectProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default RemoteSelect;
@@ -0,0 +1,15 @@
1
+ import { SelectProps } from 'antd';
2
+ export interface RemoteSelectProps {
3
+ request: (params: Record<string, any>) => Promise<{
4
+ data: {
5
+ label: string;
6
+ value: string | number;
7
+ }[];
8
+ total?: number;
9
+ hasMore?: boolean;
10
+ }>;
11
+ onChange?: (value: string | number | (string | number)[]) => void;
12
+ debounceTime?: number;
13
+ pageSize?: number;
14
+ antdSelectProps?: Omit<SelectProps, 'options' | 'showSearch' | 'onSearch' | 'onPopupScroll' | 'onchange'>;
15
+ }
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { SelectedFilterTagsProps } from './types';
3
+ /**
4
+ * 已选筛选条件标签组件
5
+ * 用于展示用户已选择的筛选条件,并支持单个删除和全部清空操作
6
+ */
7
+ declare const SelectedFilterTags: React.FC<SelectedFilterTagsProps>;
8
+ export default SelectedFilterTags;
@@ -0,0 +1,11 @@
1
+ import { FormItem } from '../DynamicForm/types';
2
+ export interface SelectedFilterTagsProps {
3
+ /** 已选择的筛选条件 */
4
+ selectedValues: Record<string, unknown>;
5
+ /** 表单项配置列表,用于获取字段标签 */
6
+ items: FormItem[];
7
+ /** 移除单个筛选条件的回调函数 */
8
+ onRemoveCondition: (fieldName: string) => void;
9
+ /** 清空所有筛选条件的回调函数 */
10
+ onReset: () => void;
11
+ }
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { SidebarMenuProps } from './types';
3
+ /**
4
+ * 侧边栏菜单组件
5
+ */
6
+ declare const SidebarMenu: React.FC<SidebarMenuProps>;
7
+ export default SidebarMenu;
@@ -0,0 +1,14 @@
1
+ import { MenuProps } from 'antd';
2
+ export interface MenuItem {
3
+ key: string;
4
+ icon: React.ReactNode;
5
+ label: string;
6
+ children?: MenuItem[];
7
+ }
8
+ export interface SidebarMenuProps {
9
+ collapsed?: boolean;
10
+ onCollapse?: (collapsed: boolean) => void;
11
+ selectedKeys?: string[];
12
+ onSelect?: MenuProps['onSelect'];
13
+ menuItems?: MenuItem[];
14
+ }
@@ -0,0 +1,2 @@
1
+ import { TableContextType, TableProviderProps } from '../../types';
2
+ export declare const TableProvider: <T extends TableContextType>({ children, contextValue, }: TableProviderProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ type Props = {
3
+ show?: boolean;
4
+ };
5
+ declare const Setting: React.MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>;
6
+ export default Setting;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { ToolBarOptions } from '../../types';
3
+ type Props = {
4
+ options: ToolBarOptions;
5
+ };
6
+ declare const ToolBar: React.MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>;
7
+ export default ToolBar;
@@ -0,0 +1,3 @@
1
+ import { TableContextType } from './types';
2
+ export declare const TableContext: import('react').Context<TableContextType | undefined>;
3
+ export declare const useTableContext: () => TableContextType;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { TablePlusProps, TableRefProps } from './types';
3
+ declare const TablePlus: React.ForwardRefExoticComponent<TablePlusProps<any> & React.RefAttributes<TableRefProps>>;
4
+ export default TablePlus;
5
+ export { TablePlus };
@@ -0,0 +1,74 @@
1
+ import { TableProps } from 'antd/lib';
2
+ import { ColumnType } from 'antd/es/table';
3
+ import { ButtonProps } from 'antd';
4
+ import { default as React } from 'react';
5
+ export interface OperationType<T = any> {
6
+ label: string;
7
+ key: string;
8
+ show?: boolean | ((record: T, index: number) => boolean);
9
+ buttonProps?: ButtonProps;
10
+ }
11
+ export type TableOption = {
12
+ show: boolean;
13
+ onClick?: () => void;
14
+ };
15
+ export type ToolBarOptions = {
16
+ setting?: TableOption;
17
+ print?: TableOption;
18
+ outPut?: TableOption;
19
+ batchDelete?: {
20
+ show: boolean;
21
+ onClick?: (selectedRows: any[]) => void;
22
+ };
23
+ batch?: BatchOption;
24
+ showFirstLastPage?: boolean;
25
+ };
26
+ export type BatchOption = {
27
+ onClick?: (selectedRows: any[], key: string) => void;
28
+ show?: boolean;
29
+ dropDownOptions?: Array<{
30
+ label: string;
31
+ key: string;
32
+ icon?: React.ReactNode;
33
+ }>;
34
+ };
35
+ export interface ColumnPlusType<T = any> extends ColumnType<T> {
36
+ operations?: OperationType<T>[];
37
+ operateClick?: (key: string, record: T) => void;
38
+ operationRender?: (text: any, record: T, index: number) => React.ReactNode[];
39
+ }
40
+ export interface TablePlusProps<T = any> extends Omit<TableProps<T>, 'columns'> {
41
+ columns: ColumnPlusType<T>[];
42
+ request?: (params: Record<string, any>) => Promise<{
43
+ data: T[];
44
+ success: boolean;
45
+ total: number;
46
+ }>;
47
+ dataSource?: T[];
48
+ toolBarRender?: () => React.ReactNode;
49
+ options?: ToolBarOptions;
50
+ loading?: boolean;
51
+ params?: Record<string, any>;
52
+ tableHeaderTitle?: string | React.ReactNode;
53
+ showFirstLastPage?: boolean;
54
+ pagination?: {
55
+ pageSize?: number;
56
+ current?: number;
57
+ total?: number;
58
+ showSizeChanger?: boolean;
59
+ showQuickJumper?: boolean;
60
+ onChange?: (page: number, pageSize: number) => void;
61
+ } | false;
62
+ }
63
+ export interface TableRefProps {
64
+ refresh?: () => void;
65
+ }
66
+ export interface TableContextType {
67
+ selectRows: any[];
68
+ columns: ColumnPlusType<any>[];
69
+ setColumns?: (columns: ColumnPlusType<any>[]) => void;
70
+ }
71
+ export type TableProviderProps<T> = {
72
+ children: React.ReactNode;
73
+ contextValue: T;
74
+ };
@@ -0,0 +1,18 @@
1
+ export { TablePlus } from './TablePlus';
2
+ export * from './TablePlus/types';
3
+ export { default as DynamicForm } from './DynamicForm';
4
+ export * from './DynamicForm/types';
5
+ export { default as FilterForm } from './FilterForm';
6
+ export * from './FilterForm/types';
7
+ export { default as FloatCard } from './FloatCard';
8
+ export * from './FloatCard/types';
9
+ export { default as Login } from './Login';
10
+ export * from './Login/types';
11
+ export { default as RemoteSelect } from './RemoteSelect';
12
+ export * from './RemoteSelect/types';
13
+ export { default as AvatarUpload } from './AvatarUpload';
14
+ export * from './AvatarUpload/types';
15
+ export { default as DoubleColLayout } from './DoubleColLayout';
16
+ export * from './DoubleColLayout/type';
17
+ export { default as DetailView } from './DetailView';
18
+ export * from './DetailView/types';