@ccs-ui/rc-pro 1.2.1-beta-5 → 2.0.1
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/auth/auth-button.d.ts +3 -1
- package/es/auth/auth-button.js +40 -5
- package/es/auth/index.d.ts +2 -1
- package/es/ccs.d.ts +27 -66
- package/es/color-picker/index.d.ts +2 -4
- package/es/config.d.ts +5 -3
- package/es/config.js +98 -9
- package/es/context/index.d.ts +13 -9
- package/es/context/index.js +2 -2
- package/es/dialog/DialogRequestButton.d.ts +1 -1
- package/es/dialog/DialogSelfOkButton.d.ts +1 -1
- package/es/dialog/button.d.ts +3 -3
- package/es/dialog/drawer-footer.d.ts +2 -3
- package/es/dialog/hook.d.ts +4 -0
- package/es/dialog/hook.js +13 -7
- package/es/editor/index.d.ts +2 -4
- package/es/hooks/use-app.d.ts +6 -0
- package/es/hooks/use-app.js +15 -0
- package/es/index.d.ts +2 -3
- package/es/index.js +2 -3
- package/es/layout-keep-alive/index.d.ts +1 -1
- package/es/layout-keep-alive/index.js +14 -18
- package/es/layout-keep-alive/page.d.ts +1 -0
- package/es/layout-single-page/index.d.ts +1 -1
- package/es/layout-single-page/index.js +7 -23
- package/es/pro-grid/index.d.ts +4 -9
- package/es/pro-table/head.d.ts +2 -2
- package/es/pro-table/index.less +0 -27
- package/es/pro-table/table.d.ts +8 -16
- package/es/pro-table/table.js +6 -33
- package/es/trigger/index.d.ts +2 -8
- package/es/upload/index.d.ts +1 -1
- package/es/virtual-list/index.d.ts +3 -4
- package/es/water-mark/index.d.ts +3 -10
- package/package.json +5 -6
- package/es/hooks/use-global.d.ts +0 -4
- package/es/hooks/use-global.js +0 -10
- package/es/pro-table/search.d.ts +0 -17
- package/es/pro-table/search.js +0 -312
- package/es/theme.d.ts +0 -12
- package/es/theme.js +0 -66
|
@@ -58,13 +58,10 @@ export default function KeepAliveTabs(_ref) {
|
|
|
58
58
|
// 菜单改变,更新用户权限信息
|
|
59
59
|
useUpdateEffect(function () {
|
|
60
60
|
components.current.forEach(function (component) {
|
|
61
|
-
var _menu$children;
|
|
62
61
|
var menu = menus.find(function (m) {
|
|
63
|
-
return m.
|
|
62
|
+
return m.menuUrl === component.key;
|
|
64
63
|
});
|
|
65
|
-
component.urlAuthList = (menu === null || menu === void 0
|
|
66
|
-
return m.nodeData.menuUrl;
|
|
67
|
-
})) || [];
|
|
64
|
+
component.urlAuthList = (menu === null || menu === void 0 ? void 0 : menu.urlAuthList) || [];
|
|
68
65
|
component.timestamp = new Date().getTime();
|
|
69
66
|
});
|
|
70
67
|
update();
|
|
@@ -73,7 +70,7 @@ export default function KeepAliveTabs(_ref) {
|
|
|
73
70
|
// 当前菜单
|
|
74
71
|
var curMenu = useMemo(function () {
|
|
75
72
|
var menu = menus.find(function (m) {
|
|
76
|
-
var menuUrl = m.
|
|
73
|
+
var menuUrl = m.menuUrl;
|
|
77
74
|
if (menuUrl.includes('?')) {
|
|
78
75
|
return menuUrl.split('?')[0] === pathname;
|
|
79
76
|
}
|
|
@@ -82,7 +79,7 @@ export default function KeepAliveTabs(_ref) {
|
|
|
82
79
|
|
|
83
80
|
// add document title
|
|
84
81
|
setTimeout(function () {
|
|
85
|
-
document.title = "".concat(
|
|
82
|
+
document.title = "".concat((menu === null || menu === void 0 ? void 0 : menu.menuName) || (menu === null || menu === void 0 ? void 0 : menu.menuUrl), " - ").concat(appName);
|
|
86
83
|
}, 10);
|
|
87
84
|
|
|
88
85
|
// save history route
|
|
@@ -116,7 +113,7 @@ export default function KeepAliveTabs(_ref) {
|
|
|
116
113
|
}
|
|
117
114
|
RouteHistorys.unshift({
|
|
118
115
|
pathName: pathname,
|
|
119
|
-
menuName: (menu === null || menu === void 0 ? void 0 : menu.
|
|
116
|
+
menuName: (menu === null || menu === void 0 ? void 0 : menu.menuName) || '',
|
|
120
117
|
time: new Date()
|
|
121
118
|
});
|
|
122
119
|
CcsUtils.setStroage('_ROUTE_HISTORY', RouteHistorys);
|
|
@@ -137,15 +134,14 @@ export default function KeepAliveTabs(_ref) {
|
|
|
137
134
|
return c.key === pathname;
|
|
138
135
|
});
|
|
139
136
|
if (!component) {
|
|
140
|
-
var
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
})) || [];
|
|
137
|
+
var _ref3 = curMenu || {},
|
|
138
|
+
_ref3$urlAuthList = _ref3.urlAuthList,
|
|
139
|
+
urlAuthList = _ref3$urlAuthList === void 0 ? [] : _ref3$urlAuthList;
|
|
144
140
|
components.current = [].concat(_toConsumableArray(components.current), [{
|
|
145
141
|
locationKey: locationKey,
|
|
146
142
|
key: pathname,
|
|
147
143
|
timestamp: new Date().getTime(),
|
|
148
|
-
label: curMenu ? curMenu.
|
|
144
|
+
label: curMenu ? curMenu.menuName : '未知',
|
|
149
145
|
outlet: curMenu ? outlet : /*#__PURE__*/_jsx(Empty, {
|
|
150
146
|
description: "\u672A\u77E5\u9875\u9762"
|
|
151
147
|
}),
|
|
@@ -224,11 +220,11 @@ export default function KeepAliveTabs(_ref) {
|
|
|
224
220
|
},
|
|
225
221
|
items: components.current,
|
|
226
222
|
tabBarExtraContent: components.current.length > 2 ? tabBarExtraContent : null
|
|
227
|
-
}), components.current.map(function (
|
|
228
|
-
var key =
|
|
229
|
-
urlAuthList =
|
|
230
|
-
timestamp =
|
|
231
|
-
outlet =
|
|
223
|
+
}), components.current.map(function (_ref4) {
|
|
224
|
+
var key = _ref4.key,
|
|
225
|
+
urlAuthList = _ref4.urlAuthList,
|
|
226
|
+
timestamp = _ref4.timestamp,
|
|
227
|
+
outlet = _ref4.outlet;
|
|
232
228
|
return /*#__PURE__*/_jsx(Page, {
|
|
233
229
|
active: key === pathname,
|
|
234
230
|
location: location,
|
|
@@ -2,7 +2,7 @@ import CCS from "..";
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
type PropsType = {
|
|
4
4
|
appName: string;
|
|
5
|
-
menus: CCS.
|
|
5
|
+
menus: CCS.MenuType[];
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
8
|
export default function SinglePage({ appName, menus, className, }: PropsType): import("react/jsx-runtime").JSX.Element;
|
|
@@ -29,13 +29,10 @@ export default function SinglePage(_ref) {
|
|
|
29
29
|
// 菜单改变,更新用户权限信息
|
|
30
30
|
useUpdateEffect(function () {
|
|
31
31
|
components.current.forEach(function (component) {
|
|
32
|
-
var _menu$children;
|
|
33
32
|
var menu = menus.find(function (m) {
|
|
34
|
-
return m.
|
|
33
|
+
return m.menuUrl === component.key;
|
|
35
34
|
});
|
|
36
|
-
component.urlAuthList = (menu === null || menu === void 0
|
|
37
|
-
return m.nodeData.menuUrl;
|
|
38
|
-
})) || [];
|
|
35
|
+
component.urlAuthList = (menu === null || menu === void 0 ? void 0 : menu.urlAuthList) || [];
|
|
39
36
|
component.timestamp = new Date().getTime();
|
|
40
37
|
});
|
|
41
38
|
update();
|
|
@@ -43,9 +40,8 @@ export default function SinglePage(_ref) {
|
|
|
43
40
|
|
|
44
41
|
// 当前菜单
|
|
45
42
|
var menuInfo = useMemo(function () {
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
var menuUrl = m.nodeData.menuUrl;
|
|
43
|
+
var menu = menus.find(function (_ref2) {
|
|
44
|
+
var menuUrl = _ref2.menuUrl;
|
|
49
45
|
if (menuUrl.includes('?')) {
|
|
50
46
|
return menuUrl.split('?')[0] === pathname;
|
|
51
47
|
}
|
|
@@ -55,23 +51,11 @@ export default function SinglePage(_ref) {
|
|
|
55
51
|
|
|
56
52
|
// add document title
|
|
57
53
|
setTimeout(function () {
|
|
58
|
-
document.title = "".concat(
|
|
54
|
+
document.title = "".concat((menu === null || menu === void 0 ? void 0 : menu.menuName) || (menu === null || menu === void 0 ? void 0 : menu.menuUrl), " - ").concat(appName);
|
|
59
55
|
}, 10);
|
|
60
|
-
var breadcrumbs = [{
|
|
61
|
-
title: '首页',
|
|
62
|
-
href: '/'
|
|
63
|
-
}].concat(_toConsumableArray(menu.parents.map(function (m) {
|
|
64
|
-
return {
|
|
65
|
-
title: m.name
|
|
66
|
-
};
|
|
67
|
-
})), [{
|
|
68
|
-
title: menu.nodeData.menuName
|
|
69
|
-
}]);
|
|
70
56
|
return {
|
|
71
|
-
auth:
|
|
72
|
-
|
|
73
|
-
})) || [],
|
|
74
|
-
breadcrumbs: breadcrumbs,
|
|
57
|
+
auth: menu.urlAuthList || [],
|
|
58
|
+
breadcrumbs: menu.breadcrumb,
|
|
75
59
|
menu: menu
|
|
76
60
|
};
|
|
77
61
|
}, [pathname, menus]);
|
package/es/pro-grid/index.d.ts
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import { CardProps } from 'antd';
|
|
2
|
-
import {
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { PropsWithCss, PropsWithNodeChildren } from '../ccs';
|
|
3
4
|
import './index.less';
|
|
4
|
-
type
|
|
5
|
-
className?: string;
|
|
6
|
-
style?: CSSProperties;
|
|
7
|
-
};
|
|
8
|
-
type CcsProGridProps = ClassProps & {
|
|
5
|
+
type CcsProGridProps = PropsWithCss & PropsWithNodeChildren & {
|
|
9
6
|
gutter?: number;
|
|
10
|
-
children?: ReactNode;
|
|
11
7
|
};
|
|
12
|
-
type ColProps = CardProps & {
|
|
8
|
+
type ColProps = CardProps & PropsWithNodeChildren & {
|
|
13
9
|
colWidth?: number;
|
|
14
|
-
children?: ReactNode;
|
|
15
10
|
};
|
|
16
11
|
type GridInstance = FC<CcsProGridProps> & {
|
|
17
12
|
Col: typeof GridCol;
|
package/es/pro-table/head.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FormInstance } from 'antd/lib/form';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
|
+
import { PropsWithElementChildren } from '../ccs';
|
|
3
4
|
import { CcsProTableProps } from './table';
|
|
4
|
-
type PropsType<T> = Pick<CcsProTableProps<T>, 'toolbar' | 'formItems' | 'formInitValues' | 'expandForm' | 'title' | 'formItemLabelWidth'> & {
|
|
5
|
+
type PropsType<T> = Pick<CcsProTableProps<T>, 'toolbar' | 'formItems' | 'formInitValues' | 'expandForm' | 'title' | 'formItemLabelWidth'> & PropsWithElementChildren & {
|
|
5
6
|
/** 更多查询条件 */
|
|
6
7
|
hasMore?: boolean;
|
|
7
8
|
form: FormInstance<any>;
|
|
8
|
-
children?: ReactElement;
|
|
9
9
|
/** table 操作栏 */
|
|
10
10
|
tableOperation: ReactElement;
|
|
11
11
|
onSearch: () => void;
|
package/es/pro-table/index.less
CHANGED
|
@@ -37,12 +37,6 @@
|
|
|
37
37
|
// margin: 10px;
|
|
38
38
|
// background: #fff;
|
|
39
39
|
position: relative;
|
|
40
|
-
|
|
41
|
-
&.tradition {
|
|
42
|
-
.ant-table-title {
|
|
43
|
-
border-radius: 0;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
40
|
}
|
|
47
41
|
|
|
48
42
|
&-adaptation {
|
|
@@ -112,27 +106,6 @@
|
|
|
112
106
|
margin-inline-end: 0;
|
|
113
107
|
}
|
|
114
108
|
}
|
|
115
|
-
|
|
116
|
-
&.tradition {
|
|
117
|
-
flex-wrap: wrap;
|
|
118
|
-
|
|
119
|
-
& > .ant-form-inline {
|
|
120
|
-
flex-wrap: wrap;
|
|
121
|
-
justify-content: flex-start;
|
|
122
|
-
gap: 10px;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&.vertical {
|
|
127
|
-
.ant-form-item-row {
|
|
128
|
-
flex-direction: row;
|
|
129
|
-
align-items: center;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.ant-form-item .ant-form-item-control {
|
|
133
|
-
width: auto;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
109
|
}
|
|
137
110
|
|
|
138
111
|
.ant-form-item-control {
|
package/es/pro-table/table.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TableProps } from 'antd';
|
|
2
2
|
import { ColumnGroupType, ColumnType } from 'antd/es/table';
|
|
3
3
|
import { TableSticky } from 'rc-table/lib/interface';
|
|
4
4
|
import React, { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
5
5
|
import CCS from '..';
|
|
6
|
-
import { HttpPageResult, TableColumns } from '../ccs';
|
|
6
|
+
import { HttpPageResult, PropsWithCss, PropsWithNodeChildren, TableColumns } from '../ccs';
|
|
7
7
|
import './index.less';
|
|
8
8
|
type ParamType = Record<string, any>;
|
|
9
9
|
export type ShowDependType = {
|
|
@@ -41,8 +41,7 @@ export type CcsTableProps<T> = Omit<TableProps<T>, 'columns' | 'title'> & {
|
|
|
41
41
|
/** table title */
|
|
42
42
|
title?: ({ selectedRows, data, onClear }: TableTitleType<T>) => ReactNode;
|
|
43
43
|
};
|
|
44
|
-
type
|
|
45
|
-
export type CcsProTableProps<RecordType> = {
|
|
44
|
+
export type CcsProTableProps<RecordType> = Pick<PropsWithCss, 'className'> & PropsWithNodeChildren & {
|
|
46
45
|
/** api权限标识 */
|
|
47
46
|
auth?: string | 'ignore';
|
|
48
47
|
/** 是否初始查询,默认true */
|
|
@@ -51,10 +50,6 @@ export type CcsProTableProps<RecordType> = {
|
|
|
51
50
|
title?: string;
|
|
52
51
|
/** 查询条件集合 */
|
|
53
52
|
formItems?: CCS.TableFormItems;
|
|
54
|
-
/** @deprecated 查询条件布局模式,默认:horizontal */
|
|
55
|
-
formItemLayout?: FormLayout;
|
|
56
|
-
/** @deprecated 查询条件栅格配置,默认:{ xs: 24, sm: 12, md: 8, lg: 8, xl: 6 } */
|
|
57
|
-
formItemCol?: ColProps | ColProps[];
|
|
58
53
|
/** form item label 宽度 */
|
|
59
54
|
formItemLabelWidth?: number | string;
|
|
60
55
|
/** 查询form 初始值 */
|
|
@@ -67,8 +62,11 @@ export type CcsProTableProps<RecordType> = {
|
|
|
67
62
|
expandForm?: boolean;
|
|
68
63
|
/** table 数据区域 */
|
|
69
64
|
table?: CcsTableProps<RecordType>;
|
|
70
|
-
/**
|
|
71
|
-
|
|
65
|
+
/** 语义化styles */
|
|
66
|
+
styles?: {
|
|
67
|
+
root?: CSSProperties;
|
|
68
|
+
table?: CSSProperties;
|
|
69
|
+
};
|
|
72
70
|
/** 父级值字段 */
|
|
73
71
|
parentFieldName?: string;
|
|
74
72
|
/** 水印文字 */
|
|
@@ -77,12 +75,6 @@ export type CcsProTableProps<RecordType> = {
|
|
|
77
75
|
proRef?: CCS.TableInstanceRef<RecordType>;
|
|
78
76
|
/** 显示序号 */
|
|
79
77
|
showNumber?: boolean;
|
|
80
|
-
/** class */
|
|
81
|
-
className?: string;
|
|
82
|
-
/** style */
|
|
83
|
-
style?: CSSProperties;
|
|
84
|
-
/** children */
|
|
85
|
-
children?: ReactNode;
|
|
86
78
|
/** 执行search 后回调函数 */
|
|
87
79
|
searchEvent?: () => void;
|
|
88
80
|
/** 请求前格式化参数 */
|
package/es/pro-table/table.js
CHANGED
|
@@ -25,10 +25,7 @@ import { getAllChildrenId, getDataById, onTableInModalOrDrawer, onTableInTabItem
|
|
|
25
25
|
import HeadComponent from "./head";
|
|
26
26
|
import "./index.less";
|
|
27
27
|
import TableOperation from "./operation";
|
|
28
|
-
import SearchComponent from "./search";
|
|
29
28
|
import TableTree from "./tree";
|
|
30
|
-
|
|
31
|
-
// 同 antd FormLayout; adaptation为自适应布局
|
|
32
29
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
33
30
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
34
31
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -47,15 +44,14 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
47
44
|
var init = props.init,
|
|
48
45
|
auth = props.auth,
|
|
49
46
|
table = props.table,
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
_props$styles = props.styles,
|
|
48
|
+
styles = _props$styles === void 0 ? {} : _props$styles,
|
|
52
49
|
proRef = props.proRef,
|
|
53
50
|
toolbar = props.toolbar,
|
|
54
51
|
children = props.children,
|
|
55
52
|
watermark = props.watermark,
|
|
56
53
|
className = props.className,
|
|
57
54
|
expandForm = props.expandForm,
|
|
58
|
-
tableStyle = props.tableStyle,
|
|
59
55
|
searchEvent = props.searchEvent,
|
|
60
56
|
toolbarExtra = props.toolbarExtra,
|
|
61
57
|
_props$formItems = props.formItems,
|
|
@@ -507,7 +503,7 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
507
503
|
},
|
|
508
504
|
children: toolbarExtra
|
|
509
505
|
});
|
|
510
|
-
var rootStyle =
|
|
506
|
+
var rootStyle = styles.root || {};
|
|
511
507
|
if (table !== null && table !== void 0 && table.bordered) {
|
|
512
508
|
rootStyle = _objectSpread({
|
|
513
509
|
border: "1px solid ".concat(token.colorBorderSecondary),
|
|
@@ -518,30 +514,7 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
518
514
|
className: classNames(classPrefix, className, _defineProperty({}, 'dark-table', isDark)),
|
|
519
515
|
style: rootStyle,
|
|
520
516
|
ref: containerRef,
|
|
521
|
-
children: [!(!formItems.length && !toolbar) && isAuth &&
|
|
522
|
-
form: form,
|
|
523
|
-
title: title,
|
|
524
|
-
titleBordered: table === null || table === void 0 ? void 0 : table.bordered,
|
|
525
|
-
toolbar: newToolbar,
|
|
526
|
-
formItems: formItems,
|
|
527
|
-
expandForm: expandForm,
|
|
528
|
-
formInitValues: formInitValues,
|
|
529
|
-
formItemLabelWidth: props.formItemLabelWidth,
|
|
530
|
-
formItemLayout: props.formItemLayout,
|
|
531
|
-
formItemCol: props.formItemCol,
|
|
532
|
-
onSearch: _onSearch,
|
|
533
|
-
tableOperation: (table === null || table === void 0 ? void 0 : table.isEnableToolbar) !== false ? /*#__PURE__*/_jsx(TableOperation, {
|
|
534
|
-
tableRowSize: tableRowSize,
|
|
535
|
-
columns: columns,
|
|
536
|
-
tableRef: tableRef,
|
|
537
|
-
isInModalOrDrawer: isInModalOrDrawer,
|
|
538
|
-
onReset: _onReset,
|
|
539
|
-
onChangeRowSize: function onChangeRowSize(e) {
|
|
540
|
-
return setTableRowSize(e);
|
|
541
|
-
}
|
|
542
|
-
}) : /*#__PURE__*/_jsx(_Fragment, {}),
|
|
543
|
-
children: newToolbarExtra
|
|
544
|
-
}) : /*#__PURE__*/_jsx(HeadComponent, {
|
|
517
|
+
children: [!(!formItems.length && !toolbar) && isAuth && /*#__PURE__*/_jsx(HeadComponent, {
|
|
545
518
|
form: form,
|
|
546
519
|
toolbar: newToolbar,
|
|
547
520
|
formItems: formItems,
|
|
@@ -561,8 +534,8 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
561
534
|
}) : /*#__PURE__*/_jsx(_Fragment, {}),
|
|
562
535
|
children: newToolbarExtra
|
|
563
536
|
}), /*#__PURE__*/_jsxs("div", {
|
|
564
|
-
className: "".concat(classPrefix, "-table-content
|
|
565
|
-
style:
|
|
537
|
+
className: "".concat(classPrefix, "-table-content"),
|
|
538
|
+
style: styles === null || styles === void 0 ? void 0 : styles.table,
|
|
566
539
|
ref: tableContentRef,
|
|
567
540
|
children: [renderTable(), children]
|
|
568
541
|
})]
|
package/es/trigger/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
2
|
-
import {
|
|
2
|
+
import { PropsWithCss, PropsWithElementChildren } from '../ccs';
|
|
3
3
|
import './index.less';
|
|
4
|
-
export type CcsTriggerProps = {
|
|
4
|
+
export type CcsTriggerProps = PropsWithCss & PropsWithElementChildren & {
|
|
5
5
|
/** 下拉框宽度 */
|
|
6
6
|
width?: number;
|
|
7
7
|
/** 下拉框高度 */
|
|
@@ -16,14 +16,8 @@ export type CcsTriggerProps = {
|
|
|
16
16
|
* @default false
|
|
17
17
|
*/
|
|
18
18
|
disabled?: boolean;
|
|
19
|
-
/** 选择内容 */
|
|
20
|
-
children?: ReactElement;
|
|
21
19
|
/** Form.Item value */
|
|
22
20
|
value?: any;
|
|
23
|
-
/** style */
|
|
24
|
-
style?: CSSProperties;
|
|
25
|
-
/** class */
|
|
26
|
-
className?: string;
|
|
27
21
|
/** input placeholder */
|
|
28
22
|
placeholder?: string;
|
|
29
23
|
/**
|
package/es/upload/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UploadProps } from 'antd';
|
|
2
2
|
import { RecordType } from '../ccs';
|
|
3
3
|
import { ImageUpload } from './upload-image';
|
|
4
|
-
export type CcsUploadProps = Pick<UploadProps, 'maxCount' | 'data' | 'multiple' | 'accept' | '
|
|
4
|
+
export type CcsUploadProps = Pick<UploadProps, 'maxCount' | 'data' | 'multiple' | 'accept' | 'name' | 'headers'> & {
|
|
5
5
|
maxFileSize?: number;
|
|
6
6
|
uploadText?: string;
|
|
7
7
|
onChange?: (value: any) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { PropsWithCss } from '../ccs';
|
|
2
3
|
type Position = {
|
|
3
4
|
left: number;
|
|
4
5
|
top: number;
|
|
@@ -10,7 +11,7 @@ export type RowRendererProps = {
|
|
|
10
11
|
export type VirtualInstance = {
|
|
11
12
|
scrollTop: (top: number) => void;
|
|
12
13
|
};
|
|
13
|
-
export type VirtualListProps = {
|
|
14
|
+
export type VirtualListProps = PropsWithCss & {
|
|
14
15
|
/** 容器高度 */
|
|
15
16
|
height?: number;
|
|
16
17
|
/** 记录条数 */
|
|
@@ -28,8 +29,6 @@ export type VirtualListProps = {
|
|
|
28
29
|
rowCountChangeScrollTop?: boolean;
|
|
29
30
|
/** instance */
|
|
30
31
|
virtualRef?: RefObject<VirtualInstance>;
|
|
31
|
-
style?: CSSProperties;
|
|
32
|
-
className?: string;
|
|
33
32
|
/** 渲染row */
|
|
34
33
|
rowRenderer: ({ rowHeight, index }: RowRendererProps) => ReactNode;
|
|
35
34
|
/** scroll event */
|
package/es/water-mark/index.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import React
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PropsWithCss, PropsWithNodeChildren } from '../ccs';
|
|
3
|
+
export type WaterMarkProps = PropsWithNodeChildren & PropsWithCss & {
|
|
3
4
|
/** 水印文字内容 */
|
|
4
5
|
content?: string;
|
|
5
|
-
/** 类名 */
|
|
6
|
-
className?: string;
|
|
7
|
-
/** 样式 */
|
|
8
|
-
style?: React.CSSProperties;
|
|
9
6
|
/** 水印样式 */
|
|
10
7
|
markStyle?: React.CSSProperties;
|
|
11
8
|
/** 水印类名 */
|
|
@@ -55,10 +52,6 @@ export type WaterMarkProps = {
|
|
|
55
52
|
* @default 16
|
|
56
53
|
*/
|
|
57
54
|
fontSize?: number | string;
|
|
58
|
-
/**
|
|
59
|
-
* 组件 children
|
|
60
|
-
*/
|
|
61
|
-
children?: ReactNode;
|
|
62
55
|
};
|
|
63
56
|
/**
|
|
64
57
|
* 水印组件
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccs-ui/rc-pro",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
|
-
"name": "Hong"
|
|
8
|
-
"url": "https://xz7.gitee.io/rc-pro"
|
|
7
|
+
"name": "Hong"
|
|
9
8
|
},
|
|
10
9
|
"module": "es/index.js",
|
|
11
10
|
"types": "es/index.d.ts",
|
|
@@ -93,7 +92,7 @@
|
|
|
93
92
|
"@types/shortid": "^0.0.29",
|
|
94
93
|
"@umijs/lint": "^4.0.0",
|
|
95
94
|
"ahooks": "^3.7.7",
|
|
96
|
-
"antd": "^5.
|
|
95
|
+
"antd": "^5.22.7",
|
|
97
96
|
"classnames": "^2.3.2",
|
|
98
97
|
"cross-env": "^7.0.3",
|
|
99
98
|
"dayjs": "^1.11.7",
|
|
@@ -120,7 +119,7 @@
|
|
|
120
119
|
"@ant-design/icons": "^5.1.4",
|
|
121
120
|
"@ccs-ui/utils": "^0.0.2",
|
|
122
121
|
"ahooks": "^3.7.7",
|
|
123
|
-
"antd": "^5.
|
|
122
|
+
"antd": "^5.22.0",
|
|
124
123
|
"classnames": "^2.3.2",
|
|
125
124
|
"dayjs": "^1.11.7",
|
|
126
125
|
"rc-menu": "^9.15.1",
|
package/es/hooks/use-global.d.ts
DELETED
package/es/hooks/use-global.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useContext } from 'react';
|
|
2
|
-
import { GlobalContext } from "../context";
|
|
3
|
-
var useGlobal = function useGlobal() {
|
|
4
|
-
var context = useContext(GlobalContext);
|
|
5
|
-
if (context === undefined) {
|
|
6
|
-
throw new Error('GlobalContext not found');
|
|
7
|
-
}
|
|
8
|
-
return context;
|
|
9
|
-
};
|
|
10
|
-
export default useGlobal;
|
package/es/pro-table/search.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from 'antd/lib/form';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
import { CcsProTableProps } from './table';
|
|
4
|
-
type PropsType<T> = Pick<CcsProTableProps<T>, 'toolbar' | 'formItems' | 'formInitValues' | 'expandForm' | 'formItemLabelWidth' | 'formItemLayout' | 'formItemCol' | 'title'> & {
|
|
5
|
-
/** 更多查询条件 */
|
|
6
|
-
hasMore?: boolean;
|
|
7
|
-
/** 标题边框 */
|
|
8
|
-
titleBordered?: boolean;
|
|
9
|
-
form: FormInstance<any>;
|
|
10
|
-
children?: ReactElement;
|
|
11
|
-
/** table 操作栏 */
|
|
12
|
-
tableOperation: ReactElement;
|
|
13
|
-
onSearch: () => void;
|
|
14
|
-
};
|
|
15
|
-
/** 操作按钮、查询,重置、列筛选、 */
|
|
16
|
-
declare function SearchComponent<T>(props: PropsType<T>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export default SearchComponent;
|