@ccs-ui/rc-pro 1.1.7 → 1.1.10
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/es/ccs.d.ts +5 -3
- package/es/dialog/hook.d.ts +6 -6
- package/es/full-screen/index.js +1 -1
- package/es/pro-table/index.d.ts +17 -74
- package/es/pro-table/index.js +17 -477
- package/es/pro-table/search.d.ts +1 -1
- package/es/pro-table/search.js +3 -2
- package/es/pro-table/table.d.ts +80 -0
- package/es/pro-table/table.js +493 -0
- package/es/pro-table/tree.d.ts +7 -3
- package/es/pro-table/tree.js +10 -21
- package/es/table/index.d.ts +1 -1
- package/es/table/index.js +2 -27
- package/es/theme-dialog.js +2 -2
- package/package.json +1 -2
package/es/ccs.d.ts
CHANGED
|
@@ -197,11 +197,13 @@ type GlobalConfig = {
|
|
|
197
197
|
/** 路由上下文 */
|
|
198
198
|
Context: string;
|
|
199
199
|
/** 图片上传地址 */
|
|
200
|
-
UploadUrl
|
|
200
|
+
UploadUrl?: string;
|
|
201
201
|
/** 图片下载地址 */
|
|
202
|
-
DownloadUrl
|
|
202
|
+
DownloadUrl?: string;
|
|
203
203
|
};
|
|
204
204
|
type TableFormItems = TableFormItem[];
|
|
205
205
|
type TableInstanceRef<T = any> = MutableRefObject<TableInstance<T> | undefined> | React.RefObject<TableInstance<T>>;
|
|
206
|
-
type TableColumns<T = any> = ColumnsType<T
|
|
206
|
+
type TableColumns<T = any> = ColumnsType<T> & {
|
|
207
|
+
hidden?: boolean;
|
|
208
|
+
};
|
|
207
209
|
export type { PageType, RecordType, MenuTreeNode, PageQuery, ListQuery, HttpResult, GlobalConfig, HttpListResult, HttpPageResult, AuthButtonItem, MenuTreeNodeData, UserDetail, RouteHistory, TableData, TableFormItems, TableColumns, TableInstance, TableInstanceRef, TriggerChildrenProps, };
|
package/es/dialog/hook.d.ts
CHANGED
|
@@ -3,19 +3,19 @@ import React, { ReactNode } from 'react';
|
|
|
3
3
|
import CCS from '..';
|
|
4
4
|
export type CcsDialogModal = {
|
|
5
5
|
destroy: () => void;
|
|
6
|
-
update: (config:
|
|
6
|
+
update: (config: CcsDialogModalProps) => void;
|
|
7
7
|
};
|
|
8
8
|
export type CcsDialogDrawer = {
|
|
9
9
|
destroy: () => void;
|
|
10
|
-
update: (config:
|
|
10
|
+
update: (config: CcsDialogDrawerProps) => void;
|
|
11
11
|
};
|
|
12
|
-
type ModalFunc = (props:
|
|
12
|
+
type ModalFunc = (props: CcsDialogModalProps) => {
|
|
13
13
|
destroy: () => void;
|
|
14
|
-
update: (configUpdate:
|
|
14
|
+
update: (configUpdate: CcsDialogModalProps) => void;
|
|
15
15
|
};
|
|
16
|
-
type DrawerFunc = (props:
|
|
16
|
+
type DrawerFunc = (props: CcsDialogDrawerProps) => {
|
|
17
17
|
destroy: () => void;
|
|
18
|
-
update: (configUpdate:
|
|
18
|
+
update: (configUpdate: CcsDialogDrawerProps) => void;
|
|
19
19
|
};
|
|
20
20
|
export type CcsDialogModalProps = ModalFuncProps & {
|
|
21
21
|
/** antd form */
|
package/es/full-screen/index.js
CHANGED
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons';
|
|
8
8
|
import { Button, Tooltip } from 'antd';
|
|
9
9
|
import { useState } from 'react';
|
|
10
|
-
import { classPrefix } from "../pro-table";
|
|
10
|
+
import { classPrefix } from "../pro-table/table";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
export default (function (_ref) {
|
|
13
13
|
var onFullScreen = _ref.onFullScreen;
|
package/es/pro-table/index.d.ts
CHANGED
|
@@ -1,83 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
3
|
-
import CCS from '..';
|
|
1
|
+
import { HttpPageResult, HttpResult } from '../ccs';
|
|
4
2
|
import './index.less';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
type SearchEventType = 'search' | 'reset' | 'reload' | 'changePage' | 'initSearch';
|
|
11
|
-
type SearchBeforeType = ParamType & {
|
|
12
|
-
query: ParamType;
|
|
13
|
-
};
|
|
14
|
-
export type CcsTableProps<T> = TableProps<T> & {
|
|
15
|
-
data?: CCS.TableData<T>;
|
|
16
|
-
/** request 方法 */
|
|
17
|
-
request?: (params: any) => void;
|
|
18
|
-
/** request 额外参数 */
|
|
19
|
-
requestParam?: ParamType;
|
|
20
|
-
/** 自定义渲染内容 */
|
|
21
|
-
render?: (data: T[]) => ReactNode;
|
|
22
|
-
/** 异步树、父级参数名称,参数值:默认取rowkey的值 */
|
|
23
|
-
asyncTree?: {
|
|
24
|
-
parentName: string;
|
|
25
|
-
};
|
|
26
|
-
/** class name */
|
|
27
|
-
className?: string;
|
|
28
|
-
/** useEventEmitter事件 */
|
|
29
|
-
event$?: any;
|
|
30
|
-
/** style */
|
|
31
|
-
style?: CSSProperties;
|
|
3
|
+
import { CcsProTableProps, SearchEventType } from './table';
|
|
4
|
+
type TableProps<T> = Omit<CcsProTableProps<T>, 'onSearchAfter' | 'parentFieldName'> & {
|
|
5
|
+
/** 请求后格式化结果 */
|
|
6
|
+
onSearchAfter?: (data: HttpPageResult<T>, eventType?: SearchEventType) => any;
|
|
32
7
|
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
/** 是否初始查询,默认true */
|
|
37
|
-
init?: boolean;
|
|
38
|
-
/** 标题 */
|
|
39
|
-
title?: string;
|
|
40
|
-
/** 查询条件集合 */
|
|
41
|
-
formItems?: CCS.TableFormItems;
|
|
42
|
-
/** form item label 宽度 */
|
|
43
|
-
formItemLabelWidth?: number | string;
|
|
44
|
-
/** 查询form 初始值 */
|
|
45
|
-
formInitValues?: ParamType;
|
|
46
|
-
/** 按钮 操作部分 */
|
|
47
|
-
toolbar?: ReactElement;
|
|
48
|
-
/** 操作按钮扩展 */
|
|
49
|
-
toolbarExtra?: ReactElement;
|
|
50
|
-
/** 展开查询条件,默认false */
|
|
51
|
-
expandForm?: boolean;
|
|
52
|
-
/** 禁止收起条件,默认false */
|
|
53
|
-
disableCollapseForm?: boolean;
|
|
54
|
-
/** table 数据区域 */
|
|
55
|
-
table?: CcsTableProps<T>;
|
|
56
|
-
/** table style */
|
|
57
|
-
tableStyle?: CSSProperties;
|
|
58
|
-
/** 水印文字 */
|
|
59
|
-
watermark?: string;
|
|
60
|
-
/** ref 回调方法 */
|
|
61
|
-
proRef?: CCS.TableInstanceRef<T>;
|
|
62
|
-
/** class */
|
|
63
|
-
className?: string;
|
|
64
|
-
/** style */
|
|
65
|
-
style?: CSSProperties;
|
|
66
|
-
/** children */
|
|
67
|
-
children?: ReactNode;
|
|
68
|
-
/** 执行search 后回调函数 */
|
|
69
|
-
searchEvent?: () => void;
|
|
70
|
-
/** 请求前格式化参数 */
|
|
71
|
-
onSearchBefore?: (params: SearchBeforeType, eventType?: SearchEventType) => SearchBeforeType;
|
|
8
|
+
type TableTreeProps<T> = Omit<CcsProTableProps<T>, 'onSearchAfter'> & {
|
|
9
|
+
/** 父级值字段 */
|
|
10
|
+
parentFieldName: string;
|
|
72
11
|
/** 请求后格式化结果 */
|
|
73
|
-
onSearchAfter?: (data:
|
|
12
|
+
onSearchAfter?: (data: HttpResult<(T & {
|
|
13
|
+
children?: T[];
|
|
14
|
+
})[]>, eventType?: SearchEventType) => any;
|
|
74
15
|
};
|
|
75
|
-
export declare const classPrefix = "ccs-pl";
|
|
76
16
|
/**
|
|
77
|
-
*
|
|
78
|
-
* @param
|
|
17
|
+
* 查询表格组件
|
|
18
|
+
* @param TableProps
|
|
79
19
|
* @param ref
|
|
80
20
|
* @returns
|
|
81
21
|
*/
|
|
82
|
-
declare const ProTable:
|
|
22
|
+
declare const ProTable: {
|
|
23
|
+
<T extends object = any>(props: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
tree: <T_1 extends object = any>(props: TableTreeProps<T_1>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
83
26
|
export default ProTable;
|