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.
- package/README.md +605 -0
- package/dist/assets/BUTTON-41.png +0 -0
- package/dist/assets/Frame1.png +0 -0
- package/dist/assets/bell.png +0 -0
- package/dist/assets/button_icon.png +0 -0
- package/dist/assets/demo/logo1.png +0 -0
- package/dist/assets/down.png +0 -0
- package/dist/assets/react.svg +1 -0
- package/dist/assets/svg/bell.svg +5 -0
- package/dist/assets/svg/down.svg +5 -0
- package/dist/assets/svg/homepage.svg +1 -0
- package/dist/assets/svg/kefu.svg +8 -0
- package/dist/components/AvatarUpload/index.d.ts +3 -0
- package/dist/components/AvatarUpload/types.d.ts +10 -0
- package/dist/components/DetailView/index.d.ts +3 -0
- package/dist/components/DetailView/types.d.ts +17 -0
- package/dist/components/DoubleColLayout/index.d.ts +8 -0
- package/dist/components/DoubleColLayout/type.d.ts +86 -0
- package/dist/components/DynamicForm/index.d.ts +8 -0
- package/dist/components/DynamicForm/index.test.d.ts +1 -0
- package/dist/components/DynamicForm/types.d.ts +44 -0
- package/dist/components/FilterForm/index.d.ts +7 -0
- package/dist/components/FilterForm/types.d.ts +6 -0
- package/dist/components/FloatCard/index.d.ts +9 -0
- package/dist/components/FloatCard/types.d.ts +15 -0
- package/dist/components/GlobalHeader/components/AppStorePop/index.d.ts +3 -0
- package/dist/components/GlobalHeader/components/UserActions/index.d.ts +6 -0
- package/dist/components/GlobalHeader/components/UserPop/index.d.ts +5 -0
- package/dist/components/GlobalHeader/index.d.ts +3 -0
- package/dist/components/GlobalHeader/types.d.ts +50 -0
- package/dist/components/Login/components/OutLogin.d.ts +26 -0
- package/dist/components/Login/components/QrcodeLogin.d.ts +15 -0
- package/dist/components/Login/components/RegisterForm.d.ts +9 -0
- package/dist/components/Login/components/RegisterType.d.ts +13 -0
- package/dist/components/Login/components/SsoLogin.d.ts +16 -0
- package/dist/components/Login/index.d.ts +8 -0
- package/dist/components/Login/types.d.ts +47 -0
- package/dist/components/PageHeader/index.d.ts +7 -0
- package/dist/components/RemoteSelect/index.d.ts +3 -0
- package/dist/components/RemoteSelect/types.d.ts +15 -0
- package/dist/components/SelectedFilterTags/index.d.ts +8 -0
- package/dist/components/SelectedFilterTags/types.d.ts +11 -0
- package/dist/components/SidebarMenu/index.d.ts +7 -0
- package/dist/components/SidebarMenu/types.d.ts +14 -0
- package/dist/components/TablePlus/components/TableProvider/index.d.ts +2 -0
- package/dist/components/TablePlus/components/ToolBar/Setting.d.ts +6 -0
- package/dist/components/TablePlus/components/ToolBar/index.d.ts +7 -0
- package/dist/components/TablePlus/context.d.ts +3 -0
- package/dist/components/TablePlus/index.d.ts +5 -0
- package/dist/components/TablePlus/types.d.ts +74 -0
- package/dist/components/index.d.ts +18 -0
- package/dist/genee-antd.es.js +8434 -0
- package/dist/genee-antd.umd.js +157 -0
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- 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,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 @@
|
|
|
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,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,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,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,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,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,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,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,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';
|