@teamix/pro 1.2.28 → 1.2.32
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/dist/pro.css +1 -1
- package/dist/pro.js +368 -252
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/common.scss +22 -0
- package/es/form/Filter/SimpleFilter.js +10 -3
- package/es/form/typing.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/info/components/InfoValueItem/index.js +38 -12
- package/es/info/components/InfoValueItem/index.scss +1 -0
- package/es/info/components/ProInfoItem/index.js +4 -2
- package/es/info/components/ProInfoItem/index.scss +5 -0
- package/es/info/components/baseInfo/index.js +4 -2
- package/es/info/components/headerInfo/index.js +2 -1
- package/es/info/components/tableInfo/index.js +2 -1
- package/es/info/index.scss +2 -0
- package/es/info/typing.d.ts +3 -0
- package/es/table/components/Filter/index.js +6 -6
- package/es/table/components/Layout/index.js +18 -3
- package/es/table/components/ToolBar/Fullscreen.js +7 -11
- package/es/table/index.js +96 -35
- package/es/table/index.scss +4 -0
- package/es/table/typing.d.ts +2 -2
- package/es/table/utils/columnRender.js +1 -1
- package/es/table/utils/index.d.ts +2 -1
- package/es/table/utils/index.js +62 -113
- package/lib/common.scss +22 -0
- package/lib/form/Filter/SimpleFilter.js +8 -1
- package/lib/form/typing.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info/components/InfoValueItem/index.js +38 -12
- package/lib/info/components/InfoValueItem/index.scss +1 -0
- package/lib/info/components/ProInfoItem/index.js +4 -2
- package/lib/info/components/ProInfoItem/index.scss +5 -0
- package/lib/info/components/baseInfo/index.js +4 -2
- package/lib/info/components/headerInfo/index.js +2 -1
- package/lib/info/components/tableInfo/index.js +2 -1
- package/lib/info/index.scss +2 -0
- package/lib/info/typing.d.ts +3 -0
- package/lib/table/components/Filter/index.js +6 -6
- package/lib/table/components/Layout/index.js +18 -3
- package/lib/table/components/ToolBar/Fullscreen.js +7 -11
- package/lib/table/index.js +95 -34
- package/lib/table/index.scss +4 -0
- package/lib/table/typing.d.ts +2 -2
- package/lib/table/utils/columnRender.js +1 -1
- package/lib/table/utils/index.d.ts +2 -1
- package/lib/table/utils/index.js +63 -112
- package/package.json +1 -1
- package/es/form/Components/SelectTable/index.d.ts +0 -24
- package/es/form/Components/SelectTable/index.js +0 -135
- package/es/form/Components/SelectTable/index.scss +0 -28
- package/es/form/Components/SelectTable/table.d.ts +0 -6
- package/es/form/Components/SelectTable/table.js +0 -64
- package/lib/form/Components/SelectTable/index.d.ts +0 -24
- package/lib/form/Components/SelectTable/index.js +0 -157
- package/lib/form/Components/SelectTable/index.scss +0 -28
- package/lib/form/Components/SelectTable/table.d.ts +0 -6
- package/lib/form/Components/SelectTable/table.js +0 -76
package/es/common.scss
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
// 容器滚动条样式
|
2
|
+
@mixin hybridcloud-scrollbar {
|
3
|
+
&::-webkit-scrollbar {
|
4
|
+
width: 12px;
|
5
|
+
height: 12px;
|
6
|
+
}
|
7
|
+
&::-webkit-scrollbar-thumb {
|
8
|
+
border-color: transparent;
|
9
|
+
border-style: solid;
|
10
|
+
border-width: 4px;
|
11
|
+
background-clip: content-box;
|
12
|
+
border-radius: 6px;
|
13
|
+
background-color: var(--scrollbar-thumb-bg);
|
14
|
+
&:hover {
|
15
|
+
border-width: 3px;
|
16
|
+
background-color: var(--scrollbar-thumb-hover-bg);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
&::-webkit-scrollbar-track {
|
20
|
+
background-color: transparent;
|
21
|
+
}
|
22
|
+
}
|
@@ -10,13 +10,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
10
10
|
|
11
11
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
12
12
|
|
13
|
-
import React, { memo, useCallback, useMemo, useRef } from 'react';
|
13
|
+
import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
14
14
|
import cls from 'classnames';
|
15
|
-
import { usePrefixCls } from '@teamix/utils';
|
15
|
+
import { usePrefixCls, isValid } from '@teamix/utils';
|
16
16
|
import ProForm from '../ProForm'; // 初始化Search组件,内置部分属性
|
17
17
|
|
18
18
|
var initializeSearch = function initializeSearch(schema) {
|
19
|
-
var searchName;
|
19
|
+
var searchName = '';
|
20
20
|
var initializedSchema = schema.map(function (item) {
|
21
21
|
if (item.component === 'Search') {
|
22
22
|
searchName = item.name;
|
@@ -85,6 +85,13 @@ var SimpleFilter = /*#__PURE__*/memo(function (props) {
|
|
85
85
|
onChange === null || onChange === void 0 ? void 0 : onChange(values, name, value);
|
86
86
|
}
|
87
87
|
}, [searchName, searchValue.current]);
|
88
|
+
useEffect(function () {
|
89
|
+
var _props$form$initialVa, _props$form$initialVa2;
|
90
|
+
|
91
|
+
// 处理Search组件,缓存input的默认值
|
92
|
+
var searchDefaultValue = (_props$form$initialVa = props.form.initialValues) === null || _props$form$initialVa === void 0 ? void 0 : (_props$form$initialVa2 = _props$form$initialVa[searchName]) === null || _props$form$initialVa2 === void 0 ? void 0 : _props$form$initialVa2[1];
|
93
|
+
searchValue.current = isValid(searchDefaultValue) ? searchDefaultValue : '';
|
94
|
+
}, []);
|
88
95
|
return /*#__PURE__*/React.createElement(ProForm, _objectSpread(_objectSpread({}, otherProps), {}, {
|
89
96
|
className: cls(prefixCls, props.className),
|
90
97
|
schema: simpleSchema,
|
package/es/form/typing.d.ts
CHANGED
@@ -24,7 +24,7 @@ export interface ProFormSchemaItem {
|
|
24
24
|
name?: string;
|
25
25
|
description?: React.ReactNode;
|
26
26
|
title?: string;
|
27
|
-
component?: IBaseComponent | IButtonComponent | IComboComponent | ILayoutComponent |
|
27
|
+
component?: IBaseComponent | IButtonComponent | IComboComponent | ILayoutComponent | any;
|
28
28
|
props?: AnyObject | any;
|
29
29
|
decorator?: string | null;
|
30
30
|
decoratorProps?: AnyObject;
|
package/es/index.d.ts
CHANGED
@@ -24,5 +24,5 @@ export * from './skeleton';
|
|
24
24
|
export * from './table';
|
25
25
|
export * from './utils';
|
26
26
|
export * from './step';
|
27
|
-
declare const version = "1.2.
|
27
|
+
declare const version = "1.2.32";
|
28
28
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProStep, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -30,7 +30,7 @@ export * from './table';
|
|
30
30
|
export * from './utils'; // export * from './sidebar';
|
31
31
|
|
32
32
|
export * from './step';
|
33
|
-
var version = '1.2.
|
33
|
+
var version = '1.2.32';
|
34
34
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
35
35
|
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, // ProSidebar,
|
36
36
|
ProStep, hooks, nocode, templates, utils };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context"];
|
1
|
+
var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context", "props"];
|
2
2
|
|
3
3
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
4
4
|
|
@@ -8,12 +8,6 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
8
8
|
|
9
9
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
10
10
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
12
|
-
|
13
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
|
-
|
15
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
16
|
-
|
17
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
18
12
|
|
19
13
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -26,6 +20,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
26
20
|
|
27
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
28
22
|
|
23
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
24
|
+
|
25
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
26
|
+
|
27
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
28
|
+
|
29
29
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
30
30
|
|
31
31
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
@@ -52,6 +52,7 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
52
52
|
actionRef = props.actionRef,
|
53
53
|
dataSource = props.dataSource,
|
54
54
|
context = props.context,
|
55
|
+
fieldProps = props.props,
|
55
56
|
others = _objectWithoutProperties(props, _excluded);
|
56
57
|
|
57
58
|
var dataIndex = infoItem.dataIndex,
|
@@ -65,7 +66,8 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
65
66
|
_infoItem$successMess = infoItem.successMessage,
|
66
67
|
successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
|
67
68
|
actions = infoItem.actions,
|
68
|
-
extra = infoItem.extra
|
69
|
+
extra = infoItem.extra,
|
70
|
+
valueType = infoItem.valueType; // 获取处理过的 render
|
69
71
|
|
70
72
|
var getRender = function getRender() {
|
71
73
|
var _processRenderFunctio;
|
@@ -77,7 +79,31 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
77
79
|
}
|
78
80
|
|
79
81
|
var newRender = processBuriedPoint((_processRenderFunctio = processRenderFunction(render !== null && render !== void 0 ? render : {}, value, record)) !== null && _processRenderFunctio !== void 0 ? _processRenderFunctio : {}, value, record);
|
82
|
+
|
83
|
+
if (valueType === 'selectGroup') {
|
84
|
+
newRender = _objectSpread(_objectSpread({
|
85
|
+
maxShowNumber: 'auto',
|
86
|
+
foldText: 'more'
|
87
|
+
}, newRender), {}, {
|
88
|
+
ellipsis: false
|
89
|
+
});
|
90
|
+
}
|
91
|
+
|
80
92
|
return newRender;
|
93
|
+
};
|
94
|
+
|
95
|
+
var getFieldProps = function getFieldProps() {
|
96
|
+
if (valueType === 'selectGroup') {
|
97
|
+
return _objectSpread({
|
98
|
+
valueAlias: {
|
99
|
+
value: 'TagValue',
|
100
|
+
key: 'TagKey'
|
101
|
+
},
|
102
|
+
layout: 'compact'
|
103
|
+
}, fieldProps);
|
104
|
+
}
|
105
|
+
|
106
|
+
return fieldProps;
|
81
107
|
}; // 获取处理过的 dataSource
|
82
108
|
|
83
109
|
|
@@ -275,12 +301,12 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
275
301
|
onMouseLeave: function onMouseLeave() {
|
276
302
|
setEditVisible(false);
|
277
303
|
}
|
278
|
-
}, /*#__PURE__*/React.createElement(ProField, _objectSpread({
|
304
|
+
}, /*#__PURE__*/React.createElement(ProField, _objectSpread(_objectSpread({
|
279
305
|
type: type,
|
280
306
|
value: value,
|
281
307
|
render: getRender(),
|
282
308
|
dataSource: getDataSource()
|
283
|
-
}, others)), /*#__PURE__*/React.createElement(PopConfirm, {
|
309
|
+
}, others), getFieldProps())), /*#__PURE__*/React.createElement(PopConfirm, {
|
284
310
|
visible: popConfirmVisible,
|
285
311
|
content: renderContent(),
|
286
312
|
triggerType: "click",
|
@@ -307,12 +333,12 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
307
333
|
|
308
334
|
return /*#__PURE__*/React.createElement("div", {
|
309
335
|
className: cls('item-value')
|
310
|
-
}, /*#__PURE__*/React.createElement(ProField, _objectSpread({
|
336
|
+
}, /*#__PURE__*/React.createElement(ProField, _objectSpread(_objectSpread({
|
311
337
|
type: type,
|
312
338
|
value: value,
|
313
339
|
render: getRender(),
|
314
340
|
dataSource: getDataSource()
|
315
|
-
}, others)), renderAction(), extra && extra);
|
341
|
+
}, others), getFieldProps())), renderAction(), extra && extra);
|
316
342
|
};
|
317
343
|
|
318
344
|
export default InfoValueItem;
|
@@ -37,7 +37,7 @@ var ProInfoItem = function ProInfoItem(prop) {
|
|
37
37
|
className: cls('value')
|
38
38
|
}, loading && /*#__PURE__*/React.createElement("div", {
|
39
39
|
className: cls('base-skeleton-box')
|
40
|
-
}, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading &&
|
40
|
+
}, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading && value)));
|
41
41
|
}
|
42
42
|
|
43
43
|
if (headerInfoLayout) {
|
@@ -45,7 +45,9 @@ var ProInfoItem = function ProInfoItem(prop) {
|
|
45
45
|
labelGutter = _headerInfoLayout$lab === void 0 ? '16px' : _headerInfoLayout$lab;
|
46
46
|
return /*#__PURE__*/React.createElement("div", {
|
47
47
|
className: cls()
|
48
|
-
}, /*#__PURE__*/React.createElement(Row,
|
48
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
49
|
+
className: cls('header-row')
|
50
|
+
}, /*#__PURE__*/React.createElement("div", {
|
49
51
|
className: cls('header-label')
|
50
52
|
}, /*#__PURE__*/React.createElement(LabelIconTip, {
|
51
53
|
label: label,
|
@@ -73,7 +73,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
73
73
|
infoItem: item,
|
74
74
|
record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
|
75
75
|
actionRef: actionRef,
|
76
|
-
context: context
|
76
|
+
context: context,
|
77
|
+
props: item.props
|
77
78
|
}),
|
78
79
|
baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
|
79
80
|
tooltip: item.tooltip,
|
@@ -84,7 +85,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
84
85
|
|
85
86
|
return /*#__PURE__*/React.createElement(React.Fragment, null, (size === null || size === void 0 ? void 0 : size.width) && /*#__PURE__*/React.createElement(Row, {
|
86
87
|
wrap: true,
|
87
|
-
className: "teamix-pro-info-content-row"
|
88
|
+
className: "teamix-pro-info-content-row",
|
89
|
+
gutter: 20
|
88
90
|
}, renderContent()));
|
89
91
|
};
|
90
92
|
|
@@ -50,7 +50,8 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
|
|
50
50
|
dataSource: item.dataSource,
|
51
51
|
infoItem: item,
|
52
52
|
record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
|
53
|
-
actionRef: actionRef
|
53
|
+
actionRef: actionRef,
|
54
|
+
props: item.props
|
54
55
|
}),
|
55
56
|
headerInfoLayout: layout !== null && layout !== void 0 ? layout : defaultLayout,
|
56
57
|
tooltip: item.tooltip,
|
@@ -65,7 +65,8 @@ var ProTableInfo = function ProTableInfo(props) {
|
|
65
65
|
dataSource: item.dataSource,
|
66
66
|
infoItem: item,
|
67
67
|
record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
|
68
|
-
actionRef: actionRef
|
68
|
+
actionRef: actionRef,
|
69
|
+
props: item.props
|
69
70
|
});
|
70
71
|
};
|
71
72
|
|
package/es/info/index.scss
CHANGED
package/es/info/typing.d.ts
CHANGED
@@ -94,6 +94,8 @@ export interface ProInfoColumnsProps {
|
|
94
94
|
actions?: ProActionButtonProps[];
|
95
95
|
/** 追加在列后 */
|
96
96
|
extra?: React.ReactNode;
|
97
|
+
/** 其他 ProField 配置 */
|
98
|
+
props?: any;
|
97
99
|
}
|
98
100
|
export declare type ProInfoActionType = {
|
99
101
|
/** 刷新Info */
|
@@ -168,6 +170,7 @@ export declare type InfoValueItemProps = {
|
|
168
170
|
render?: ProInfoCellRender;
|
169
171
|
dataSource?: ProFieldDataSourceItem[] | ProInfoCellFunProp;
|
170
172
|
context?: object;
|
173
|
+
props?: any;
|
171
174
|
} & Omit<ProFieldProps, 'render' | 'dataSource'>;
|
172
175
|
export declare type ProInfoHeaderProps = Omit<ProCardProps, 'loading'>;
|
173
176
|
/** ProInfoGroupContextProps */
|
@@ -51,10 +51,10 @@ var Filter = function Filter(props) {
|
|
51
51
|
setVisible = _useState4[1];
|
52
52
|
|
53
53
|
useEffect(function () {
|
54
|
-
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current$ge4;
|
54
|
+
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current$ge4, _actionRef$current$ge5;
|
55
55
|
|
56
56
|
// 从全局状态中读取上次存储的条件
|
57
|
-
var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.call(_actionRef$current)
|
57
|
+
var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.call(_actionRef$current)) === null || _actionRef$current$ge3 === void 0 ? void 0 : (_actionRef$current$ge4 = _actionRef$current$ge3.filterRules) === null || _actionRef$current$ge4 === void 0 ? void 0 : (_actionRef$current$ge5 = _actionRef$current$ge4[column.dataIndex]) === null || _actionRef$current$ge5 === void 0 ? void 0 : _actionRef$current$ge5.rules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : [];
|
58
58
|
setSelected(rules);
|
59
59
|
}, []); // 获取过滤项
|
60
60
|
|
@@ -172,7 +172,7 @@ var Filter = function Filter(props) {
|
|
172
172
|
btn: true
|
173
173
|
}),
|
174
174
|
onClick: function onClick() {
|
175
|
-
var _actionRef$current2, _actionRef$current2$f, _actionRef$current$
|
175
|
+
var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge6, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current4$s;
|
176
176
|
|
177
177
|
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.filterDataSource) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2, column.dataIndex); // 先获取此列的param
|
178
178
|
|
@@ -187,7 +187,7 @@ var Filter = function Filter(props) {
|
|
187
187
|
} // 需要带上其他所有的信息
|
188
188
|
|
189
189
|
|
190
|
-
var rules = (_actionRef$current$
|
190
|
+
var rules = (_actionRef$current$ge6 = (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState) === null || _actionRef$current3$g === void 0 ? void 0 : (_actionRef$current3$g2 = _actionRef$current3$g.call(_actionRef$current3)) === null || _actionRef$current3$g2 === void 0 ? void 0 : _actionRef$current3$g2.filterRules) !== null && _actionRef$current$ge6 !== void 0 ? _actionRef$current$ge6 : {}; // 再设置所有的列筛选状态
|
191
191
|
|
192
192
|
(_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFilterRules) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
|
193
193
|
rules: selected,
|
@@ -220,10 +220,10 @@ var Filter = function Filter(props) {
|
|
220
220
|
btn: true
|
221
221
|
}),
|
222
222
|
onClick: function onClick() {
|
223
|
-
var _actionRef$current$
|
223
|
+
var _actionRef$current$ge7, _actionRef$current9, _actionRef$current9$g, _actionRef$current9$g2, _actionRef$current10, _actionRef$current10$, _actionRef$current11, _actionRef$current11$;
|
224
224
|
|
225
225
|
setSelected([]);
|
226
|
-
var rules = (_actionRef$current$
|
226
|
+
var rules = (_actionRef$current$ge7 = (_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : (_actionRef$current9$g = _actionRef$current9.getState) === null || _actionRef$current9$g === void 0 ? void 0 : (_actionRef$current9$g2 = _actionRef$current9$g.call(_actionRef$current9)) === null || _actionRef$current9$g2 === void 0 ? void 0 : _actionRef$current9$g2.filterRules) !== null && _actionRef$current$ge7 !== void 0 ? _actionRef$current$ge7 : {};
|
227
227
|
(_actionRef$current10 = actionRef.current) === null || _actionRef$current10 === void 0 ? void 0 : (_actionRef$current10$ = _actionRef$current10.setFilterRules) === null || _actionRef$current10$ === void 0 ? void 0 : _actionRef$current10$.call(_actionRef$current10, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
|
228
228
|
rules: [],
|
229
229
|
params: ''
|
@@ -60,8 +60,10 @@ var Layout = function Layout(props) {
|
|
60
60
|
|
61
61
|
|
62
62
|
var renderQueryFilter = function renderQueryFilter() {
|
63
|
-
|
64
|
-
|
63
|
+
var _dataFilter$schema;
|
64
|
+
|
65
|
+
if (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) {
|
66
|
+
var _dataFilter$schema2;
|
65
67
|
|
66
68
|
if ( /*#__PURE__*/isValidElement(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.content)) {
|
67
69
|
// 自定义渲染内容
|
@@ -89,7 +91,7 @@ var Layout = function Layout(props) {
|
|
89
91
|
actionRef: actionRef
|
90
92
|
}, otherProps)))
|
91
93
|
}, dataFilter));
|
92
|
-
} else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$
|
94
|
+
} else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) >= 0) {
|
93
95
|
return /*#__PURE__*/React.createElement(QueryFilter, _objectSpread({
|
94
96
|
formRef: dataFilterFormRef,
|
95
97
|
onExpand: function onExpand(expand) {
|
@@ -115,6 +117,19 @@ var Layout = function Layout(props) {
|
|
115
117
|
}, otherProps)))
|
116
118
|
}, dataFilter));
|
117
119
|
}
|
120
|
+
} else if (mainAction) {
|
121
|
+
// 没传 dataFilter 但是传了 mainAction
|
122
|
+
return /*#__PURE__*/React.createElement(QueryFilterLayout, {
|
123
|
+
className: "mb8",
|
124
|
+
addonBefore: renderMainAction(),
|
125
|
+
addonAfter: /*#__PURE__*/React.createElement(React.Fragment, null, extra && !header && /*#__PURE__*/React.createElement(QuickAction, {
|
126
|
+
actionRef: actionRef,
|
127
|
+
quickAction: extra,
|
128
|
+
rowSelection: rowSelection
|
129
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
130
|
+
actionRef: actionRef
|
131
|
+
}, otherProps)))
|
132
|
+
});
|
118
133
|
}
|
119
134
|
}; // 区域组合渲染
|
120
135
|
|
@@ -11,25 +11,21 @@ var FullScreen = function FullScreen(props) {
|
|
11
11
|
normalDataFilterForm = _actionRef$current.normalDataFilterForm,
|
12
12
|
fullscreenDataFilterForm = _actionRef$current.fullscreenDataFilterForm;
|
13
13
|
|
14
|
-
function closeByESC(e) {
|
14
|
+
var closeByESC = function closeByESC(e) {
|
15
15
|
if (visible && e.code === 'Escape') {
|
16
|
-
var _actionRef$current2, _actionRef$current2$
|
16
|
+
var _actionRef$current2, _actionRef$current2$f;
|
17
17
|
|
18
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$
|
19
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$f = _actionRef$current3.fullScreen) === null || _actionRef$current3$f === void 0 ? void 0 : _actionRef$current3$f.call(_actionRef$current3);
|
18
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.fullScreen) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2);
|
20
19
|
}
|
21
|
-
} // 监听esc按钮
|
20
|
+
}; // 监听esc按钮
|
22
21
|
|
23
22
|
|
24
23
|
useEffect(function () {
|
25
|
-
var _actionRef$current4, _actionRef$current4$s;
|
26
|
-
|
27
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFullScreenState) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, visible);
|
28
24
|
window.addEventListener('keydown', closeByESC);
|
29
25
|
return function () {
|
30
26
|
window.removeEventListener('keydown', closeByESC);
|
31
27
|
};
|
32
|
-
}, [visible]);
|
28
|
+
}, [visible, actionRef]);
|
33
29
|
|
34
30
|
var afterClose = function afterClose() {
|
35
31
|
normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.setValues(fullscreenDataFilterForm.values);
|
@@ -67,9 +63,9 @@ var FullScreen = function FullScreen(props) {
|
|
67
63
|
zIndex: 999
|
68
64
|
},
|
69
65
|
onRequestClose: function onRequestClose() {
|
70
|
-
var _actionRef$
|
66
|
+
var _actionRef$current3, _actionRef$current3$f;
|
71
67
|
|
72
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
68
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$f = _actionRef$current3.fullScreen) === null || _actionRef$current3$f === void 0 ? void 0 : _actionRef$current3$f.call(_actionRef$current3);
|
73
69
|
}
|
74
70
|
}, /*#__PURE__*/React.createElement("div", {
|
75
71
|
className: "teamix-pro-table-full-screen"
|