@teamix/pro 1.2.23 → 1.2.28
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/212.js +129 -129
- package/dist/pro.css +1 -1
- package/dist/pro.js +18109 -15665
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +2 -0
- package/es/actions/dialog.js +4 -3
- package/es/actions/index.d.ts +12 -9
- package/es/actions/index.js +56 -15
- package/es/actions/index.scss +12 -1
- package/es/form/Filter/AdvancedFilter.js +1 -1
- package/es/form/Filter/Layout.d.ts +5 -0
- package/es/form/Filter/Layout.js +82 -0
- package/es/form/Filter/SimpleFilter.js +30 -6
- package/es/form/Filter/index2.d.ts +2 -1
- package/es/form/Filter/index2.js +97 -116
- package/es/form/Filter/index2.scss +16 -45
- package/es/form/Filter/layout.scss +36 -0
- package/es/form/Filter/useSpecialProps.d.ts +6 -0
- package/es/form/Filter/useSpecialProps.js +37 -0
- package/es/form/ProForm/customComponent.d.ts +3 -0
- package/es/form/ProForm/customComponent.js +20 -0
- package/es/form/ProForm/index.scss +5 -6
- package/es/form/ProForm/useFormDisplayValues.js +14 -24
- package/es/form/SchemaForm/adapterType.js +1 -0
- package/es/form/SchemaForm/index.js +8 -6
- package/es/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/es/form/SchemaForm/initializeDataSource.js +2 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/es/form/SchemaForm/initializeRequest.js +2 -2
- package/es/form/SchemaForm/initializeRules.d.ts +1 -1
- package/es/form/SchemaForm/initializeRules.js +3 -3
- package/es/form/fieldTypeMap.js +2 -1
- package/es/form/index.d.ts +4 -2
- package/es/form/index.js +4 -2
- package/es/form/typing.d.ts +25 -1
- package/es/form/utils.d.ts +2 -2
- package/es/form/utils.js +2 -2
- package/es/index.d.ts +5 -2
- package/es/index.js +6 -3
- package/es/info/index.scss +1 -1
- package/es/nocode/pages/renderer.js +1 -1
- package/es/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/HozStepItem/index.js +235 -0
- package/es/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/es/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/VerStepItem/index.js +295 -0
- package/es/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/es/step/ProStepItem/index.d.ts +4 -0
- package/es/step/ProStepItem/index.js +57 -0
- package/es/step/index.d.ts +9 -0
- package/es/step/index.js +101 -0
- package/es/step/typing.d.ts +96 -0
- package/es/step/typing.js +1 -0
- package/es/table/components/Filter/index.js +2 -17
- package/es/table/components/Layout/index.js +63 -167
- package/es/table/components/Layout/index.scss +4 -3
- package/es/table/components/Pagination/index.js +2 -2
- package/es/table/components/Pagination/index.scss +5 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/es/table/components/ToolBar/Fullscreen.js +21 -11
- package/es/table/index.js +82 -104
- package/es/table/index.scss +5 -5
- package/es/table/typing.d.ts +16 -10
- package/es/table/utils/columnRender.js +21 -3
- package/es/table/utils/index.d.ts +7 -0
- package/es/table/utils/index.js +36 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/lib/actions/dialog.js +4 -3
- package/lib/actions/index.d.ts +12 -9
- package/lib/actions/index.js +56 -15
- package/lib/actions/index.scss +12 -1
- package/lib/form/Filter/AdvancedFilter.js +1 -1
- package/lib/form/Filter/Layout.d.ts +5 -0
- package/lib/form/Filter/Layout.js +102 -0
- package/lib/form/Filter/SimpleFilter.js +29 -4
- package/lib/form/Filter/index2.d.ts +2 -1
- package/lib/form/Filter/index2.js +101 -114
- package/lib/form/Filter/index2.scss +16 -45
- package/lib/form/Filter/layout.scss +36 -0
- package/lib/form/Filter/useSpecialProps.d.ts +6 -0
- package/lib/form/Filter/useSpecialProps.js +46 -0
- package/lib/form/ProForm/customComponent.d.ts +3 -0
- package/lib/form/ProForm/customComponent.js +28 -0
- package/lib/form/ProForm/index.scss +5 -6
- package/lib/form/ProForm/useFormDisplayValues.js +17 -24
- package/lib/form/SchemaForm/adapterType.js +1 -0
- package/lib/form/SchemaForm/index.js +8 -6
- package/lib/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/lib/form/SchemaForm/initializeDataSource.js +2 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRequest.js +2 -2
- package/lib/form/SchemaForm/initializeRules.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRules.js +3 -3
- package/lib/form/fieldTypeMap.js +2 -1
- package/lib/form/index.d.ts +4 -2
- package/lib/form/index.js +19 -1
- package/lib/form/typing.d.ts +25 -1
- package/lib/form/utils.d.ts +2 -2
- package/lib/form/utils.js +2 -2
- package/lib/index.d.ts +5 -2
- package/lib/index.js +35 -3
- package/lib/info/index.scss +1 -1
- package/lib/nocode/pages/renderer.js +1 -1
- package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.js +258 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.js +315 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/lib/step/ProStepItem/index.d.ts +4 -0
- package/lib/step/ProStepItem/index.js +69 -0
- package/lib/step/index.d.ts +9 -0
- package/lib/step/index.js +124 -0
- package/lib/step/typing.d.ts +96 -0
- package/lib/step/typing.js +5 -0
- package/lib/table/components/Filter/index.js +2 -17
- package/lib/table/components/Layout/index.js +61 -167
- package/lib/table/components/Layout/index.scss +4 -3
- package/lib/table/components/Pagination/index.js +2 -2
- package/lib/table/components/Pagination/index.scss +5 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/lib/table/components/ToolBar/Fullscreen.js +22 -11
- package/lib/table/index.js +78 -101
- package/lib/table/index.scss +5 -5
- package/lib/table/typing.d.ts +16 -10
- package/lib/table/utils/columnRender.js +21 -3
- package/lib/table/utils/index.d.ts +7 -0
- package/lib/table/utils/index.js +38 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +13 -0
- package/package.json +4 -4
@@ -0,0 +1,124 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.ProStep = void 0;
|
9
|
+
Object.defineProperty(exports, "ProStepItem", {
|
10
|
+
enumerable: true,
|
11
|
+
get: function get() {
|
12
|
+
return _ProStepItem.default;
|
13
|
+
}
|
14
|
+
});
|
15
|
+
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
17
|
+
|
18
|
+
var _components = require("@alicloudfe/components");
|
19
|
+
|
20
|
+
var _ProStepItem = _interopRequireDefault(require("./ProStepItem"));
|
21
|
+
|
22
|
+
var _excluded = ["mode", "items", "shape", "children"];
|
23
|
+
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
|
+
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
27
|
+
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
29
|
+
|
30
|
+
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; }
|
31
|
+
|
32
|
+
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; }
|
33
|
+
|
34
|
+
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; }
|
35
|
+
|
36
|
+
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; }
|
37
|
+
|
38
|
+
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; }
|
39
|
+
|
40
|
+
var ProStep = function ProStep(props) {
|
41
|
+
var mode = props.mode,
|
42
|
+
items = props.items,
|
43
|
+
shape = props.shape,
|
44
|
+
children = props.children,
|
45
|
+
others = _objectWithoutProperties(props, _excluded);
|
46
|
+
|
47
|
+
var current = props.current,
|
48
|
+
labelPlacement = props.labelPlacement,
|
49
|
+
readOnly = props.readOnly,
|
50
|
+
animation = props.animation,
|
51
|
+
size = props.size;
|
52
|
+
var fold = props.fold; // 判断渲染组件是不是 ProStepItem, 并返回筛选后的children
|
53
|
+
|
54
|
+
var renderChildren = (0, _react.useMemo)(function () {
|
55
|
+
return _react.default.Children.map(children, function (child, index) {
|
56
|
+
var childElement = child;
|
57
|
+
var displayName = childElement.type.displayName;
|
58
|
+
|
59
|
+
if (displayName === 'ProStepItem') {
|
60
|
+
return /*#__PURE__*/_react.default.cloneElement(childElement, {
|
61
|
+
_size: size,
|
62
|
+
_mode: mode,
|
63
|
+
_index: index,
|
64
|
+
_current: current,
|
65
|
+
_shape: shape
|
66
|
+
});
|
67
|
+
} // 如果不是 ProStepItem
|
68
|
+
|
69
|
+
|
70
|
+
console.error('Warning: ProStep has a child which is not a ProStepItem component');
|
71
|
+
});
|
72
|
+
}, [children]); // 设置circle, 覆盖 dot 阻止重新渲染节点样式
|
73
|
+
|
74
|
+
var shapeMap = function shapeMap() {
|
75
|
+
if (shape === 'arrow') return 'arrow';
|
76
|
+
return 'circle';
|
77
|
+
}; // 渲染 ProStepItem
|
78
|
+
|
79
|
+
|
80
|
+
var renderItem = function renderItem() {
|
81
|
+
// 传递了 item 采用 item 渲染数组的方式
|
82
|
+
if (items) {
|
83
|
+
return items.map(function (item, index) {
|
84
|
+
return /*#__PURE__*/_react.default.createElement(_ProStepItem.default, _objectSpread({
|
85
|
+
key: index,
|
86
|
+
_mode: mode,
|
87
|
+
_shape: shape,
|
88
|
+
_index: index,
|
89
|
+
_current: current,
|
90
|
+
_size: size
|
91
|
+
}, item));
|
92
|
+
});
|
93
|
+
} else {
|
94
|
+
return renderChildren;
|
95
|
+
}
|
96
|
+
}; // 渲染 ProStep
|
97
|
+
|
98
|
+
|
99
|
+
var renderProStep = function renderProStep() {
|
100
|
+
if (mode === 'ver') {
|
101
|
+
return /*#__PURE__*/_react.default.createElement(_components.Timeline, _objectSpread({
|
102
|
+
fold: fold
|
103
|
+
}, others), renderItem());
|
104
|
+
}
|
105
|
+
|
106
|
+
return /*#__PURE__*/_react.default.createElement(_components.Step, _objectSpread({
|
107
|
+
current: current,
|
108
|
+
shape: shapeMap(),
|
109
|
+
labelPlacement: labelPlacement,
|
110
|
+
readOnly: readOnly,
|
111
|
+
animation: animation
|
112
|
+
}, others), renderItem());
|
113
|
+
};
|
114
|
+
|
115
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
116
|
+
className: "teamix-pro-step"
|
117
|
+
}, renderProStep());
|
118
|
+
};
|
119
|
+
|
120
|
+
exports.ProStep = ProStep;
|
121
|
+
ProStep.Item = _ProStepItem.default;
|
122
|
+
ProStep.defaultProps = {
|
123
|
+
mode: 'hoz'
|
124
|
+
};
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import { ItemProps as StepItemProps } from '@alicloudfe/components/types/step';
|
2
|
+
import { ItemProps as TimeLineItemProps } from '@alicloudfe/components/types/timeline';
|
3
|
+
import { ReactNode } from 'react';
|
4
|
+
import { ProTagItem } from '@teamix/utils';
|
5
|
+
export declare type ProStepItemStatus = 'success' | 'fail' | 'process' | 'warning' | 'wait';
|
6
|
+
export declare type ModeStatusFromProStep = {
|
7
|
+
_mode?: string | 'hoz' | 'ver';
|
8
|
+
};
|
9
|
+
export declare type FoldProps = {
|
10
|
+
foldArea: [number, number];
|
11
|
+
foldShow: boolean;
|
12
|
+
};
|
13
|
+
export declare type ProStepProps = HozStepProps | VerTimeLineProps;
|
14
|
+
export declare type ProStepBaseProps = {
|
15
|
+
/** 步骤条:节点展示类型*/
|
16
|
+
shape?: 'icon' | 'arrow' | 'dot' | 'number';
|
17
|
+
/** style */
|
18
|
+
style?: React.CSSProperties;
|
19
|
+
/** className */
|
20
|
+
className?: string;
|
21
|
+
} & React.HTMLAttributes<HTMLElement>;
|
22
|
+
export interface HozStepProps extends ProStepBaseProps {
|
23
|
+
/** 当前组件的展示形式 */
|
24
|
+
mode?: 'hoz';
|
25
|
+
/** 内部渲染自组件 */
|
26
|
+
items?: HozStepItemProps[];
|
27
|
+
/** 步骤条:当前步骤 */
|
28
|
+
current?: number;
|
29
|
+
/** 步骤条: 横向布局时( direction 为 hoz )的内容排列*/
|
30
|
+
labelPlacement?: 'hoz' | 'ver';
|
31
|
+
/** 步骤条: 是否可读模式 */
|
32
|
+
readOnly?: boolean;
|
33
|
+
/** 步骤条: 是否开启动效 */
|
34
|
+
animation?: boolean;
|
35
|
+
/**dot 形态下切换size */
|
36
|
+
size?: 'normal' | 'small';
|
37
|
+
}
|
38
|
+
export interface VerTimeLineProps extends ProStepBaseProps {
|
39
|
+
/** 当前组件的展示形式 */
|
40
|
+
mode?: 'ver';
|
41
|
+
/** 内部渲染自组件 */
|
42
|
+
items?: VerStepItemProps[];
|
43
|
+
/** 时间线: 自定义折叠选项 */
|
44
|
+
fold?: FoldProps[];
|
45
|
+
}
|
46
|
+
export interface ProStepItemBaseProps {
|
47
|
+
/**步骤条:节点展示类型 */
|
48
|
+
_shape?: 'icon' | 'arrow' | 'dot' | 'number';
|
49
|
+
/**节点索引 */
|
50
|
+
_index?: number;
|
51
|
+
/**活跃节点 */
|
52
|
+
_current?: number;
|
53
|
+
/**节点状态 */
|
54
|
+
status?: string | ProStepItemStatus;
|
55
|
+
/**节点设置为 icon 图标 */
|
56
|
+
icon?: string;
|
57
|
+
/**节点的内容 */
|
58
|
+
content?: ReactNode;
|
59
|
+
/**节点标题 */
|
60
|
+
title?: ReactNode;
|
61
|
+
/**自定义渲染 */
|
62
|
+
dotRender?: (index?: number, status?: string) => ReactNode;
|
63
|
+
/**点击事件 */
|
64
|
+
onClick?: (index: number) => void;
|
65
|
+
/**百分比展示 */
|
66
|
+
percent?: number;
|
67
|
+
/**是否禁用当前节点 */
|
68
|
+
disabled?: boolean;
|
69
|
+
}
|
70
|
+
export interface HozStepItemProps extends ProStepItemBaseProps {
|
71
|
+
/**dot 形态下切换size */
|
72
|
+
_size?: 'normal' | 'small';
|
73
|
+
}
|
74
|
+
export interface VerStepItemProps extends ProStepItemBaseProps {
|
75
|
+
/**节点副标题,在 timeline 可以展示格式化后的时间 */
|
76
|
+
subTitle?: ReactNode;
|
77
|
+
/**节点对应描述 */
|
78
|
+
discription?: ReactNode;
|
79
|
+
/**节点的 tag */
|
80
|
+
tags?: ProTagItem[] | ReactNode;
|
81
|
+
/**左侧展示内容 */
|
82
|
+
timeLeft?: ReactNode;
|
83
|
+
/**头像 */
|
84
|
+
image?: string | ReactNode;
|
85
|
+
/**是否需要 animation 动画 */
|
86
|
+
animation?: boolean;
|
87
|
+
/**卡片是否可折叠 */
|
88
|
+
collapsible?: boolean;
|
89
|
+
/**默认是否折叠,用于非受控模式 */
|
90
|
+
defaultCollapsed?: boolean;
|
91
|
+
/**是否折叠,受控模式 */
|
92
|
+
collapsed?: boolean;
|
93
|
+
/**折叠状态改变的回调函数 */
|
94
|
+
onCollapse?: (collapsed: boolean) => void;
|
95
|
+
}
|
96
|
+
export declare type ProStepItemProps = (HozStepItemProps | VerStepItemProps) & React.HTMLAttributes<HTMLElement> & StepItemProps & TimeLineItemProps;
|
@@ -169,8 +169,6 @@ var Filter = function Filter(props) {
|
|
169
169
|
setVisible(!visible);
|
170
170
|
}
|
171
171
|
}),
|
172
|
-
//@ts-ignore
|
173
|
-
v2: true,
|
174
172
|
triggerType: ['click'],
|
175
173
|
align: "tl bl",
|
176
174
|
visible: visible,
|
@@ -208,20 +206,7 @@ var Filter = function Filter(props) {
|
|
208
206
|
} // 需要带上其他所有的信息
|
209
207
|
|
210
208
|
|
211
|
-
var rules = (_actionRef$current$ge5 = (_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$ge5 !== void 0 ? _actionRef$current$ge5 : {};
|
212
|
-
var params = Object.fromEntries([].concat(_toConsumableArray(Object.entries(rules).map(function (_ref5) {
|
213
|
-
var _ref6 = _slicedToArray(_ref5, 2),
|
214
|
-
k = _ref6[0],
|
215
|
-
v = _ref6[1];
|
216
|
-
|
217
|
-
if (v) {
|
218
|
-
return [k, v.params];
|
219
|
-
}
|
220
|
-
|
221
|
-
return null;
|
222
|
-
})), [[column.dataIndex, param]]).filter(function (item) {
|
223
|
-
return item && (item === null || item === void 0 ? void 0 : item[1]);
|
224
|
-
})); // 再设置所有的列筛选状态
|
209
|
+
var rules = (_actionRef$current$ge5 = (_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$ge5 !== void 0 ? _actionRef$current$ge5 : {}; // 再设置所有的列筛选状态
|
225
210
|
|
226
211
|
(_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, {
|
227
212
|
rules: selected,
|
@@ -239,7 +224,7 @@ var Filter = function Filter(props) {
|
|
239
224
|
} // 发送请求
|
240
225
|
|
241
226
|
|
242
|
-
(_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$r = _actionRef$current6.request) === null || _actionRef$current6$r === void 0 ? void 0 : _actionRef$current6$r.call(_actionRef$current6,
|
227
|
+
(_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$r = _actionRef$current6.request) === null || _actionRef$current6$r === void 0 ? void 0 : _actionRef$current6$r.call(_actionRef$current6, _defineProperty({}, targetPageKey, 1));
|
243
228
|
(_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$r = _actionRef$current7.resetPage) === null || _actionRef$current7$r === void 0 ? void 0 : _actionRef$current7$r.call(_actionRef$current7); // 清空表格选择
|
244
229
|
|
245
230
|
(_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
|
@@ -9,10 +9,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
10
10
|
var _utils = require("@teamix/utils");
|
11
11
|
|
12
|
-
var _components = require("@alicloudfe/components");
|
13
|
-
|
14
|
-
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
15
|
-
|
16
12
|
var _actions = require("../../../actions");
|
17
13
|
|
18
14
|
var _form = require("../../../form");
|
@@ -21,11 +17,9 @@ var _ToolBar = _interopRequireDefault(require("../ToolBar"));
|
|
21
17
|
|
22
18
|
var _QuickAction = _interopRequireDefault(require("../QuickAction"));
|
23
19
|
|
24
|
-
var _lodash = _interopRequireDefault(require("lodash.isempty"));
|
25
|
-
|
26
20
|
require("./index.scss");
|
27
21
|
|
28
|
-
var _excluded = ["header", "mainAction", "extra", "actionRef", "dataFilter", "
|
22
|
+
var _excluded = ["header", "mainAction", "extra", "actionRef", "dataFilter", "dataFilterFormRef", "rowSelection"];
|
29
23
|
|
30
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
31
25
|
|
@@ -41,24 +35,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
41
35
|
|
42
36
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
43
37
|
|
44
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
45
|
-
|
46
|
-
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."); }
|
47
|
-
|
48
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
49
|
-
|
50
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
51
|
-
|
52
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
53
|
-
|
54
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
55
|
-
|
56
38
|
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; }
|
57
39
|
|
58
40
|
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; }
|
59
41
|
|
60
42
|
var cls = (0, _utils.baseClass)('teamix-pro-table-layout');
|
61
|
-
var toJS = _form.formilyReactive.toJS;
|
62
43
|
|
63
44
|
var Layout = function Layout(props) {
|
64
45
|
var header = props.header,
|
@@ -66,27 +47,10 @@ var Layout = function Layout(props) {
|
|
66
47
|
extra = props.extra,
|
67
48
|
actionRef = props.actionRef,
|
68
49
|
dataFilter = props.dataFilter,
|
69
|
-
|
50
|
+
dataFilterFormRef = props.dataFilterFormRef,
|
70
51
|
rowSelection = props.rowSelection,
|
71
|
-
otherProps = _objectWithoutProperties(props, _excluded);
|
72
|
-
|
73
|
-
var mode = dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.mode;
|
74
|
-
|
75
|
-
var _useState = (0, _react.useState)((dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand) || false),
|
76
|
-
_useState2 = _slicedToArray(_useState, 2),
|
77
|
-
expand = _useState2[0],
|
78
|
-
setExpand = _useState2[1];
|
52
|
+
otherProps = _objectWithoutProperties(props, _excluded); // 渲染主操作区
|
79
53
|
|
80
|
-
var _useState3 = (0, _react.useState)(false),
|
81
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
82
|
-
hasDot = _useState4[0],
|
83
|
-
setHasDot = _useState4[1];
|
84
|
-
|
85
|
-
(0, _react.useEffect)(function () {
|
86
|
-
if (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand) {
|
87
|
-
setExpand(dataFilter.expand);
|
88
|
-
}
|
89
|
-
}, [dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand]); // 渲染主操作区
|
90
54
|
|
91
55
|
var renderMainAction = function renderMainAction() {
|
92
56
|
var _mainAction$actions;
|
@@ -112,96 +76,66 @@ var Layout = function Layout(props) {
|
|
112
76
|
context: _objectSpread(_objectSpread({}, defaultContext), mainAction.context)
|
113
77
|
})));
|
114
78
|
} else return mainAction;
|
115
|
-
}; //
|
116
|
-
|
79
|
+
}; // 渲染新版 QueryFilter
|
117
80
|
|
118
|
-
var renderInlineFilter = function renderInlineFilter() {
|
119
|
-
var _dataFilter$schema;
|
120
81
|
|
121
|
-
|
122
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
123
|
-
className: cls('inline-filter')
|
124
|
-
}, /*#__PURE__*/_react.default.createElement(_form.SimpleFilter, _objectSpread({
|
125
|
-
form: dataFilterForm
|
126
|
-
}, dataFilter)));
|
127
|
-
}
|
128
|
-
}; // 渲染 mode='panel' 数据过滤区
|
129
|
-
|
130
|
-
|
131
|
-
var renderPanelFilter = function renderPanelFilter() {
|
82
|
+
var renderQueryFilter = function renderQueryFilter() {
|
132
83
|
if (dataFilter) {
|
133
|
-
var _dataFilter$
|
84
|
+
var _dataFilter$schema;
|
134
85
|
|
135
86
|
if ( /*#__PURE__*/(0, _react.isValidElement)(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.content)) {
|
136
|
-
//
|
137
|
-
return /*#__PURE__*/_react.default.createElement(
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
87
|
+
// 自定义渲染内容
|
88
|
+
return /*#__PURE__*/_react.default.createElement(_form.QueryFilterLayout, _objectSpread({
|
89
|
+
onExpand: function onExpand(expand) {
|
90
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
91
|
+
setTimeout(function () {
|
92
|
+
var _actionRef$current, _actionRef$current$ge;
|
93
|
+
|
94
|
+
if ((_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge = _actionRef$current.getState) === null || _actionRef$current$ge === void 0 ? void 0 : _actionRef$current$ge.call(_actionRef$current).fullScreenState) {
|
95
|
+
var _actionRef$current2, _actionRef$current2$r;
|
96
|
+
|
97
|
+
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$r = _actionRef$current2.resetTableMaxBodyHeight) === null || _actionRef$current2$r === void 0 ? void 0 : _actionRef$current2$r.call(_actionRef$current2);
|
98
|
+
}
|
99
|
+
});
|
100
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
101
|
+
},
|
102
|
+
panelContent: dataFilter.content,
|
103
|
+
addonBefore: renderMainAction(),
|
104
|
+
addonAfter: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
105
|
+
actionRef: actionRef,
|
106
|
+
quickAction: extra,
|
107
|
+
rowSelection: rowSelection
|
108
|
+
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
109
|
+
actionRef: actionRef
|
110
|
+
}, otherProps)))
|
111
|
+
}, dataFilter));
|
112
|
+
} else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) >= 0) {
|
113
|
+
return /*#__PURE__*/_react.default.createElement(_form.QueryFilter, _objectSpread({
|
114
|
+
formRef: dataFilterFormRef,
|
115
|
+
onExpand: function onExpand(expand) {
|
116
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
117
|
+
setTimeout(function () {
|
118
|
+
var _actionRef$current3, _actionRef$current3$g;
|
119
|
+
|
120
|
+
if ((_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$g.call(_actionRef$current3).fullScreenState) {
|
121
|
+
var _actionRef$current4, _actionRef$current4$r;
|
122
|
+
|
123
|
+
(_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$r = _actionRef$current4.resetTableMaxBodyHeight) === null || _actionRef$current4$r === void 0 ? void 0 : _actionRef$current4$r.call(_actionRef$current4);
|
124
|
+
}
|
125
|
+
});
|
126
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
127
|
+
},
|
128
|
+
addonBefore: renderMainAction(),
|
129
|
+
addonAfter: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
130
|
+
actionRef: actionRef,
|
131
|
+
quickAction: extra,
|
132
|
+
rowSelection: rowSelection
|
133
|
+
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
134
|
+
actionRef: actionRef
|
135
|
+
}, otherProps)))
|
136
|
+
}, dataFilter));
|
152
137
|
}
|
153
138
|
}
|
154
|
-
}; // 渲染过滤器按钮
|
155
|
-
|
156
|
-
|
157
|
-
var renderFilterBtn = function renderFilterBtn() {
|
158
|
-
var handleBtnClick = function handleBtnClick() {
|
159
|
-
setExpand(!expand);
|
160
|
-
var filterValues = Object.values(toJS(dataFilterForm === null || dataFilterForm === void 0 ? void 0 : dataFilterForm.values)).filter(function (v) {
|
161
|
-
return !(0, _lodash.default)(v);
|
162
|
-
}); // console.log('filterValues', filterValues);
|
163
|
-
|
164
|
-
if (filterValues && (filterValues === null || filterValues === void 0 ? void 0 : filterValues.length) > 0) {
|
165
|
-
setHasDot(true);
|
166
|
-
} else {
|
167
|
-
setHasDot(false);
|
168
|
-
} // 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
169
|
-
|
170
|
-
|
171
|
-
setTimeout(function () {
|
172
|
-
var _actionRef$current, _actionRef$current$ge;
|
173
|
-
|
174
|
-
if ((_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge = _actionRef$current.getState) === null || _actionRef$current$ge === void 0 ? void 0 : _actionRef$current$ge.call(_actionRef$current).fullScreenState) {
|
175
|
-
var _actionRef$current2, _actionRef$current2$r;
|
176
|
-
|
177
|
-
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$r = _actionRef$current2.resetTableMaxBodyHeight) === null || _actionRef$current2$r === void 0 ? void 0 : _actionRef$current2$r.call(_actionRef$current2);
|
178
|
-
}
|
179
|
-
});
|
180
|
-
};
|
181
|
-
|
182
|
-
if (mode === 'panel') {
|
183
|
-
if (expand === false && hasDot) {
|
184
|
-
return /*#__PURE__*/_react.default.createElement(_components.Badge, {
|
185
|
-
dot: true,
|
186
|
-
className: cls('filter-btn')
|
187
|
-
}, /*#__PURE__*/_react.default.createElement(_components.Button, {
|
188
|
-
onClick: handleBtnClick,
|
189
|
-
style: {
|
190
|
-
minWidth: 'unset'
|
191
|
-
}
|
192
|
-
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
193
|
-
type: expand ? 'up-line' : 'filter-line'
|
194
|
-
}), (0, _utils.getMessage)('filter')));
|
195
|
-
} else return /*#__PURE__*/_react.default.createElement(_components.Button, {
|
196
|
-
onClick: handleBtnClick,
|
197
|
-
className: cls('filter-btn'),
|
198
|
-
style: {
|
199
|
-
minWidth: 'unset'
|
200
|
-
}
|
201
|
-
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
202
|
-
type: expand ? 'up-line' : 'filter-line'
|
203
|
-
}), (0, _utils.getMessage)('filter'));
|
204
|
-
}
|
205
139
|
}; // 区域组合渲染
|
206
140
|
|
207
141
|
|
@@ -217,61 +151,21 @@ var Layout = function Layout(props) {
|
|
217
151
|
actionRef: actionRef,
|
218
152
|
quickAction: extra,
|
219
153
|
rowSelection: rowSelection
|
220
|
-
}))),
|
221
|
-
className: cls('wrapper')
|
222
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
223
|
-
className: cls('left')
|
224
|
-
}, mainAction && renderMainAction(), mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/_react.default.createElement("div", {
|
225
|
-
className: cls('right')
|
226
|
-
}, /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
227
|
-
actionRef: actionRef
|
228
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
154
|
+
}))), renderQueryFilter());
|
229
155
|
} else if (header && !mainAction) {
|
230
156
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
231
157
|
className: cls('wrapper')
|
232
158
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
233
159
|
className: cls('left')
|
234
|
-
}, header && /*#__PURE__*/_react.default.createElement(_utils.Header, _objectSpread({}, header)),
|
235
|
-
className: cls('right')
|
236
|
-
}, extra && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
237
|
-
actionRef: actionRef,
|
238
|
-
quickAction: extra,
|
239
|
-
rowSelection: rowSelection
|
240
|
-
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
241
|
-
actionRef: actionRef
|
242
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
160
|
+
}, header && /*#__PURE__*/_react.default.createElement(_utils.Header, _objectSpread({}, header)), renderQueryFilter())));
|
243
161
|
} else if (!header && mainAction) {
|
244
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
245
|
-
className: cls('wrapper')
|
246
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
247
|
-
className: cls('left')
|
248
|
-
}, mainAction && renderMainAction(), mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/_react.default.createElement("div", {
|
249
|
-
className: cls('right')
|
250
|
-
}, extra && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
251
|
-
actionRef: actionRef,
|
252
|
-
quickAction: extra,
|
253
|
-
rowSelection: rowSelection
|
254
|
-
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
255
|
-
actionRef: actionRef
|
256
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
162
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderQueryFilter());
|
257
163
|
} else if (!header && !mainAction) {
|
258
|
-
if (!
|
164
|
+
if (!dataFilterFormRef && !extra) {
|
259
165
|
return null;
|
260
166
|
}
|
261
167
|
|
262
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
263
|
-
className: cls('wrapper')
|
264
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
265
|
-
className: cls('left')
|
266
|
-
}, mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/_react.default.createElement("div", {
|
267
|
-
className: cls('right')
|
268
|
-
}, extra && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
269
|
-
actionRef: actionRef,
|
270
|
-
quickAction: extra,
|
271
|
-
rowSelection: rowSelection
|
272
|
-
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
273
|
-
actionRef: actionRef
|
274
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
168
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderQueryFilter());
|
275
169
|
}
|
276
170
|
};
|
277
171
|
|
@@ -9,9 +9,10 @@ $prefix: 'teamix-pro-table-layout';
|
|
9
9
|
display: flex;
|
10
10
|
justify-content: space-between;
|
11
11
|
margin-bottom: 8px;
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
// margin-bottom: 8px;
|
13
|
+
// &:not(:first-child) {
|
14
|
+
// margin-top: 8px;
|
15
|
+
// }
|
15
16
|
}
|
16
17
|
&-left {
|
17
18
|
display: flex;
|
@@ -17,7 +17,7 @@ var _hooks = require("@teamix/hooks");
|
|
17
17
|
|
18
18
|
require("./index.scss");
|
19
19
|
|
20
|
-
var _excluded = ["className", "onChange", "total", "totalRender", "pageSize", "current", "pageSizeList", "pageSizeSelector", "
|
20
|
+
var _excluded = ["className", "onChange", "total", "totalRender", "pageSize", "current", "pageSizeList", "pageSizeSelector", "onPageSizeChange", "responsivePaginationType"];
|
21
21
|
|
22
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
23
23
|
|
@@ -56,7 +56,6 @@ var _default = function _default(props) {
|
|
56
56
|
current = props.current,
|
57
57
|
pageSizeList = props.pageSizeList,
|
58
58
|
pageSizeSelector = props.pageSizeSelector,
|
59
|
-
type = props.type,
|
60
59
|
onPageSizeChange = props.onPageSizeChange,
|
61
60
|
responsivePaginationType = props.responsivePaginationType,
|
62
61
|
otherProps = _objectWithoutProperties(props, _excluded);
|
@@ -80,6 +79,7 @@ var _default = function _default(props) {
|
|
80
79
|
onChange: propsOnChange,
|
81
80
|
total: total,
|
82
81
|
pageSize: pageSize,
|
82
|
+
current: current,
|
83
83
|
shape: 'arrow-only',
|
84
84
|
pageSizeList: pageSizeList,
|
85
85
|
pageSizeSelector: pageSizeSelector,
|
@@ -44,17 +44,11 @@ var FullScreenIcon = function FullScreenIcon(props) {
|
|
44
44
|
|
45
45
|
var _useState = (0, _react.useState)(false),
|
46
46
|
_useState2 = _slicedToArray(_useState, 2),
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
var _useState3 = (0, _react.useState)(false),
|
51
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
52
|
-
fullscreen = _useState4[0],
|
53
|
-
setFullscreen = _useState4[1]; // 点击全屏
|
47
|
+
fullscreen = _useState2[0],
|
48
|
+
setFullscreen = _useState2[1]; // 点击全屏
|
54
49
|
|
55
50
|
|
56
51
|
var allScreenHandle = function allScreenHandle() {
|
57
|
-
setVisible(false);
|
58
52
|
setTimeout(function () {
|
59
53
|
var _actionRef$current, _actionRef$current$fu;
|
60
54
|
|
@@ -72,7 +66,8 @@ var FullScreenIcon = function FullScreenIcon(props) {
|
|
72
66
|
}, []); // 监听全屏变化
|
73
67
|
|
74
68
|
(_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$o = _actionRef$current3.on) === null || _actionRef$current3$o === void 0 ? void 0 : _actionRef$current3$o.call(_actionRef$current3, function (state) {
|
75
|
-
|
69
|
+
// console.log('dataFilterForm', actionRef.current?.dataFilterForm);
|
70
|
+
setFullscreen(state); // actionRef.current?.dataFilterForm?.setValues(formValues);
|
76
71
|
}, 'fullScreenState', 'fullscreenIcon');
|
77
72
|
return /*#__PURE__*/_react.default.createElement(_components.Button, {
|
78
73
|
iconSize: "small",
|