@zat-design/sisyphus-react 4.0.0-beta.6 → 4.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/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 +4 -5
- 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 +5 -10
- package/es/ProEditTable/utils/config.js +4 -5
- package/es/ProEditTable/utils/index.js +3 -6
- 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/index.js +8 -15
- package/es/ProForm/utils/useForm.js +2 -3
- 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/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/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 +4 -5
- 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 +5 -10
- package/lib/ProEditTable/utils/config.js +4 -5
- package/lib/ProEditTable/utils/index.js +3 -6
- 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/index.js +8 -15
- package/lib/ProForm/utils/useForm.js +2 -3
- 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/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/package.json +1 -1
@@ -1,12 +1,7 @@
|
|
1
|
-
import "antd/es/row/style";
|
2
|
-
import _Row from "antd/es/row";
|
3
|
-
import "antd/es/col/style";
|
4
|
-
import _Col from "antd/es/col";
|
5
|
-
import "antd/es/checkbox/style";
|
6
|
-
import _Checkbox from "antd/es/checkbox";
|
7
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
8
2
|
/* eslint-disable brace-style */
|
9
3
|
import React, { forwardRef, useImperativeHandle, useMemo, useRef } from 'react';
|
4
|
+
import { Checkbox, Col, Row } from 'antd';
|
10
5
|
import { DndContext } from '@dnd-kit/core';
|
11
6
|
import { arrayMove, SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
12
7
|
import { useDeepCompareEffect, useSetState, useVirtualList } from 'ahooks';
|
@@ -173,7 +168,7 @@ function List(props, ref) {
|
|
173
168
|
// 编辑状态
|
174
169
|
if (!isRowCols && mode === 'render') {
|
175
170
|
return /*#__PURE__*/_jsx(_Fragment, {
|
176
|
-
children: /*#__PURE__*/_jsx(
|
171
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
177
172
|
disabled: disabled,
|
178
173
|
style: {
|
179
174
|
width: '100%'
|
@@ -188,7 +183,7 @@ function List(props, ref) {
|
|
188
183
|
},
|
189
184
|
children: /*#__PURE__*/_jsx("div", {
|
190
185
|
ref: wrapperRef,
|
191
|
-
children: /*#__PURE__*/_jsx(
|
186
|
+
children: /*#__PURE__*/_jsx(Row, {
|
192
187
|
children: list.map(_item => {
|
193
188
|
var item = _item.data;
|
194
189
|
var title = handleGetTitle(item);
|
@@ -196,13 +191,13 @@ function List(props, ref) {
|
|
196
191
|
label: title,
|
197
192
|
searchStr: searchStr
|
198
193
|
});
|
199
|
-
return /*#__PURE__*/_jsx(
|
194
|
+
return /*#__PURE__*/_jsx(Col, {
|
200
195
|
span: span || 24,
|
201
196
|
className: !span || span === 24 ? 'pro-tree-modal-checkbox-content' : '',
|
202
197
|
style: {
|
203
198
|
marginBottom: span ? 16 : 12
|
204
199
|
},
|
205
|
-
children: /*#__PURE__*/_jsx(
|
200
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
206
201
|
onChange: e => handleOnChange === null || handleOnChange === void 0 ? void 0 : handleOnChange(e, item[fieldNameValue]),
|
207
202
|
value: item[fieldNameValue],
|
208
203
|
disabled: item.disabled,
|
@@ -220,26 +215,26 @@ function List(props, ref) {
|
|
220
215
|
// 编辑状态
|
221
216
|
if (isRowCols) {
|
222
217
|
return /*#__PURE__*/_jsx(_Fragment, {
|
223
|
-
children: /*#__PURE__*/_jsx(
|
218
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
224
219
|
disabled: disabled,
|
225
220
|
style: {
|
226
221
|
width: '100%'
|
227
222
|
},
|
228
223
|
value: checkedValues,
|
229
|
-
children: /*#__PURE__*/_jsx(
|
224
|
+
children: /*#__PURE__*/_jsx(Row, {
|
230
225
|
children: treeData.map(item => {
|
231
226
|
var title = handleGetTitle(item);
|
232
227
|
var content = optionRender ? optionRender(item, searchStr) : /*#__PURE__*/_jsx(SearchTitle, {
|
233
228
|
label: title,
|
234
229
|
searchStr: searchStr
|
235
230
|
});
|
236
|
-
return /*#__PURE__*/_jsx(
|
231
|
+
return /*#__PURE__*/_jsx(Col, {
|
237
232
|
span: span || 24,
|
238
233
|
className: !span || span === 24 ? 'pro-tree-modal-checkbox-content' : '',
|
239
234
|
style: {
|
240
235
|
marginBottom: span ? 16 : 12
|
241
236
|
},
|
242
|
-
children: /*#__PURE__*/_jsx(
|
237
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
243
238
|
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
244
239
|
value: item[fieldNameValue],
|
245
240
|
disabled: item.disabled,
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import "antd/es/tag/style";
|
2
|
-
import _Tag from "antd/es/tag";
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
4
2
|
import React from 'react';
|
3
|
+
import { Tag } from 'antd';
|
5
4
|
import { useSortable } from '@dnd-kit/sortable';
|
6
5
|
import { CSS } from '@dnd-kit/utilities';
|
7
6
|
import ProIcon from "../../ProIcon";
|
@@ -38,7 +37,7 @@ var SortableItem = props => {
|
|
38
37
|
style: style,
|
39
38
|
className: `checked-item ${item.disabled || disabled ? 'disabled' : ''} ${drag ? 'dragable' : ''}`
|
40
39
|
}, item.disabled ? {} : attributes), {}, {
|
41
|
-
children: /*#__PURE__*/_jsxs(
|
40
|
+
children: /*#__PURE__*/_jsxs(Tag, {
|
42
41
|
closable: true,
|
43
42
|
onClose: e => _onClose(e),
|
44
43
|
children: [drag ? item.disabled || disabled ? /*#__PURE__*/_jsx(ProIcon, {
|
@@ -1,11 +1,10 @@
|
|
1
|
-
import "antd/es/tree/style";
|
2
|
-
import _Tree from "antd/es/tree";
|
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 = ["checkedValues", "disabled", "treeData", "searchStr", "originalTreeData", "showCodeName", "checkStrictly", "flatTreeData", "mode", "fieldNames", "tags", "onCheck", "handleFilterClose", "optionRender"];
|
7
5
|
/* eslint-disable no-plusplus */
|
8
6
|
import React, { forwardRef, useEffect, useMemo, useState } from 'react';
|
7
|
+
import { Tree } from 'antd';
|
9
8
|
import ListComponent from "./List";
|
10
9
|
import SearchTitle from "./SearchTitle";
|
11
10
|
import CloseIcon from "./CloseIcon";
|
@@ -173,7 +172,7 @@ function List(props, ref) {
|
|
173
172
|
setAutoExpandParent(false);
|
174
173
|
};
|
175
174
|
if (mode === 'render') {
|
176
|
-
return /*#__PURE__*/_jsx(
|
175
|
+
return /*#__PURE__*/_jsx(Tree, {
|
177
176
|
disabled: disabled,
|
178
177
|
style: {
|
179
178
|
width: '100%'
|
@@ -200,7 +199,7 @@ function List(props, ref) {
|
|
200
199
|
showCodeName: showCodeName,
|
201
200
|
disabled: disabled,
|
202
201
|
ref: ref
|
203
|
-
}, restProps)) : /*#__PURE__*/_jsx(
|
202
|
+
}, restProps)) : /*#__PURE__*/_jsx(Tree, {
|
204
203
|
style: {
|
205
204
|
width: '100%'
|
206
205
|
},
|
@@ -1,13 +1,8 @@
|
|
1
|
-
import "antd/es/input/style";
|
2
|
-
import _Input from "antd/es/input";
|
3
|
-
import "antd/es/space/style";
|
4
|
-
import _Space from "antd/es/space";
|
5
|
-
import "antd/es/select/style";
|
6
|
-
import _Select from "antd/es/select";
|
7
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
8
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
9
3
|
import { useEffect } from 'react';
|
10
4
|
import classNames from 'classnames';
|
5
|
+
import { Input, Select, Space } from 'antd';
|
11
6
|
import { CloseOutlined } from '@ant-design/icons';
|
12
7
|
import { ReactSVG } from 'react-svg';
|
13
8
|
import { useSetState } from 'ahooks';
|
@@ -97,10 +92,10 @@ function Trigger(props) {
|
|
97
92
|
};
|
98
93
|
var TriggerComponent = props => {
|
99
94
|
if (appoint) {
|
100
|
-
return /*#__PURE__*/_jsxs(
|
95
|
+
return /*#__PURE__*/_jsxs(Space.Compact, {
|
101
96
|
block: true,
|
102
97
|
style: _objectSpread({}, triggerStyle),
|
103
|
-
children: [/*#__PURE__*/_jsxs(
|
98
|
+
children: [/*#__PURE__*/_jsxs(Select, {
|
104
99
|
style: {
|
105
100
|
width: 'auto'
|
106
101
|
},
|
@@ -109,11 +104,11 @@ function Trigger(props) {
|
|
109
104
|
defaultValue: "appoint",
|
110
105
|
value: state.mode,
|
111
106
|
onChange: onAppointChange,
|
112
|
-
children: [/*#__PURE__*/_jsx(
|
107
|
+
children: [/*#__PURE__*/_jsx(Select.Option, {
|
113
108
|
value: "all",
|
114
109
|
disabled: allDisabled,
|
115
110
|
children: locale === null || locale === void 0 ? void 0 : locale.ProTreeModal.specifyMode[0]
|
116
|
-
}), /*#__PURE__*/_jsx(
|
111
|
+
}), /*#__PURE__*/_jsx(Select.Option, {
|
117
112
|
value: "appoint",
|
118
113
|
disabled: specifyDisabled,
|
119
114
|
children: locale === null || locale === void 0 ? void 0 : locale.ProTreeModal.specifyMode[1]
|
@@ -124,7 +119,7 @@ function Trigger(props) {
|
|
124
119
|
return props.children;
|
125
120
|
};
|
126
121
|
return /*#__PURE__*/_jsx(TriggerComponent, {
|
127
|
-
children: /*#__PURE__*/_jsx(
|
122
|
+
children: /*#__PURE__*/_jsx(Input, {
|
128
123
|
className: classNames(afterDisabled ? 'trigger-no-hover' : '', appoint ? 'pro-tree-modal-input-appoint' : ''),
|
129
124
|
onClick: handleClick,
|
130
125
|
value: checkedValues.length === 0 ? null : state.mode === 'all' ? formatMessage(locale === null || locale === void 0 ? void 0 : locale.ProTreeModal.checkAll1, {
|
package/es/ProTreeModal/index.js
CHANGED
@@ -1,15 +1,8 @@
|
|
1
|
-
import "antd/es/button/style";
|
2
|
-
import _Button from "antd/es/button";
|
3
|
-
import "antd/es/input/style";
|
4
|
-
import _Input from "antd/es/input";
|
5
|
-
import "antd/es/checkbox/style";
|
6
|
-
import _Checkbox from "antd/es/checkbox";
|
7
|
-
import "antd/es/message/style";
|
8
|
-
import _message from "antd/es/message";
|
9
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
10
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
11
3
|
import React, { useEffect, useMemo, useRef } from 'react';
|
12
4
|
import { useDeepCompareEffect, useSetState, useRequest as useRequestFunc, useDebounceFn } from 'ahooks';
|
5
|
+
import { Button, Checkbox, Input, message } from 'antd';
|
13
6
|
import { cloneDeep, isFunction } from 'lodash';
|
14
7
|
import { ReactSVG } from 'react-svg';
|
15
8
|
import classNames from 'classnames';
|
@@ -108,7 +101,7 @@ var ProTreeModal = props => {
|
|
108
101
|
responseData = transformResponse(res);
|
109
102
|
}
|
110
103
|
if (status !== 200) {
|
111
|
-
|
104
|
+
message.error(msg);
|
112
105
|
return;
|
113
106
|
}
|
114
107
|
setState({
|
@@ -252,7 +245,7 @@ var ProTreeModal = props => {
|
|
252
245
|
if (min) {
|
253
246
|
if (values.length < min) {
|
254
247
|
var _locale$ProTreeModal3;
|
255
|
-
|
248
|
+
message.error(formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal3 = locale.ProTreeModal) === null || _locale$ProTreeModal3 === void 0 ? void 0 : _locale$ProTreeModal3.selectMin, {
|
256
249
|
min
|
257
250
|
}));
|
258
251
|
return;
|
@@ -323,7 +316,7 @@ var ProTreeModal = props => {
|
|
323
316
|
}
|
324
317
|
if (max && checkedValues.length > max) {
|
325
318
|
var _locale$ProTreeModal4;
|
326
|
-
|
319
|
+
message.error(maxMessage ? transformMessage({
|
327
320
|
max
|
328
321
|
}, maxMessage) : formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal4 = locale.ProTreeModal) === null || _locale$ProTreeModal4 === void 0 ? void 0 : _locale$ProTreeModal4.selectMax, {
|
329
322
|
max
|
@@ -423,7 +416,7 @@ var ProTreeModal = props => {
|
|
423
416
|
}
|
424
417
|
if (max && checkedValues.length > max) {
|
425
418
|
var _locale$ProTreeModal5;
|
426
|
-
|
419
|
+
message.error(maxMessage ? transformMessage({
|
427
420
|
max
|
428
421
|
}, maxMessage) : formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal5 = locale.ProTreeModal) === null || _locale$ProTreeModal5 === void 0 ? void 0 : _locale$ProTreeModal5.selectMax, {
|
429
422
|
max
|
@@ -585,7 +578,7 @@ var ProTreeModal = props => {
|
|
585
578
|
}
|
586
579
|
if (max && checkedValues.length > max) {
|
587
580
|
var _locale$ProTreeModal6;
|
588
|
-
|
581
|
+
message.error(maxMessage ? transformMessage({
|
589
582
|
max
|
590
583
|
}, maxMessage) : formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal6 = locale.ProTreeModal) === null || _locale$ProTreeModal6 === void 0 ? void 0 : _locale$ProTreeModal6.selectMax, {
|
591
584
|
max
|
@@ -738,7 +731,7 @@ var ProTreeModal = props => {
|
|
738
731
|
title: title,
|
739
732
|
showType: "Modal",
|
740
733
|
className: "pro-tree-modal-container",
|
741
|
-
extraLeft: allValue !== undefined ? /*#__PURE__*/_jsx(
|
734
|
+
extraLeft: allValue !== undefined ? /*#__PURE__*/_jsx(Checkbox, {
|
742
735
|
checked: state.checkAll,
|
743
736
|
disabled: disabled,
|
744
737
|
onChange: handleAllCheck,
|
@@ -748,7 +741,7 @@ var ProTreeModal = props => {
|
|
748
741
|
className: "pro-tree-modal-content",
|
749
742
|
children: [/*#__PURE__*/_jsxs("div", {
|
750
743
|
className: classNames('pro-tree-modal-box', modeType === CASCADER || modeType === LIST && span ? 'pro-tree-modal-cascader-box' : ''),
|
751
|
-
children: [/*#__PURE__*/_jsx(
|
744
|
+
children: [/*#__PURE__*/_jsx(Input, {
|
752
745
|
disabled: disabled,
|
753
746
|
allowClear: true,
|
754
747
|
value: state.searchStr,
|
@@ -769,7 +762,7 @@ var ProTreeModal = props => {
|
|
769
762
|
className: "pro-tree-modal-box-header",
|
770
763
|
children: [/*#__PURE__*/_jsxs("span", {
|
771
764
|
children: [locale === null || locale === void 0 || (_locale$ProTreeModal11 = locale.ProTreeModal) === null || _locale$ProTreeModal11 === void 0 ? void 0 : _locale$ProTreeModal11.check, " (", state.checkedValues.length, "/", max || state.flatTreeData.length, ")"]
|
772
|
-
}), /*#__PURE__*/_jsx(
|
765
|
+
}), /*#__PURE__*/_jsx(Button, {
|
773
766
|
disabled: disabled,
|
774
767
|
type: "link",
|
775
768
|
onClick: handleClearAll,
|
@@ -1,10 +1,7 @@
|
|
1
|
-
import "antd/es/upload/style";
|
2
|
-
import _Upload from "antd/es/upload";
|
3
|
-
import "antd/es/button/style";
|
4
|
-
import _Button from "antd/es/button";
|
5
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
6
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
7
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
4
|
+
import { Button, Upload } from 'antd';
|
8
5
|
import { DndContext } from '@dnd-kit/core';
|
9
6
|
import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable';
|
10
7
|
import { CloudUploadOutlined } from '@ant-design/icons';
|
@@ -83,10 +80,10 @@ var ButtonRender = props => {
|
|
83
80
|
children: /*#__PURE__*/_jsx(SortableContext, {
|
84
81
|
items: fileList.map(i => i.uid),
|
85
82
|
strategy: rectSortingStrategy,
|
86
|
-
children: /*#__PURE__*/_jsx(
|
83
|
+
children: /*#__PURE__*/_jsx(Upload, _objectSpread(_objectSpread({}, buttonUploadProps), {}, {
|
87
84
|
children: !isView && /*#__PURE__*/_jsxs("div", {
|
88
85
|
className: "pro-upload-button-inner",
|
89
|
-
children: [/*#__PURE__*/_jsxs(
|
86
|
+
children: [/*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({}, buttonProps), {}, {
|
90
87
|
disabled: disabled || isView,
|
91
88
|
children: [/*#__PURE__*/_jsx(CloudUploadOutlined, {}), buttonText]
|
92
89
|
})), afterRender ? /*#__PURE__*/_jsx("div", {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/upload/style";
|
3
|
-
import _Upload from "antd/es/upload";
|
4
2
|
import { useRef } from 'react';
|
3
|
+
import { Upload } from 'antd';
|
5
4
|
import { DndContext } from '@dnd-kit/core';
|
6
5
|
import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable';
|
7
6
|
import { CloudUploadOutlined } from '@ant-design/icons';
|
@@ -10,7 +9,7 @@ import { DraggableUploadListItem } from "./DraggableUploadListItem";
|
|
10
9
|
import locale from "../../locale";
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
12
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
13
|
-
var Dragger =
|
12
|
+
var Dragger = Upload.Dragger;
|
14
13
|
var DragRender = props => {
|
15
14
|
var _locale$ProUpload3, _locale$ProUpload4, _locale$ProUpload5, _locale$ProUpload6;
|
16
15
|
var isView = props.isView,
|
@@ -1,10 +1,5 @@
|
|
1
|
-
import "antd/es/progress/style";
|
2
|
-
import _Progress from "antd/es/progress";
|
3
|
-
import "antd/es/popconfirm/style";
|
4
|
-
import _Popconfirm from "antd/es/popconfirm";
|
5
|
-
import "antd/es/button/style";
|
6
|
-
import _Button from "antd/es/button";
|
7
1
|
import React from 'react';
|
2
|
+
import { Progress, Button, Popconfirm } from 'antd';
|
8
3
|
import { ReactSVG } from 'react-svg';
|
9
4
|
import PDF from "../style/icon-PDF.png";
|
10
5
|
import TXT from "../style/icon-TXT.png";
|
@@ -105,7 +100,7 @@ var FileItem = props => {
|
|
105
100
|
className: "file-actions-wrap",
|
106
101
|
children: /*#__PURE__*/_jsxs("div", {
|
107
102
|
className: "file-actions",
|
108
|
-
children: [_isShowDownloadIcon && /*#__PURE__*/_jsx(
|
103
|
+
children: [_isShowDownloadIcon && /*#__PURE__*/_jsx(Button, {
|
109
104
|
type: "link",
|
110
105
|
className: "file-action-item",
|
111
106
|
onClick: _onDownload,
|
@@ -114,7 +109,7 @@ var FileItem = props => {
|
|
114
109
|
wrapper: "span",
|
115
110
|
src: downloadSvg
|
116
111
|
})
|
117
|
-
}), _showPreViewIcon && /*#__PURE__*/_jsx(
|
112
|
+
}), _showPreViewIcon && /*#__PURE__*/_jsx(Button, {
|
118
113
|
type: "link",
|
119
114
|
className: "file-action-item",
|
120
115
|
onClick: _onPreview,
|
@@ -124,12 +119,12 @@ var FileItem = props => {
|
|
124
119
|
color: "#006aff",
|
125
120
|
src: lookSvg
|
126
121
|
})
|
127
|
-
}), _showRemoveIcon && !disabled && (isConfirmDelete ? /*#__PURE__*/_jsx(
|
122
|
+
}), _showRemoveIcon && !disabled && (isConfirmDelete ? /*#__PURE__*/_jsx(Popconfirm, {
|
128
123
|
title: "\u786E\u5B9A\u5220\u9664?",
|
129
124
|
onConfirm: _onRemove,
|
130
125
|
okText: "\u786E\u8BA4",
|
131
126
|
cancelText: "\u53D6\u6D88",
|
132
|
-
children: /*#__PURE__*/_jsx(
|
127
|
+
children: /*#__PURE__*/_jsx(Button, {
|
133
128
|
type: "link",
|
134
129
|
className: "file-action-item",
|
135
130
|
disabled: disabled,
|
@@ -139,7 +134,7 @@ var FileItem = props => {
|
|
139
134
|
src: deleteSvg
|
140
135
|
})
|
141
136
|
})
|
142
|
-
}) : /*#__PURE__*/_jsx(
|
137
|
+
}) : /*#__PURE__*/_jsx(Button, {
|
143
138
|
type: "link",
|
144
139
|
className: "file-action-item",
|
145
140
|
disabled: disabled,
|
@@ -154,7 +149,7 @@ var FileItem = props => {
|
|
154
149
|
})]
|
155
150
|
}), file.status === 'uploading' && /*#__PURE__*/_jsx("div", {
|
156
151
|
className: "file-progress",
|
157
|
-
children: /*#__PURE__*/_jsx(
|
152
|
+
children: /*#__PURE__*/_jsx(Progress, {
|
158
153
|
percent: Math.ceil(file.percent),
|
159
154
|
size: 2
|
160
155
|
})
|
@@ -201,7 +196,7 @@ var DragSingleFileItem = props => {
|
|
201
196
|
className: "file-actions-wrap",
|
202
197
|
children: /*#__PURE__*/_jsxs("div", {
|
203
198
|
className: "file-actions",
|
204
|
-
children: [_showPreViewIcon && /*#__PURE__*/_jsx(
|
199
|
+
children: [_showPreViewIcon && /*#__PURE__*/_jsx(Button, {
|
205
200
|
type: "link",
|
206
201
|
className: "file-action-item",
|
207
202
|
onClick: _onPreview,
|
@@ -210,7 +205,7 @@ var DragSingleFileItem = props => {
|
|
210
205
|
wrapper: "span",
|
211
206
|
src: lookSvg
|
212
207
|
})
|
213
|
-
}), _isShowDownloadIcon && /*#__PURE__*/_jsx(
|
208
|
+
}), _isShowDownloadIcon && /*#__PURE__*/_jsx(Button, {
|
214
209
|
type: "link",
|
215
210
|
className: "file-action-item",
|
216
211
|
onClick: _onDownload,
|
@@ -224,7 +219,7 @@ var DragSingleFileItem = props => {
|
|
224
219
|
})]
|
225
220
|
}), file.status === 'uploading' && /*#__PURE__*/_jsx("div", {
|
226
221
|
className: "file-progress",
|
227
|
-
children: /*#__PURE__*/_jsx(
|
222
|
+
children: /*#__PURE__*/_jsx(Progress, {
|
228
223
|
percent: Math.ceil(file.percent),
|
229
224
|
size: 2
|
230
225
|
})
|
@@ -1,17 +1,8 @@
|
|
1
|
-
import "antd/es/space/style";
|
2
|
-
import _Space from "antd/es/space";
|
3
|
-
import "antd/es/modal/style";
|
4
|
-
import _Modal from "antd/es/modal";
|
5
|
-
import "antd/es/upload/style";
|
6
|
-
import _Upload from "antd/es/upload";
|
7
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
8
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
9
|
-
import "antd/es/button/style";
|
10
|
-
import _Button from "antd/es/button";
|
11
|
-
import "antd/es/progress/style";
|
12
|
-
import _Progress from "antd/es/progress";
|
13
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
14
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
|
+
import { Button, Upload, Progress, Space, Modal } from 'antd';
|
15
6
|
import { useRef, useState } from 'react';
|
16
7
|
import { DndContext } from '@dnd-kit/core';
|
17
8
|
import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable';
|
@@ -117,7 +108,7 @@ var ImageRender = props => {
|
|
117
108
|
className: `file-item-image ${file.status === 'error' ? 'actions-wrap-error' : ''}`,
|
118
109
|
children: [file.status === 'uploading' && /*#__PURE__*/_jsx("div", {
|
119
110
|
className: "image-uploading",
|
120
|
-
children: /*#__PURE__*/_jsx(
|
111
|
+
children: /*#__PURE__*/_jsx(Progress, {
|
121
112
|
size: "small",
|
122
113
|
percent: Math.ceil(file.percent)
|
123
114
|
})
|
@@ -132,7 +123,7 @@ var ImageRender = props => {
|
|
132
123
|
className: "actions-wrap ",
|
133
124
|
children: [/*#__PURE__*/_jsxs("div", {
|
134
125
|
className: "action-top",
|
135
|
-
children: [_showPreview && /*#__PURE__*/_jsx(
|
126
|
+
children: [_showPreview && /*#__PURE__*/_jsx(Button, {
|
136
127
|
type: "link",
|
137
128
|
className: "action-item",
|
138
129
|
onClick: () => {
|
@@ -144,7 +135,7 @@ var ImageRender = props => {
|
|
144
135
|
src: lookSvg
|
145
136
|
}),
|
146
137
|
children: locale === null || locale === void 0 || (_locale$ProUpload = locale.ProUpload) === null || _locale$ProUpload === void 0 ? void 0 : _locale$ProUpload.view
|
147
|
-
}), _isShowDownload && /*#__PURE__*/_jsx(
|
138
|
+
}), _isShowDownload && /*#__PURE__*/_jsx(Button, {
|
148
139
|
type: "link",
|
149
140
|
disabled: isView || disabled,
|
150
141
|
className: "action-item",
|
@@ -160,7 +151,7 @@ var ImageRender = props => {
|
|
160
151
|
})]
|
161
152
|
}), /*#__PURE__*/_jsx("div", {
|
162
153
|
className: "action-button",
|
163
|
-
children: /*#__PURE__*/_jsx(
|
154
|
+
children: /*#__PURE__*/_jsx(Button, {
|
164
155
|
type: "link",
|
165
156
|
disabled: isView || disabled,
|
166
157
|
className: "action-item",
|
@@ -214,7 +205,7 @@ var ImageRender = props => {
|
|
214
205
|
});
|
215
206
|
}
|
216
207
|
});
|
217
|
-
return /*#__PURE__*/_jsxs(
|
208
|
+
return /*#__PURE__*/_jsxs(Space, {
|
218
209
|
direction: "vertical",
|
219
210
|
size: 8,
|
220
211
|
className: "pro-upload-image",
|
@@ -226,7 +217,7 @@ var ImageRender = props => {
|
|
226
217
|
children: /*#__PURE__*/_jsx(SortableContext, {
|
227
218
|
items: fileList.map(i => i.uid),
|
228
219
|
strategy: rectSortingStrategy,
|
229
|
-
children: /*#__PURE__*/_jsx(
|
220
|
+
children: /*#__PURE__*/_jsx(Upload, _objectSpread(_objectSpread({}, imageUploadProps), {}, {
|
230
221
|
children: fileList.length < maxCount && !isView && (centerRender ? isFunction(centerRender) ? centerRender() : centerRender : /*#__PURE__*/_jsxs("div", {
|
231
222
|
className: `pro-upload-image-inner ${disabled ? 'pro-upload-image-disabled' : ''} `,
|
232
223
|
children: [/*#__PURE__*/_jsx(PlusOutlined, {}), /*#__PURE__*/_jsx("div", {
|
@@ -250,7 +241,7 @@ var ImageRender = props => {
|
|
250
241
|
}), /*#__PURE__*/_jsx("div", {
|
251
242
|
className: "pro-upload-image-footer",
|
252
243
|
children: footerRender()
|
253
|
-
}), /*#__PURE__*/_jsx(
|
244
|
+
}), /*#__PURE__*/_jsx(Modal, {
|
254
245
|
title: previewImg === null || previewImg === void 0 ? void 0 : previewImg.name,
|
255
246
|
width: "600",
|
256
247
|
style: {
|
package/es/ProUpload/index.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import "antd/es/message/style";
|
2
|
-
import _message from "antd/es/message";
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
6
4
|
var _excluded = ["value", "size", "action", "maxCount", "headerRender", "footerRender", "centerRender", "disabled", "uploadType", "buttonProps", "accept", "extraTipText", "beforeUpload", "onChange", "onDownload", "onPreview", "onRemove", "filterOriginFileObj", "method", "className", "dataParams", "name", "showExampleContent", "showUploadList", "otherProps", "transformResponse", "exampleTitle", "exampleContent", "exampleModalProps", "buttonText", "afterRender", "fieldNames", "isConfirmDelete"];
|
7
5
|
import React, { useEffect, useState, useImperativeHandle } from 'react';
|
6
|
+
import { message } from 'antd';
|
8
7
|
import { isFunction, omit } from 'lodash';
|
9
8
|
import { PointerSensor, useSensor } from '@dnd-kit/core';
|
10
9
|
import { arrayMove } from '@dnd-kit/sortable';
|
@@ -172,12 +171,12 @@ var ProUpload = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
172
171
|
var handleBeforeUpload = (file, fileList) => {
|
173
172
|
if (!validateFileExt(extExt, file)) {
|
174
173
|
var _locale$ProUpload2;
|
175
|
-
|
174
|
+
message.error(`${locale === null || locale === void 0 || (_locale$ProUpload2 = locale.ProUpload) === null || _locale$ProUpload2 === void 0 ? void 0 : _locale$ProUpload2.errorInfoExt}【${extExt.join('、')}】`);
|
176
175
|
return false;
|
177
176
|
}
|
178
177
|
if (!validateSize(size, file)) {
|
179
178
|
var _locale$ProUpload3;
|
180
|
-
|
179
|
+
message.error(`${locale === null || locale === void 0 || (_locale$ProUpload3 = locale.ProUpload) === null || _locale$ProUpload3 === void 0 ? void 0 : _locale$ProUpload3.errorInfoSize}${size}M`);
|
181
180
|
return false;
|
182
181
|
}
|
183
182
|
if (beforeUpload) {
|
package/es/ProViewer/index.js
CHANGED
@@ -1,15 +1,10 @@
|
|
1
|
-
import "antd/es/modal/style";
|
2
|
-
import _Modal from "antd/es/modal";
|
3
|
-
import "antd/es/image/style";
|
4
|
-
import _Image from "antd/es/image";
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
6
|
-
import "antd/es/button/style";
|
7
|
-
import _Button from "antd/es/button";
|
8
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
9
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
10
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
11
5
|
/* eslint-disable jsx-a11y/iframe-has-title */
|
12
6
|
import { useSetState } from 'ahooks';
|
7
|
+
import { Button, Image, Modal } from 'antd';
|
13
8
|
import React, { useEffect, useRef } from 'react';
|
14
9
|
import locale from "../locale";
|
15
10
|
|
@@ -181,13 +176,13 @@ var ProViewer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
181
176
|
}, [previewData]);
|
182
177
|
return /*#__PURE__*/_jsxs("span", {
|
183
178
|
className: "pro-viewer",
|
184
|
-
children: [/*#__PURE__*/_jsx(
|
179
|
+
children: [/*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
185
180
|
disabled: disabled || !url && !previewFile,
|
186
181
|
ref: ProViewerRef,
|
187
182
|
onClick: previewHandle
|
188
183
|
}, buttonProps), {}, {
|
189
184
|
children: children
|
190
|
-
})), mode && fileType === 'img' && /*#__PURE__*/_jsx(
|
185
|
+
})), mode && fileType === 'img' && /*#__PURE__*/_jsx(Image, {
|
191
186
|
src: url,
|
192
187
|
preview: {
|
193
188
|
visible: imgVisible,
|
@@ -197,7 +192,7 @@ var ProViewer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
197
192
|
});
|
198
193
|
}
|
199
194
|
}
|
200
|
-
}), /*#__PURE__*/_jsx(
|
195
|
+
}), /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
|
201
196
|
onCancel: () => {
|
202
197
|
setState({
|
203
198
|
modalVisible: false
|
package/es/ProWaterMark/index.js
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import
|
3
|
-
import _Watermark from "antd/es/watermark";
|
2
|
+
import { Watermark } from 'antd';
|
4
3
|
import React from 'react';
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
5
|
var ProWaterMark = props => {
|
7
6
|
var content = props.content;
|
8
7
|
return /*#__PURE__*/_jsx("div", {
|
9
8
|
className: "pro-water-mark",
|
10
|
-
children: /*#__PURE__*/_jsx(
|
9
|
+
children: /*#__PURE__*/_jsx(Watermark, _objectSpread(_objectSpread({}, props), {}, {
|
11
10
|
content: content,
|
12
11
|
children: props === null || props === void 0 ? void 0 : props.children
|
13
12
|
}))
|
package/lib/ProAction/index.js
CHANGED
@@ -6,15 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.default = void 0;
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
9
|
-
require("antd/es/popconfirm/style");
|
10
|
-
var _popconfirm = _interopRequireDefault(require("antd/es/popconfirm"));
|
11
9
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
12
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
13
|
-
require("antd/es/form/style");
|
14
|
-
var _form = _interopRequireDefault(require("antd/es/form"));
|
15
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
16
12
|
var _react = _interopRequireDefault(require("react"));
|
17
13
|
var _ahooks = require("ahooks");
|
14
|
+
var _antd = require("antd");
|
18
15
|
var _lodash = require("lodash");
|
19
16
|
var _CheckModalContent = _interopRequireDefault(require("./components/CheckModalContent"));
|
20
17
|
var _index = require("../index");
|
@@ -25,7 +22,7 @@ var ProAction = props => {
|
|
25
22
|
var _config$, _config$2, _locale$ProAction2, _config$index;
|
26
23
|
var children = props.children,
|
27
24
|
config = props.config;
|
28
|
-
var _Form$useForm =
|
25
|
+
var _Form$useForm = _antd.Form.useForm(),
|
29
26
|
_Form$useForm2 = (0, _slicedToArray2.default)(_Form$useForm, 1),
|
30
27
|
form = _Form$useForm2[0];
|
31
28
|
var _useSetState = (0, _ahooks.useSetState)({
|
@@ -196,7 +193,7 @@ var ProAction = props => {
|
|
196
193
|
return TargetComponent;
|
197
194
|
};
|
198
195
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
199
|
-
children: [((_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.mode) === 'confirm' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
196
|
+
children: [((_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.mode) === 'confirm' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Popconfirm, {
|
200
197
|
onConfirm: () => onActionRun(0, []),
|
201
198
|
title: ((_config$2 = config[0]) === null || _config$2 === void 0 ? void 0 : _config$2.title) || (_locale.default === null || _locale.default === void 0 || (_locale$ProAction2 = _locale.default.ProAction) === null || _locale$ProAction2 === void 0 ? void 0 : _locale$ProAction2.defaultTitle),
|
202
199
|
children: children
|
@@ -8,10 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
exports.default = exports.ProConfigProvider = exports.ProConfigContext = void 0;
|
9
9
|
exports.useProConfig = useProConfig;
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
|
-
require("antd/es/config-provider/style");
|
12
|
-
var _configProvider = _interopRequireDefault(require("antd/es/config-provider"));
|
13
11
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
14
12
|
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
var _antd = require("antd");
|
15
14
|
var _zh_CN = _interopRequireDefault(require("antd/es/locale/zh_CN"));
|
16
15
|
var _en_US = _interopRequireDefault(require("antd/es/locale/en_US"));
|
17
16
|
require("dayjs/locale/zh-cn");
|
@@ -100,7 +99,7 @@ var ThemeAwareConfigProvider = _ref => {
|
|
100
99
|
children = _ref.children;
|
101
100
|
var _useTheme = (0, _ThemeContext.useTheme)(),
|
102
101
|
themeState = _useTheme.state;
|
103
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
102
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ConfigProvider, {
|
104
103
|
locale: locale,
|
105
104
|
theme: themeState.antdConfig,
|
106
105
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|