@zat-design/sisyphus-react 4.0.0-beta.6 → 4.0.0-beta.8
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/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProAction/index.js +3 -6
- package/es/ProConfigProvider/index.js +2 -3
- package/es/ProDownload/index.js +2 -3
- package/es/ProDownload/utils.js +3 -4
- package/es/ProDrawerForm/components/ProDrawer/index.js +5 -10
- package/es/ProDrawerForm/components/ProModal/index.js +5 -10
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +6 -13
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +3 -6
- package/es/ProEditTable/components/RcTable/DraggableTable.js +2 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +5 -8
- package/es/ProEditTable/components/RenderField/index.js +48 -14
- package/es/ProEditTable/components/RenderToolbar/index.js +2 -3
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +16 -19
- package/es/ProEditTable/propsType.d.ts +6 -0
- package/es/ProEditTable/utils/config.js +4 -5
- package/es/ProEditTable/utils/index.js +3 -6
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +132 -0
- package/es/ProEnum/index.js +10 -17
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +4 -7
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.js +2 -3
- package/es/ProForm/components/base/Input/index.js +2 -3
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +3 -3
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/TextArea/index.js +2 -3
- package/es/ProForm/components/base/TimePicker/index.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +8 -13
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
- package/es/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +5 -8
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/Group/index.js +3 -4
- package/es/ProForm/components/combination/Group/utils.js +3 -4
- package/es/ProForm/components/combination/ProCascader/index.js +5 -10
- package/es/ProForm/components/combination/ProModalSelect/index.js +9 -22
- package/es/ProForm/components/combination/ProNumberRange/index.js +12 -19
- package/es/ProForm/components/combination/ProRangeLimit/index.js +4 -9
- package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -9
- package/es/ProForm/components/render/ChangedWrapper.js +5 -8
- package/es/ProForm/components/render/ConfirmWrapper.js +3 -4
- package/es/ProForm/components/render/Render.js +12 -19
- package/es/ProForm/components/render/RenderFields.js +2 -1
- package/es/ProForm/index.js +9 -16
- package/es/ProForm/propsType.d.ts +1 -0
- package/es/ProForm/utils/useForm.js +2 -3
- package/es/ProForm/utils/useShouldUpdate.js +1 -2
- package/es/ProIcon/index.js +6 -11
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/es/ProLayout/components/ProCollapse/index.js +5 -10
- package/es/ProLayout/components/ProFooter/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/index.js +16 -25
- package/es/ProLayout/index.js +2 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -14
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProTable/components/FormatColumn/index.js +9 -10
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -3
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -3
- package/es/ProTable/components/RenderColumn/index.js +10 -15
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +3 -6
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +5 -1
- package/es/ProThemeTools/component/ProTools/index.js +12 -19
- package/es/ProThemeTools/index.js +2 -3
- package/es/ProTooltip/index.js +4 -5
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +5 -12
- package/es/ProTree/components/ProTreeSelect/index.js +9 -16
- package/es/ProTree/components/Tree.js +3 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +9 -14
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.js +9 -16
- package/es/ProUpload/components/ButtonRender.js +3 -6
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.js +10 -15
- package/es/ProUpload/components/ImageRender.js +8 -17
- package/es/ProUpload/index.js +3 -4
- package/es/ProViewer/index.js +4 -9
- package/es/ProViewer/propsType.js +3 -0
- package/es/ProWaterMark/index.js +2 -3
- package/es/utils/index.js +13 -1
- package/lib/ProAction/index.js +3 -6
- package/lib/ProConfigProvider/index.js +2 -3
- package/lib/ProDownload/index.js +2 -3
- package/lib/ProDownload/utils.js +3 -4
- package/lib/ProDrawerForm/components/ProDrawer/index.js +5 -10
- package/lib/ProDrawerForm/components/ProModal/index.js +5 -10
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +6 -13
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +3 -6
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +2 -3
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +5 -8
- package/lib/ProEditTable/components/RenderField/index.js +48 -14
- package/lib/ProEditTable/components/RenderToolbar/index.js +2 -3
- package/lib/ProEditTable/components/Summary/index.js +5 -9
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +16 -19
- package/lib/ProEditTable/propsType.d.ts +6 -0
- package/lib/ProEditTable/utils/config.js +4 -5
- package/lib/ProEditTable/utils/index.js +3 -6
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +139 -0
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +4 -7
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.js +2 -3
- package/lib/ProForm/components/base/Input/index.js +2 -3
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +2 -3
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/TextArea/index.js +2 -3
- package/lib/ProForm/components/base/TimePicker/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +8 -13
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +4 -7
- package/lib/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +4 -7
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/Group/index.js +3 -4
- package/lib/ProForm/components/combination/Group/utils.js +3 -4
- package/lib/ProForm/components/combination/ProCascader/index.js +5 -10
- package/lib/ProForm/components/combination/ProModalSelect/index.js +9 -22
- package/lib/ProForm/components/combination/ProNumberRange/index.js +12 -19
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +4 -9
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -9
- package/lib/ProForm/components/render/ChangedWrapper.js +5 -8
- package/lib/ProForm/components/render/ConfirmWrapper.js +3 -4
- package/lib/ProForm/components/render/Render.js +12 -19
- package/lib/ProForm/components/render/RenderFields.js +2 -1
- package/lib/ProForm/index.js +9 -16
- package/lib/ProForm/propsType.d.ts +1 -0
- package/lib/ProForm/utils/useForm.js +2 -3
- package/lib/ProForm/utils/useShouldUpdate.js +1 -2
- package/lib/ProIcon/index.js +6 -11
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/lib/ProLayout/components/ProCollapse/index.js +5 -10
- package/lib/ProLayout/components/ProFooter/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/index.js +15 -24
- package/lib/ProLayout/index.js +2 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -14
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProTable/components/FormatColumn/index.js +9 -10
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -3
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -3
- package/lib/ProTable/components/RenderColumn/index.js +10 -15
- package/lib/ProTable/components/RenderSummary/index.js +4 -6
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +3 -6
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +5 -1
- package/lib/ProThemeTools/component/ProTools/index.js +12 -19
- package/lib/ProThemeTools/index.js +2 -3
- package/lib/ProTooltip/index.js +4 -5
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +5 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +9 -16
- package/lib/ProTree/components/Tree.js +3 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +9 -14
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.js +9 -16
- package/lib/ProUpload/components/ButtonRender.js +3 -6
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.js +10 -15
- package/lib/ProUpload/components/ImageRender.js +8 -17
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProViewer/index.js +4 -9
- package/lib/ProViewer/propsType.js +3 -1
- package/lib/ProWaterMark/index.js +2 -3
- package/lib/utils/index.js +13 -1
- package/package.json +1 -2
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import "antd/es/breadcrumb/style";
|
|
2
|
-
import _Breadcrumb from "antd/es/breadcrumb";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
-
import "antd/es/modal/style";
|
|
5
|
-
import _Modal from "antd/es/modal";
|
|
6
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
|
-
import "antd/es/divider/style";
|
|
8
|
-
import _Divider from "antd/es/divider";
|
|
9
|
-
import "antd/es/tooltip/style";
|
|
10
|
-
import _Tooltip from "antd/es/tooltip";
|
|
11
|
-
import "antd/es/space/style";
|
|
12
|
-
import _Space from "antd/es/space";
|
|
13
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
14
|
-
/* eslint-disable react/no-array-index-key */
|
|
15
4
|
var _excluded = ["width"];
|
|
5
|
+
/* eslint-disable react/no-array-index-key */
|
|
6
|
+
import { Space, Divider, Breadcrumb, Tooltip, Modal } from 'antd';
|
|
16
7
|
import React, { memo, useEffect, useState, useRef } from 'react';
|
|
17
8
|
import { tools } from '@zat-design/utils';
|
|
18
9
|
import classnames from 'classnames';
|
|
@@ -121,7 +112,7 @@ var ProHeader = props => {
|
|
|
121
112
|
var onlyTag = tag && !label && !value;
|
|
122
113
|
var tagRender = parmas => {
|
|
123
114
|
if (Array.isArray(parmas === null || parmas === void 0 ? void 0 : parmas.tag) && parmas !== null && parmas !== void 0 && parmas.tag.length) {
|
|
124
|
-
return /*#__PURE__*/_jsx(
|
|
115
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
125
116
|
size: 4,
|
|
126
117
|
children: parmas.tag.map((tagItem, index) => {
|
|
127
118
|
return /*#__PURE__*/_jsx("div", {
|
|
@@ -139,7 +130,7 @@ var ProHeader = props => {
|
|
|
139
130
|
|
|
140
131
|
/** 单行渲染 */
|
|
141
132
|
var valueRender = parmas => {
|
|
142
|
-
return /*#__PURE__*/_jsxs(
|
|
133
|
+
return /*#__PURE__*/_jsxs(Space, {
|
|
143
134
|
size: 4,
|
|
144
135
|
align: parmas !== null && parmas !== void 0 && parmas.tag ? 'baseline' : 'center',
|
|
145
136
|
children: [parmas !== null && parmas !== void 0 && parmas.link ? /*#__PURE__*/_jsx("a", {
|
|
@@ -183,7 +174,7 @@ var ProHeader = props => {
|
|
|
183
174
|
}, index);
|
|
184
175
|
})
|
|
185
176
|
});
|
|
186
|
-
return /*#__PURE__*/_jsx(
|
|
177
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
187
178
|
placement: "bottomLeft",
|
|
188
179
|
classNames: {
|
|
189
180
|
root: 'pro-header-describe-items-tip'
|
|
@@ -203,7 +194,7 @@ var ProHeader = props => {
|
|
|
203
194
|
style: {
|
|
204
195
|
width
|
|
205
196
|
},
|
|
206
|
-
children: /*#__PURE__*/_jsxs(
|
|
197
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
207
198
|
size: 4,
|
|
208
199
|
children: [label ? /*#__PURE__*/_jsx("span", {
|
|
209
200
|
className: "pro-header-describe-label",
|
|
@@ -285,8 +276,8 @@ var ProHeader = props => {
|
|
|
285
276
|
*/
|
|
286
277
|
var actionsRender = () => {
|
|
287
278
|
if (Array.isArray(actionRender) && actionRender.length) {
|
|
288
|
-
return /*#__PURE__*/_jsx(
|
|
289
|
-
split: /*#__PURE__*/_jsx(
|
|
279
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
280
|
+
split: /*#__PURE__*/_jsx(Divider, {
|
|
290
281
|
type: "vertical"
|
|
291
282
|
}),
|
|
292
283
|
children: actionRender.map((item, index) => {
|
|
@@ -327,7 +318,7 @@ var ProHeader = props => {
|
|
|
327
318
|
tag = item.tag;
|
|
328
319
|
var tagRender = () => {
|
|
329
320
|
if (Array.isArray(tag) && tag.length) {
|
|
330
|
-
return /*#__PURE__*/_jsx(
|
|
321
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
331
322
|
size: 8,
|
|
332
323
|
children: tag.map((tagItem, index) => {
|
|
333
324
|
return /*#__PURE__*/_jsx("div", {
|
|
@@ -353,7 +344,7 @@ var ProHeader = props => {
|
|
|
353
344
|
}
|
|
354
345
|
return {
|
|
355
346
|
key: index,
|
|
356
|
-
title: /*#__PURE__*/_jsxs(
|
|
347
|
+
title: /*#__PURE__*/_jsxs(Space, {
|
|
357
348
|
size: 4,
|
|
358
349
|
children: [value, " ", tagRender()]
|
|
359
350
|
})
|
|
@@ -410,7 +401,7 @@ var ProHeader = props => {
|
|
|
410
401
|
style: {
|
|
411
402
|
width
|
|
412
403
|
},
|
|
413
|
-
children: /*#__PURE__*/_jsxs(
|
|
404
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
414
405
|
size: 4,
|
|
415
406
|
children: [val, " ", tag ? /*#__PURE__*/_jsx("div", {
|
|
416
407
|
className: "pro-header-tag",
|
|
@@ -420,7 +411,7 @@ var ProHeader = props => {
|
|
|
420
411
|
});
|
|
421
412
|
if (type === 'copy') {
|
|
422
413
|
return valRender = /*#__PURE__*/_jsxs(_Fragment, {
|
|
423
|
-
children: [width ? /*#__PURE__*/_jsx(
|
|
414
|
+
children: [width ? /*#__PURE__*/_jsx(Tooltip, {
|
|
424
415
|
title: val,
|
|
425
416
|
children: valRender
|
|
426
417
|
}) : valRender, /*#__PURE__*/_jsx(Copy, {
|
|
@@ -429,7 +420,7 @@ var ProHeader = props => {
|
|
|
429
420
|
});
|
|
430
421
|
}
|
|
431
422
|
if (width) {
|
|
432
|
-
return /*#__PURE__*/_jsx(
|
|
423
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
433
424
|
title: val,
|
|
434
425
|
children: valRender
|
|
435
426
|
});
|
|
@@ -480,7 +471,7 @@ var ProHeader = props => {
|
|
|
480
471
|
var _ref = isConfirmBackModalProps || {},
|
|
481
472
|
width = _ref.width,
|
|
482
473
|
restModalProps = _objectWithoutProperties(_ref, _excluded);
|
|
483
|
-
|
|
474
|
+
Modal.confirm(_objectSpread(_objectSpread({
|
|
484
475
|
title: `${locale.ProHeader.confirmTitle}`,
|
|
485
476
|
okText: `${locale.ProHeader.confirm}`,
|
|
486
477
|
cancelText: `${locale.ProHeader.cancel}`,
|
|
@@ -508,11 +499,11 @@ var ProHeader = props => {
|
|
|
508
499
|
'pro-header-left': true,
|
|
509
500
|
'pro-header-left-space': !backState
|
|
510
501
|
}),
|
|
511
|
-
children: /*#__PURE__*/_jsxs(
|
|
502
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
512
503
|
size: backState ? 4 : 0,
|
|
513
504
|
children: [backState ? /*#__PURE__*/_jsx(ProBackBtn, {
|
|
514
505
|
onBack: onConfirm
|
|
515
|
-
}) : null, /*#__PURE__*/_jsx(
|
|
506
|
+
}) : null, /*#__PURE__*/_jsx(Breadcrumb, {
|
|
516
507
|
separator: ">",
|
|
517
508
|
items: breadcrumbRender()
|
|
518
509
|
}), infoRender()]
|
package/es/ProLayout/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/message/style";
|
|
3
|
-
import _message from "antd/es/message";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import { message } from 'antd';
|
|
5
4
|
import { createContext } from 'react';
|
|
6
5
|
import classNames from 'classnames';
|
|
7
6
|
import { useSetState, useToggle, useDeepCompareEffect } from 'ahooks';
|
|
@@ -69,7 +68,7 @@ var ProLayout = props => {
|
|
|
69
68
|
}, [propsCollapsed]);
|
|
70
69
|
useDeepCompareEffect(() => {
|
|
71
70
|
if (Array.isArray(dataSource) && !dataSource.length) {
|
|
72
|
-
return
|
|
71
|
+
return message.warning('Warning: Missing menu data source, or menu data source is not an array');
|
|
73
72
|
}
|
|
74
73
|
var userData = transformMenus(dataSource, pathPrefix);
|
|
75
74
|
// 确保 menus 始终是一个数组
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "antd/es/tooltip/style";
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
3
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import { Tooltip } from 'antd';
|
|
4
3
|
import { useEffect, useState } from 'react';
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -29,7 +28,7 @@ var AdaptiveTooltip = _ref => {
|
|
|
29
28
|
window.removeEventListener('resize', handleResize);
|
|
30
29
|
};
|
|
31
30
|
}, [children]);
|
|
32
|
-
return /*#__PURE__*/_jsx(
|
|
31
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
33
32
|
placement: placement,
|
|
34
33
|
title: /*#__PURE__*/_jsx("div", {
|
|
35
34
|
onMouseDown: e => e.stopPropagation(),
|
package/es/ProSelect/index.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import "antd/es/space/style";
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
|
-
import "antd/es/input/style";
|
|
4
|
-
import _Input from "antd/es/input";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
|
-
import "antd/es/message/style";
|
|
7
|
-
import _message from "antd/es/message";
|
|
8
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
10
|
-
import "antd/es/select/style";
|
|
11
|
-
import _Select from "antd/es/select";
|
|
12
4
|
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "filterInList", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "getValueProps", "isView"];
|
|
13
5
|
import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
|
|
6
|
+
import { Input, message, Select, Space } from 'antd';
|
|
14
7
|
import React, { useImperativeHandle, useState, forwardRef, isValidElement, useCallback } from 'react';
|
|
15
8
|
import { isFunction, isObject, isString, omit, isNumber } from 'lodash';
|
|
16
9
|
import { useProConfig } from "../ProConfigProvider";
|
|
@@ -21,7 +14,7 @@ import locale from "../locale";
|
|
|
21
14
|
import { getSelectList } from "./utils";
|
|
22
15
|
import "./index.less";
|
|
23
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
var Option =
|
|
17
|
+
var Option = Select.Option;
|
|
25
18
|
export var ProSelect = (props, ref) => {
|
|
26
19
|
var _selectProps$showCode, _useRequest$options3, _locale$ProSelect;
|
|
27
20
|
var _ref = useProConfig('ProSelect') || {},
|
|
@@ -84,7 +77,7 @@ export var ProSelect = (props, ref) => {
|
|
|
84
77
|
msg = res.message,
|
|
85
78
|
data = res.data;
|
|
86
79
|
if (status !== 200) {
|
|
87
|
-
|
|
80
|
+
message.error(msg);
|
|
88
81
|
return;
|
|
89
82
|
}
|
|
90
83
|
setSelectList(data || []);
|
|
@@ -99,7 +92,7 @@ export var ProSelect = (props, ref) => {
|
|
|
99
92
|
msg = _ref3.message,
|
|
100
93
|
data = _ref3.data;
|
|
101
94
|
if (status !== 200) {
|
|
102
|
-
|
|
95
|
+
message.error(msg);
|
|
103
96
|
return;
|
|
104
97
|
}
|
|
105
98
|
return data;
|
|
@@ -168,7 +161,7 @@ export var ProSelect = (props, ref) => {
|
|
|
168
161
|
if (defaultDisableValue) {
|
|
169
162
|
return /*#__PURE__*/_jsx("span", {
|
|
170
163
|
title: defaultDisableValue,
|
|
171
|
-
children: /*#__PURE__*/_jsx(
|
|
164
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
172
165
|
disabled: true,
|
|
173
166
|
defaultValue: defaultDisableValue,
|
|
174
167
|
style: props === null || props === void 0 ? void 0 : props.style
|
|
@@ -209,7 +202,7 @@ export var ProSelect = (props, ref) => {
|
|
|
209
202
|
record.forEach(item => {
|
|
210
203
|
arr.push(props.optionRender(item));
|
|
211
204
|
});
|
|
212
|
-
return /*#__PURE__*/_jsx(
|
|
205
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
213
206
|
direction: "vertical",
|
|
214
207
|
size: 4,
|
|
215
208
|
children: arr.map(item => /*#__PURE__*/_jsx(React.Fragment, {
|
|
@@ -319,7 +312,7 @@ export var ProSelect = (props, ref) => {
|
|
|
319
312
|
return /*#__PURE__*/_jsx("div", {
|
|
320
313
|
style: props.style,
|
|
321
314
|
className: "pro-select",
|
|
322
|
-
children: /*#__PURE__*/_jsx(
|
|
315
|
+
children: /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
|
|
323
316
|
placeholder: locale === null || locale === void 0 || (_locale$ProSelect = locale.ProSelect) === null || _locale$ProSelect === void 0 ? void 0 : _locale$ProSelect.select,
|
|
324
317
|
allowClear: true,
|
|
325
318
|
loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "antd/es/badge/style";
|
|
2
|
-
import _Badge from "antd/es/badge";
|
|
3
1
|
import cn from 'classnames';
|
|
2
|
+
import { Badge } from 'antd';
|
|
4
3
|
import { handleScroll } from "../../utils";
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -101,7 +100,7 @@ export var MenuItem = props => {
|
|
|
101
100
|
className: "pro-step-checked-status",
|
|
102
101
|
children: [isChecked && /*#__PURE__*/_jsx(SuccessSvg, {}), errorNum > 0 && /*#__PURE__*/_jsx("div", {
|
|
103
102
|
className: "pro-step-error-dot",
|
|
104
|
-
children: /*#__PURE__*/_jsx(
|
|
103
|
+
children: /*#__PURE__*/_jsx(Badge, {
|
|
105
104
|
count: errorNum
|
|
106
105
|
})
|
|
107
106
|
})]
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "antd/es/space/style";
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["title", "valueType", "format", "precision", "ellipsis", "code", "copyable", "width", "tooltip", "transform", "prefix", "suffix", "dataIndex", "toolTipProps", "minWidth", "onDiff"];
|
|
@@ -10,6 +8,7 @@ import React, { isValidElement } from 'react';
|
|
|
10
8
|
import dayjs from 'dayjs';
|
|
11
9
|
import classnames from 'classnames';
|
|
12
10
|
import ReactDOM from 'react-dom';
|
|
11
|
+
import { Space } from 'antd';
|
|
13
12
|
import { isEqual, isFunction, isString, isObject, isBoolean } from 'lodash';
|
|
14
13
|
import { tools } from '@zat-design/utils';
|
|
15
14
|
import TooltipTitle from "../TooltipTitle";
|
|
@@ -244,7 +243,7 @@ export var formatColumn = _ref2 => {
|
|
|
244
243
|
children: "-"
|
|
245
244
|
});
|
|
246
245
|
}
|
|
247
|
-
var node = /*#__PURE__*/_jsxs(
|
|
246
|
+
var node = /*#__PURE__*/_jsxs(Space, {
|
|
248
247
|
size: 8,
|
|
249
248
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
|
250
249
|
});
|
|
@@ -278,7 +277,7 @@ export var formatColumn = _ref2 => {
|
|
|
278
277
|
if (isEmpty(originalValue)) {
|
|
279
278
|
originalRenderValue = '-';
|
|
280
279
|
}
|
|
281
|
-
var node = /*#__PURE__*/_jsxs(
|
|
280
|
+
var node = /*#__PURE__*/_jsxs(Space, {
|
|
282
281
|
size: 8,
|
|
283
282
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
|
284
283
|
});
|
|
@@ -343,7 +342,7 @@ export var formatColumn = _ref2 => {
|
|
|
343
342
|
if (!originalValue) {
|
|
344
343
|
originalRenderValue = '-';
|
|
345
344
|
}
|
|
346
|
-
var node = /*#__PURE__*/_jsxs(
|
|
345
|
+
var node = /*#__PURE__*/_jsxs(Space, {
|
|
347
346
|
size: 8,
|
|
348
347
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
|
349
348
|
});
|
|
@@ -394,7 +393,7 @@ export var formatColumn = _ref2 => {
|
|
|
394
393
|
});
|
|
395
394
|
}
|
|
396
395
|
}
|
|
397
|
-
var node = /*#__PURE__*/_jsxs(
|
|
396
|
+
var node = /*#__PURE__*/_jsxs(Space, {
|
|
398
397
|
size: 8,
|
|
399
398
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
|
400
399
|
});
|
|
@@ -422,7 +421,7 @@ export var formatColumn = _ref2 => {
|
|
|
422
421
|
isAddCell = originalResult.isAddCell;
|
|
423
422
|
otherProps.isChanged = isChanged;
|
|
424
423
|
var originalRenderValue = originalValue === 'number' ? originalValue.toFixed(precision) : originalValue;
|
|
425
|
-
var node = /*#__PURE__*/_jsxs(
|
|
424
|
+
var node = /*#__PURE__*/_jsxs(Space, {
|
|
426
425
|
size: 8,
|
|
427
426
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
|
428
427
|
});
|
|
@@ -515,7 +514,7 @@ export var formatColumn = _ref2 => {
|
|
|
515
514
|
} else if (copyable) {
|
|
516
515
|
column.render = (value, record, index) => {
|
|
517
516
|
var isInNewRowFlag = isInNewRow(record);
|
|
518
|
-
return /*#__PURE__*/_jsxs(
|
|
517
|
+
return /*#__PURE__*/_jsxs(Space, {
|
|
519
518
|
size: 8,
|
|
520
519
|
children: [prefixNode(value, record, index), /*#__PURE__*/_jsx(RenderColumn, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
521
520
|
valueType: valueType,
|
|
@@ -547,7 +546,7 @@ export var formatColumn = _ref2 => {
|
|
|
547
546
|
});
|
|
548
547
|
}
|
|
549
548
|
var isInNewRowFlag = isInNewRow(record);
|
|
550
|
-
return /*#__PURE__*/_jsxs(
|
|
549
|
+
return /*#__PURE__*/_jsxs(Space, {
|
|
551
550
|
size: 8,
|
|
552
551
|
children: [prefixNode(value, record, index), /*#__PURE__*/_jsx(RenderColumn, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
553
552
|
valueType: valueType,
|
|
@@ -571,7 +570,7 @@ export var formatColumn = _ref2 => {
|
|
|
571
570
|
originalValue = originalResult.originalValue,
|
|
572
571
|
isAddCell = originalResult.isAddCell;
|
|
573
572
|
otherProps.isChanged = isChanged;
|
|
574
|
-
var node = /*#__PURE__*/_jsxs(
|
|
573
|
+
var node = /*#__PURE__*/_jsxs(Space, {
|
|
575
574
|
size: 8,
|
|
576
575
|
children: [prefixNode(value, record, index), value, suffixNode(value, record, index)]
|
|
577
576
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/table/style";
|
|
3
|
-
import _Table from "antd/es/table";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["dataSource", "tableProps", "draggableProps", "summaryProps", "emptyTextProps"];
|
|
4
|
+
import { Table } from 'antd';
|
|
6
5
|
import { memo } from 'react';
|
|
7
6
|
import { RenderEmptyText, RenderSummary, TableResizable } from "../../../index";
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -23,7 +22,7 @@ var BaseTable = _ref => {
|
|
|
23
22
|
}
|
|
24
23
|
return null;
|
|
25
24
|
};
|
|
26
|
-
return /*#__PURE__*/_jsx(
|
|
25
|
+
return /*#__PURE__*/_jsx(Table, _objectSpread(_objectSpread({
|
|
27
26
|
components: renderComponents(),
|
|
28
27
|
columns: columns,
|
|
29
28
|
locale: {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/table/style";
|
|
3
|
-
import _Table from "antd/es/table";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["dataSource", "tableProps", "draggableProps", "summaryProps", "emptyTextProps"];
|
|
4
|
+
import { Table } from 'antd';
|
|
6
5
|
import { memo } from 'react';
|
|
7
6
|
import DndWrapper, { Row } from "./components/DndWrapper";
|
|
8
7
|
import { RenderEmptyText, RenderSummary } from "../../../index";
|
|
@@ -31,7 +30,7 @@ var DraggableTable = _ref => {
|
|
|
31
30
|
rowKey: rowKey,
|
|
32
31
|
onDragStartGuard: onDragStartGuard,
|
|
33
32
|
onDragEndGuard: onDragEndGuard,
|
|
34
|
-
children: /*#__PURE__*/_jsx(
|
|
33
|
+
children: /*#__PURE__*/_jsx(Table, _objectSpread(_objectSpread({
|
|
35
34
|
className: "pro-edit-table-drag",
|
|
36
35
|
components: {
|
|
37
36
|
body: {
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import "antd/es/space/style";
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
|
-
import "antd/es/tooltip/style";
|
|
4
|
-
import _Tooltip from "antd/es/tooltip";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
|
-
import "antd/es/typography/style";
|
|
8
|
-
import _Typography from "antd/es/typography";
|
|
9
3
|
import { useRef } from 'react';
|
|
4
|
+
import { Tooltip, Typography, Space } from 'antd';
|
|
10
5
|
import { useSetState } from 'ahooks';
|
|
11
6
|
import { isBoolean } from 'lodash';
|
|
12
7
|
import classNames from 'classnames';
|
|
@@ -18,8 +13,8 @@ import copySvg from "../../../assets/copy.svg";
|
|
|
18
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
15
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
|
-
var Paragraph =
|
|
22
|
-
Text =
|
|
16
|
+
var Paragraph = Typography.Paragraph,
|
|
17
|
+
Text = Typography.Text;
|
|
23
18
|
// @ts-ignore
|
|
24
19
|
var RenderColumn = props => {
|
|
25
20
|
var valueType = props.valueType,
|
|
@@ -95,7 +90,7 @@ var RenderColumn = props => {
|
|
|
95
90
|
});
|
|
96
91
|
if ((props === null || props === void 0 ? void 0 : props.isChanged) === false) {
|
|
97
92
|
if (ellipsis) {
|
|
98
|
-
return /*#__PURE__*/_jsx(
|
|
93
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
99
94
|
title: currentValue,
|
|
100
95
|
onOpenChange: open => {
|
|
101
96
|
setState({
|
|
@@ -127,7 +122,7 @@ var RenderColumn = props => {
|
|
|
127
122
|
}
|
|
128
123
|
return !isEmpty(originalValue) ? originalValue : '-';
|
|
129
124
|
};
|
|
130
|
-
return /*#__PURE__*/_jsx(
|
|
125
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
131
126
|
className: cellDiffCls,
|
|
132
127
|
style: {
|
|
133
128
|
width,
|
|
@@ -139,17 +134,17 @@ var RenderColumn = props => {
|
|
|
139
134
|
destroyOnHidden: true,
|
|
140
135
|
placement: "topLeft",
|
|
141
136
|
autoAdjustOverflow: false,
|
|
142
|
-
title: /*#__PURE__*/_jsx(
|
|
137
|
+
title: /*#__PURE__*/_jsx(Space, {
|
|
143
138
|
direction: "vertical",
|
|
144
139
|
className: "changed-tooltip",
|
|
145
140
|
children: props !== null && props !== void 0 && props.isChanged && !(props !== null && props !== void 0 && props.isAddCell) ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
146
|
-
children: [/*#__PURE__*/_jsxs(
|
|
141
|
+
children: [/*#__PURE__*/_jsxs(Space, {
|
|
147
142
|
align: "start",
|
|
148
143
|
className: "original-value-container",
|
|
149
144
|
children: ["\u521D\u59CB\u503C\uFF1A", originalValueCalc()]
|
|
150
|
-
}), /*#__PURE__*/_jsx(
|
|
145
|
+
}), /*#__PURE__*/_jsx(Space, {
|
|
151
146
|
className: "current-value-container",
|
|
152
|
-
children: ellipsis ? /*#__PURE__*/_jsxs(
|
|
147
|
+
children: ellipsis ? /*#__PURE__*/_jsxs(Space, {
|
|
153
148
|
children: ["\u5F53\u524D\u503C\uFF1A", currentValue]
|
|
154
149
|
}) : null
|
|
155
150
|
})]
|
|
@@ -200,7 +195,7 @@ var RenderColumn = props => {
|
|
|
200
195
|
});
|
|
201
196
|
}
|
|
202
197
|
var calculatedWidth = updateCalculatedWidth(textRef.current);
|
|
203
|
-
return /*#__PURE__*/_jsx(
|
|
198
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
204
199
|
title: value,
|
|
205
200
|
destroyOnHidden: true,
|
|
206
201
|
onOpenChange: () => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Table from "antd/es/table";
|
|
1
|
+
import { Table } from 'antd';
|
|
3
2
|
import { get, isObject } from 'lodash';
|
|
4
3
|
import { tools } from '@zat-design/utils';
|
|
5
4
|
import { valueTypeRender } from "../../../ProUtils/utils";
|
|
@@ -18,9 +17,9 @@ var renderSummary = props => {
|
|
|
18
17
|
if (!(dataSource !== null && dataSource !== void 0 && dataSource.length)) {
|
|
19
18
|
return null;
|
|
20
19
|
}
|
|
21
|
-
return isObject(summary) ? /*#__PURE__*/_jsx(
|
|
20
|
+
return isObject(summary) ? /*#__PURE__*/_jsx(Table.Summary, {
|
|
22
21
|
fixed: fixed,
|
|
23
|
-
children: /*#__PURE__*/_jsx(
|
|
22
|
+
children: /*#__PURE__*/_jsx(Table.Summary.Row, {
|
|
24
23
|
children: columns === null || columns === void 0 ? void 0 : columns.map(_ref2 => {
|
|
25
24
|
var key = _ref2.key,
|
|
26
25
|
dataIndex = _ref2.dataIndex,
|
|
@@ -44,7 +43,7 @@ var renderSummary = props => {
|
|
|
44
43
|
}, 0);
|
|
45
44
|
text = format ? format(sum, precision !== null && precision !== void 0 ? precision : 2) : sum;
|
|
46
45
|
}
|
|
47
|
-
return /*#__PURE__*/_jsxs(
|
|
46
|
+
return /*#__PURE__*/_jsxs(Table.Summary.Cell, {
|
|
48
47
|
index: index,
|
|
49
48
|
colSpan: colSpan,
|
|
50
49
|
children: [prefix, text, suffix]
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Button from "antd/es/button";
|
|
1
|
+
import { Button } from 'antd';
|
|
3
2
|
import { ReactSVG } from 'react-svg';
|
|
4
3
|
import { ProTreeModal } from "../../../index";
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -30,7 +29,7 @@ var RenderTableHeader = props => {
|
|
|
30
29
|
children: headerRender ? typeof headerRender === 'function' ? headerRender() : headerRender : null
|
|
31
30
|
}), /*#__PURE__*/_jsxs("div", {
|
|
32
31
|
className: "right-actions",
|
|
33
|
-
children: [resizeColumn && /*#__PURE__*/_jsx(
|
|
32
|
+
children: [resizeColumn && /*#__PURE__*/_jsx(Button, {
|
|
34
33
|
icon: /*#__PURE__*/_jsx(ReactSVG, {
|
|
35
34
|
className: "anticon",
|
|
36
35
|
wrapper: "span",
|
|
@@ -47,7 +46,7 @@ var RenderTableHeader = props => {
|
|
|
47
46
|
value: checkColumns,
|
|
48
47
|
allValue: "all",
|
|
49
48
|
onChange: handleColumnConfig,
|
|
50
|
-
trigger: /*#__PURE__*/_jsx(
|
|
49
|
+
trigger: /*#__PURE__*/_jsx(Button, {
|
|
51
50
|
className: "custom-column-btn",
|
|
52
51
|
icon: /*#__PURE__*/_jsx(ReactSVG, {
|
|
53
52
|
className: "anticon",
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import "antd/es/tabs/style";
|
|
2
|
-
import _Tabs from "antd/es/tabs";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
-
import "antd/es/form/style";
|
|
5
|
-
import _Form from "antd/es/form";
|
|
6
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import { Tabs, Form } from 'antd';
|
|
7
4
|
import { useMemo, useState, useEffect, memo } from 'react';
|
|
8
5
|
import useEnum from "../../../ProEnum/hooks/useEnum";
|
|
9
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -26,7 +23,7 @@ var RenderTabs = props => {
|
|
|
26
23
|
var _useEnum = useEnum(code),
|
|
27
24
|
_useEnum2 = _slicedToArray(_useEnum, 1),
|
|
28
25
|
options = _useEnum2[0];
|
|
29
|
-
var fieldValue =
|
|
26
|
+
var fieldValue = Form.useWatch(name, form);
|
|
30
27
|
|
|
31
28
|
// 使用useMemo计算派生状态
|
|
32
29
|
var tabItems = useMemo(() => {
|
|
@@ -55,7 +52,7 @@ var RenderTabs = props => {
|
|
|
55
52
|
if (!(tabItems !== null && tabItems !== void 0 && tabItems.length)) {
|
|
56
53
|
return null;
|
|
57
54
|
}
|
|
58
|
-
return /*#__PURE__*/_jsx(
|
|
55
|
+
return /*#__PURE__*/_jsx(Tabs, _objectSpread(_objectSpread({
|
|
59
56
|
className: "pro-table-tabs",
|
|
60
57
|
onChange: key => {
|
|
61
58
|
var fieldsValues = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
1
|
+
import { Tooltip } from 'antd';
|
|
3
2
|
import { ReactSVG } from 'react-svg';
|
|
4
3
|
import tipSvg from "../../../assets/tip.svg";
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +11,7 @@ var TooltipTitle = props => {
|
|
|
12
11
|
icon = _ref.icon;
|
|
13
12
|
return /*#__PURE__*/_jsxs("span", {
|
|
14
13
|
className: "pro-table-tooltip",
|
|
15
|
-
children: [title, /*#__PURE__*/_jsx(
|
|
14
|
+
children: [title, /*#__PURE__*/_jsx(Tooltip, {
|
|
16
15
|
title: tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : tooltip,
|
|
17
16
|
children: /*#__PURE__*/_jsx(ReactSVG, {
|
|
18
17
|
className: "icon-tip",
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
-
import "antd/es/message/style";
|
|
4
|
-
import _message from "antd/es/message";
|
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
|
-
import "antd/es/form/style";
|
|
7
|
-
import _Form from "antd/es/form";
|
|
8
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
9
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
10
6
|
var _excluded = ["page", "filters", "sorter"];
|
|
11
7
|
import { useEffect, useMemo, useState } from 'react';
|
|
12
8
|
import { useRequest, useSetState, useDeepCompareEffect, usePrevious } from 'ahooks';
|
|
13
9
|
import { pickBy, isObject, merge, set, isEqual, omit } from 'lodash';
|
|
10
|
+
import { Form, message } from 'antd';
|
|
14
11
|
import { defaultPage } from "../index";
|
|
15
12
|
import { isListResult, removeEmptyKeys, isNonEmptyObject } from "../utils";
|
|
16
13
|
import locale, { formatMessage } from "../../locale";
|
|
@@ -70,7 +67,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
|
70
67
|
transformParams = _useDefaultOptions.transformParams,
|
|
71
68
|
transformResponse = _useDefaultOptions.transformResponse,
|
|
72
69
|
disabled = _useDefaultOptions.disabled;
|
|
73
|
-
var _Form$useForm =
|
|
70
|
+
var _Form$useForm = Form.useForm(_form),
|
|
74
71
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
75
72
|
form = _Form$useForm2[0];
|
|
76
73
|
var _ref = useRequestOptions || {},
|
|
@@ -129,7 +126,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
|
129
126
|
total = _ref2$total === void 0 ? 0 : _ref2$total;
|
|
130
127
|
if (list !== null && !Array.isArray(list)) {
|
|
131
128
|
var _locale$ProTable;
|
|
132
|
-
return
|
|
129
|
+
return message.error(locale === null || locale === void 0 || (_locale$ProTable = locale.ProTable) === null || _locale$ProTable === void 0 ? void 0 : _locale$ProTable.transformResponseMsg);
|
|
133
130
|
}
|
|
134
131
|
setState({
|
|
135
132
|
total,
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Tag from "antd/es/tag";
|
|
3
|
-
import "antd/es/space/style";
|
|
4
|
-
import _Space from "antd/es/space";
|
|
5
|
-
import "antd/es/spin/style";
|
|
6
|
-
import _Spin from "antd/es/spin";
|
|
1
|
+
import { Space, Tag, Spin } from 'antd';
|
|
7
2
|
import { LoadingOutlined } from '@ant-design/icons';
|
|
8
3
|
import { tools } from '@zat-design/utils';
|
|
9
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -23,14 +18,14 @@ var Card = props => {
|
|
|
23
18
|
});
|
|
24
19
|
return /*#__PURE__*/_jsx("div", {
|
|
25
20
|
className: "pro-tabs-card",
|
|
26
|
-
children: mode === 'card' ? /*#__PURE__*/_jsxs(
|
|
21
|
+
children: mode === 'card' ? /*#__PURE__*/_jsxs(Space, {
|
|
27
22
|
size: 8,
|
|
28
23
|
align: size === 'small' ? 'start' : 'center',
|
|
29
24
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
30
25
|
className: "pro-tabs-card-left",
|
|
31
26
|
children: [/*#__PURE__*/_jsx("div", {
|
|
32
27
|
className: "pro-tabs-card-left-total",
|
|
33
|
-
children: loading ? /*#__PURE__*/_jsx(
|
|
28
|
+
children: loading ? /*#__PURE__*/_jsx(Spin, {
|
|
34
29
|
indicator: antIcon
|
|
35
30
|
}) : tools.formatAmount(total, 0) || 0
|
|
36
31
|
}), /*#__PURE__*/_jsx("div", {
|
|
@@ -41,10 +36,10 @@ var Card = props => {
|
|
|
41
36
|
className: "pro-tabs-card-right",
|
|
42
37
|
children: icon || '-'
|
|
43
38
|
})]
|
|
44
|
-
}) : /*#__PURE__*/_jsxs(
|
|
39
|
+
}) : /*#__PURE__*/_jsxs(Space, {
|
|
45
40
|
size: 8,
|
|
46
41
|
align: "center",
|
|
47
|
-
children: [label, /*#__PURE__*/_jsx(
|
|
42
|
+
children: [label, /*#__PURE__*/_jsx(Tag, {
|
|
48
43
|
color: "#FF5050",
|
|
49
44
|
children: total >= 100 ? '99+' : total || 0
|
|
50
45
|
})]
|
package/es/ProTabs/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import "antd/es/tabs/style";
|
|
2
|
-
import _Tabs from "antd/es/tabs";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
4
|
var _excluded = ["style", "className", "dataSource", "onChange", "transformResponse", "useRequest", "tabSearch", "mode"];
|
|
7
5
|
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
|
8
6
|
import React, { useMemo, useState, forwardRef, useImperativeHandle } from 'react';
|
|
7
|
+
import { Tabs } from 'antd';
|
|
9
8
|
import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
|
|
10
9
|
import classNames from 'classnames';
|
|
11
10
|
import { omit } from 'lodash';
|
|
@@ -109,7 +108,7 @@ var ProTabs = (props, ref) => {
|
|
|
109
108
|
return /*#__PURE__*/_jsx("div", {
|
|
110
109
|
style: style,
|
|
111
110
|
className: cls,
|
|
112
|
-
children: /*#__PURE__*/_jsx(
|
|
111
|
+
children: /*#__PURE__*/_jsx(Tabs, _objectSpread(_objectSpread({
|
|
113
112
|
animated: false
|
|
114
113
|
}, rest), {}, {
|
|
115
114
|
items: _items,
|