@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,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,
|
@@ -1,14 +1,7 @@
|
|
1
|
-
import "antd/es/button/style";
|
2
|
-
import _Button from "antd/es/button";
|
3
|
-
import "antd/es/switch/style";
|
4
|
-
import _Switch from "antd/es/switch";
|
5
|
-
import "antd/es/radio/style";
|
6
|
-
import _Radio from "antd/es/radio";
|
7
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
8
|
-
import "antd/es/drawer/style";
|
9
|
-
import _Drawer from "antd/es/drawer";
|
10
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
11
3
|
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
|
4
|
+
import { Button, Drawer, Radio, Switch } from 'antd';
|
12
5
|
import React, { useState, useEffect } from 'react';
|
13
6
|
import { setThemes } from "../../utils/index";
|
14
7
|
import { useProConfig } from "../../../ProConfigProvider";
|
@@ -21,7 +14,7 @@ var connect = function connect(Component) {
|
|
21
14
|
};
|
22
15
|
return ComponentWrapper;
|
23
16
|
};
|
24
|
-
var NewDrawer = connect(
|
17
|
+
var NewDrawer = connect(Drawer);
|
25
18
|
var ProTools = _ref => {
|
26
19
|
var onReset = _ref.onReset,
|
27
20
|
onClose = _ref.onClose,
|
@@ -142,7 +135,7 @@ var ProTools = _ref => {
|
|
142
135
|
})
|
143
136
|
}), /*#__PURE__*/_jsx("div", {
|
144
137
|
className: "pro-theme-tools-item",
|
145
|
-
children: /*#__PURE__*/_jsxs(
|
138
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
146
139
|
value: state.zauiSize,
|
147
140
|
onChange: e => {
|
148
141
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
@@ -152,13 +145,13 @@ var ProTools = _ref => {
|
|
152
145
|
'zaui-size': e.target.value
|
153
146
|
});
|
154
147
|
},
|
155
|
-
children: [/*#__PURE__*/_jsx(
|
148
|
+
children: [/*#__PURE__*/_jsx(Radio.Button, {
|
156
149
|
value: 0.5,
|
157
150
|
children: `${locale.ProThemeTools.layoutMode[0]}`
|
158
|
-
}), /*#__PURE__*/_jsx(
|
151
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
159
152
|
value: 1,
|
160
153
|
children: `${locale.ProThemeTools.layoutMode[1]}`
|
161
|
-
}), /*#__PURE__*/_jsx(
|
154
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
162
155
|
value: 1.5,
|
163
156
|
children: `${locale.ProThemeTools.layoutMode[2]}`
|
164
157
|
})]
|
@@ -173,7 +166,7 @@ var ProTools = _ref => {
|
|
173
166
|
})
|
174
167
|
}), /*#__PURE__*/_jsx("div", {
|
175
168
|
className: "pro-theme-tools-item",
|
176
|
-
children: /*#__PURE__*/_jsxs(
|
169
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
177
170
|
value: state.zauiFormAlign,
|
178
171
|
onChange: e => {
|
179
172
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
@@ -192,10 +185,10 @@ var ProTools = _ref => {
|
|
192
185
|
}
|
193
186
|
});
|
194
187
|
},
|
195
|
-
children: [/*#__PURE__*/_jsx(
|
188
|
+
children: [/*#__PURE__*/_jsx(Radio.Button, {
|
196
189
|
value: "left",
|
197
190
|
children: `${locale.ProThemeTools.flex[0]}`
|
198
|
-
}), /*#__PURE__*/_jsx(
|
191
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
199
192
|
value: "right",
|
200
193
|
children: `${locale.ProThemeTools.flex[1]}`
|
201
194
|
})]
|
@@ -210,7 +203,7 @@ var ProTools = _ref => {
|
|
210
203
|
})
|
211
204
|
}), /*#__PURE__*/_jsx("div", {
|
212
205
|
className: "pro-theme-tools-item",
|
213
|
-
children: /*#__PURE__*/_jsx(
|
206
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
214
207
|
checkedChildren: `${locale.ProThemeTools.switchText[0]}`,
|
215
208
|
unCheckedChildren: `${locale.ProThemeTools.switchText[1]}`,
|
216
209
|
checked: state.zauiTableBorder,
|
@@ -233,7 +226,7 @@ var ProTools = _ref => {
|
|
233
226
|
})
|
234
227
|
}), /*#__PURE__*/_jsx("div", {
|
235
228
|
className: "pro-theme-tools-item",
|
236
|
-
children: /*#__PURE__*/_jsx(
|
229
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
237
230
|
checkedChildren: `${locale.ProThemeTools.switchText[0]}`,
|
238
231
|
unCheckedChildren: `${locale.ProThemeTools.switchText[1]}`,
|
239
232
|
checked: state.zauiStripe,
|
@@ -248,7 +241,7 @@ var ProTools = _ref => {
|
|
248
241
|
}
|
249
242
|
})
|
250
243
|
})]
|
251
|
-
}), /*#__PURE__*/_jsx(
|
244
|
+
}), /*#__PURE__*/_jsx(Button, {
|
252
245
|
className: "copy-btn",
|
253
246
|
onClick: () => {
|
254
247
|
setActive([{
|
@@ -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 _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
6
4
|
var _excluded = ["size", "className", "cacheTime", "color", "mode", "iconFollowTheme", "prefixCls", "tableBorder", "tableStripe", "theme", "onChange"];
|
7
5
|
/* eslint-disable prefer-const */
|
6
|
+
import { message } from 'antd';
|
8
7
|
import { useEffect, useState } from 'react';
|
9
8
|
import { usePrevious, useUpdateEffect, useToggle } from 'ahooks';
|
10
9
|
import { ReactSVG } from 'react-svg';
|
@@ -122,7 +121,7 @@ var ProThemeTools = _ref => {
|
|
122
121
|
input.select();
|
123
122
|
if (document.execCommand('copy')) {
|
124
123
|
document.execCommand('copy');
|
125
|
-
|
124
|
+
message.success(`${locale.ProThemeTools.copySuccess}`);
|
126
125
|
}
|
127
126
|
document.body.removeChild(input);
|
128
127
|
};
|
package/es/ProTooltip/index.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import "antd/es/tooltip/style";
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
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 = ["text", "mode", "width", "line", "className", "style", "lineHeight", "scrollFollowParent"];
|
7
5
|
import { useSize, useSetState, useDebounce } from 'ahooks';
|
6
|
+
import { Tooltip } from 'antd';
|
8
7
|
import { useEffect, useRef } from 'react';
|
9
8
|
import classnames from 'classnames';
|
10
9
|
import { isEllipsisActive } from "../utils";
|
@@ -72,7 +71,7 @@ var ProTooltip = props => {
|
|
72
71
|
WebkitLineClamp: line
|
73
72
|
} : {};
|
74
73
|
var AutoMixinSingle = () => {
|
75
|
-
return isShowToolTip && line === 1 ? /*#__PURE__*/_jsx(
|
74
|
+
return isShowToolTip && line === 1 ? /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
76
75
|
title: text,
|
77
76
|
getPopupContainer: triggerNode => triggerNode.parentNode
|
78
77
|
}, restProps), {}, {
|
@@ -107,7 +106,7 @@ var ProTooltip = props => {
|
|
107
106
|
});
|
108
107
|
};
|
109
108
|
var AutoMixinMulti = () => {
|
110
|
-
return isShowToolTip && line > 1 ? /*#__PURE__*/_jsx(
|
109
|
+
return isShowToolTip && line > 1 ? /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
111
110
|
title: text,
|
112
111
|
getPopupContainer: triggerNode => triggerNode.parentNode
|
113
112
|
}, restProps), {}, {
|
@@ -247,7 +246,7 @@ var ProTooltip = props => {
|
|
247
246
|
});
|
248
247
|
};
|
249
248
|
var renderTooltipContent = () => {
|
250
|
-
return /*#__PURE__*/_jsx(
|
249
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
251
250
|
title: text,
|
252
251
|
getPopupContainer: triggerNode => {
|
253
252
|
// 修复scrollFollowParent为false时tooltip不显示的问题
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
1
|
+
import { Tooltip } from 'antd';
|
3
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
4
3
|
var AdaptiveTooltip = _ref => {
|
5
4
|
var children = _ref.children;
|
6
|
-
return /*#__PURE__*/_jsx(
|
5
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
7
6
|
placement: "rightTop",
|
8
7
|
title: /*#__PURE__*/_jsx("div", {
|
9
8
|
onMouseDown: e => e.stopPropagation(),
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import "antd/es/checkbox/style";
|
2
|
-
import _Checkbox from "antd/es/checkbox";
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "showCodeName", "mode", "fieldNames", "handleOnChange", "handleFilterClose", "optionRender"];
|
6
4
|
import { memo } from 'react';
|
5
|
+
import { Checkbox } from 'antd';
|
7
6
|
import SearchTitle from "./SearchTitle";
|
8
7
|
import CloseIcon from "./CloseIcon";
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -26,7 +25,7 @@ function List(props) {
|
|
26
25
|
var fieldNameValue = fieldNames.value;
|
27
26
|
if (mode === 'render') {
|
28
27
|
return /*#__PURE__*/_jsx(_Fragment, {
|
29
|
-
children: /*#__PURE__*/_jsx(
|
28
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
30
29
|
disabled: disabled,
|
31
30
|
style: {
|
32
31
|
width: '100%'
|
@@ -36,7 +35,7 @@ function List(props) {
|
|
36
35
|
var title = showCodeName ? `${item[fieldNameValue]}-${item[fieldNameLabel]}` : item[fieldNameLabel];
|
37
36
|
return /*#__PURE__*/_jsx("div", {
|
38
37
|
className: "pro-tree-checkbox-content",
|
39
|
-
children: /*#__PURE__*/_jsx(
|
38
|
+
children: /*#__PURE__*/_jsx(Checkbox, {
|
40
39
|
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
41
40
|
value: item[fieldNameValue],
|
42
41
|
disabled: item.disabled,
|
@@ -1,13 +1,5 @@
|
|
1
|
-
import "antd/es/spin/style";
|
2
|
-
import _Spin from "antd/es/spin";
|
3
|
-
import "antd/es/checkbox/style";
|
4
|
-
import _Checkbox from "antd/es/checkbox";
|
5
|
-
import "antd/es/input/style";
|
6
|
-
import _Input from "antd/es/input";
|
7
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
8
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
9
|
-
import "antd/es/message/style";
|
10
|
-
import _message from "antd/es/message";
|
11
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
12
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
13
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
@@ -16,6 +8,7 @@ import { useEffect } from 'react';
|
|
16
8
|
import classNames from 'classnames';
|
17
9
|
import { CaretDownOutlined, Loading3QuartersOutlined } from '@ant-design/icons';
|
18
10
|
import { useDeepCompareEffect, useSetState, useRequest as useRequestFunc } from 'ahooks';
|
11
|
+
import { Checkbox, Input, message, Spin } from 'antd';
|
19
12
|
import { cloneDeep, isFunction } from 'lodash';
|
20
13
|
import { ReactSVG } from 'react-svg';
|
21
14
|
import { useProConfig } from "../../ProConfigProvider";
|
@@ -117,7 +110,7 @@ var ProTree = props => {
|
|
117
110
|
msg = res.message,
|
118
111
|
data = res.data;
|
119
112
|
if (status !== 200) {
|
120
|
-
|
113
|
+
message.error(msg);
|
121
114
|
return;
|
122
115
|
}
|
123
116
|
var _flatTrees = getFlatTreeData(data, fieldNames);
|
@@ -426,14 +419,14 @@ var ProTree = props => {
|
|
426
419
|
return /*#__PURE__*/_jsx("div", {
|
427
420
|
className: boxClass,
|
428
421
|
style: style,
|
429
|
-
children: /*#__PURE__*/_jsx(
|
422
|
+
children: /*#__PURE__*/_jsx(Spin, {
|
430
423
|
spinning: state.clickShowLoading,
|
431
424
|
indicator: antIcon,
|
432
425
|
children: /*#__PURE__*/_jsxs("div", {
|
433
426
|
className: "pro-tree-content",
|
434
427
|
children: [/*#__PURE__*/_jsxs("div", {
|
435
428
|
className: "pro-tree-header-box",
|
436
|
-
children: [showSearch && /*#__PURE__*/_jsx(
|
429
|
+
children: [showSearch && /*#__PURE__*/_jsx(Input, {
|
437
430
|
disabled: disabled,
|
438
431
|
allowClear: true,
|
439
432
|
value: state.searchStr,
|
@@ -481,7 +474,7 @@ var ProTree = props => {
|
|
481
474
|
className: allValue || footer ? 'pro-tree-footer-box' : '',
|
482
475
|
children: [/*#__PURE__*/_jsx("div", {
|
483
476
|
className: "check-all-box",
|
484
|
-
children: allValue !== undefined ? /*#__PURE__*/_jsx(
|
477
|
+
children: allValue !== undefined ? /*#__PURE__*/_jsx(Checkbox, {
|
485
478
|
checked: state.checkAll,
|
486
479
|
disabled: disabled,
|
487
480
|
onChange: handleAllCheck,
|
@@ -1,21 +1,14 @@
|
|
1
|
-
import "antd/es/tooltip/style";
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
3
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
4
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
5
|
-
import "antd/es/input/style";
|
6
|
-
import _Input from "antd/es/input";
|
7
|
-
import "antd/es/message/style";
|
8
|
-
import _message from "antd/es/message";
|
9
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
10
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
11
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
12
|
-
import "antd/es/tree-select/style";
|
13
|
-
import _TreeSelect from "antd/es/tree-select";
|
14
6
|
var _excluded = ["disabled", "code", "dataSource", "defaultDisableValue", "onChange", "useRequest", "transformResponse", "fieldNames", "placeholder", "tooltip", "showSearch", "filterTreeNode", "treeNodeFilterProp", "defaultExpandAll", "expandedKeys", "treeCheckable", "onSearch", "otherProps", "width", "dropdownStyle", "popupClassName", "style", "allowClear", "listHeight", "showCodeName", "className", "checkStrictly", "checkable"],
|
15
7
|
_excluded2 = ["children"];
|
16
8
|
/* eslint-disable react/no-danger */
|
17
9
|
/* eslint-disable react/jsx-closing-tag-location */
|
18
10
|
import { useDeepCompareEffect, useRequest as useRequestFunc, useSetState } from 'ahooks';
|
11
|
+
import { Input, TreeSelect, message, Tooltip } from 'antd';
|
19
12
|
import classnames from 'classnames';
|
20
13
|
import React, { useImperativeHandle, forwardRef, useCallback } from 'react';
|
21
14
|
import { cloneDeep, debounce } from 'lodash';
|
@@ -25,7 +18,7 @@ import Container from "../../../ProForm/components/Container";
|
|
25
18
|
import AdaptiveTooltip from "../AdaptiveTooltip";
|
26
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
27
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
28
|
-
var SHOW_PARENT =
|
21
|
+
var SHOW_PARENT = TreeSelect.SHOW_PARENT;
|
29
22
|
export var ProTreeSelect = (props, ref) => {
|
30
23
|
var _useRequest$options, _selectProps$classNam, _selectProps$classNam2, _selectProps$styles, _selectProps$styles2;
|
31
24
|
// 全局属性配置在ConfigProvider
|
@@ -164,7 +157,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
164
157
|
msg = res.message,
|
165
158
|
data = res.data;
|
166
159
|
if (status !== 200) {
|
167
|
-
|
160
|
+
message.error(msg);
|
168
161
|
return;
|
169
162
|
}
|
170
163
|
var resultData = transferDataSource(data, showCodeName);
|
@@ -183,7 +176,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
183
176
|
msg = _ref4.message,
|
184
177
|
data = _ref4.data;
|
185
178
|
if (status !== 200) {
|
186
|
-
|
179
|
+
message.error(msg);
|
187
180
|
return;
|
188
181
|
}
|
189
182
|
return data;
|
@@ -268,7 +261,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
268
261
|
if (defaultDisableValue) {
|
269
262
|
return /*#__PURE__*/_jsx("span", {
|
270
263
|
title: defaultDisableValue,
|
271
|
-
children: /*#__PURE__*/_jsx(
|
264
|
+
children: /*#__PURE__*/_jsx(Input, {
|
272
265
|
disabled: true,
|
273
266
|
defaultValue: defaultDisableValue,
|
274
267
|
style: props === null || props === void 0 ? void 0 : props.style
|
@@ -385,7 +378,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
385
378
|
});
|
386
379
|
}
|
387
380
|
if (!children) {
|
388
|
-
return /*#__PURE__*/_jsx(
|
381
|
+
return /*#__PURE__*/_jsx(TreeSelect.TreeNode, {
|
389
382
|
value: value,
|
390
383
|
title: title,
|
391
384
|
label: searchKey,
|
@@ -396,7 +389,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
396
389
|
}, key);
|
397
390
|
}
|
398
391
|
var sonGrade = grade + 1;
|
399
|
-
return /*#__PURE__*/_jsx(
|
392
|
+
return /*#__PURE__*/_jsx(TreeSelect.TreeNode, {
|
400
393
|
value: value,
|
401
394
|
title: title,
|
402
395
|
label: searchKey,
|
@@ -623,7 +616,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
623
616
|
return /*#__PURE__*/_jsx("div", {
|
624
617
|
onClick: nodeChangeEvent,
|
625
618
|
className: cls,
|
626
|
-
children: /*#__PURE__*/_jsx(
|
619
|
+
children: /*#__PURE__*/_jsx(TreeSelect, _objectSpread(_objectSpread({
|
627
620
|
placeholder: placeholder || locale.ProForm.treeSelectPlaceholder,
|
628
621
|
maxTagPlaceholder: rest => {
|
629
622
|
var _rest = rest.map(tag => {
|
@@ -631,7 +624,7 @@ export var ProTreeSelect = (props, ref) => {
|
|
631
624
|
return (tag !== null && tag !== void 0 && (_tag$label = tag.label) !== null && _tag$label !== void 0 && (_tag$label = _tag$label.props) !== null && _tag$label !== void 0 && _tag$label.children ? tag === null || tag === void 0 || (_tag$label2 = tag.label) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.props) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.children) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.props) === null || _tag$label2 === void 0 || (_tag$label2 = _tag$label2.dangerouslySetInnerHTML) === null || _tag$label2 === void 0 ? void 0 : _tag$label2.__html : tag === null || tag === void 0 || (_tag$label3 = tag.label) === null || _tag$label3 === void 0 || (_tag$label3 = _tag$label3.props) === null || _tag$label3 === void 0 || (_tag$label3 = _tag$label3.dangerouslySetInnerHTML) === null || _tag$label3 === void 0 ? void 0 : _tag$label3.__html) || tag.label;
|
632
625
|
});
|
633
626
|
var _str = _rest.join('、');
|
634
|
-
return /*#__PURE__*/_jsx(
|
627
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
635
628
|
title: /*#__PURE__*/_jsx("div", {
|
636
629
|
children: _str
|
637
630
|
}),
|
@@ -1,7 +1,3 @@
|
|
1
|
-
import "antd/es/tree/style";
|
2
|
-
import _Tree from "antd/es/tree";
|
3
|
-
import "antd/es/popover/style";
|
4
|
-
import _Popover from "antd/es/popover";
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
6
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
7
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
@@ -10,6 +6,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
10
6
|
var _excluded = ["checkedValues", "disabled", "searchStr", "originalTreeData", "showCodeName", "checkStrictly", "flatTreeData", "mode", "fieldNames", "tags", "onCheck", "optionRender", "treeData", "showLine", "switcherIcon", "checkable", "menu", "innerExpandKeys", "selectedKey", "disabledMode", "isRadioSelect"];
|
11
7
|
/* eslint-disable no-plusplus */
|
12
8
|
import React, { useEffect, useState } from 'react';
|
9
|
+
import { Tree, Popover } from 'antd';
|
13
10
|
import { useSetState } from 'ahooks';
|
14
11
|
import { CaretDownOutlined } from '@ant-design/icons';
|
15
12
|
import SearchTitle from "./SearchTitle";
|
@@ -271,7 +268,7 @@ function List(props) {
|
|
271
268
|
onClick: e => {
|
272
269
|
e.stopPropagation();
|
273
270
|
},
|
274
|
-
children: (operateButton === null || operateButton === void 0 ? void 0 : operateButton.length) > 1 ? /*#__PURE__*/_jsx(
|
271
|
+
children: (operateButton === null || operateButton === void 0 ? void 0 : operateButton.length) > 1 ? /*#__PURE__*/_jsx(Popover, {
|
275
272
|
classNames: {
|
276
273
|
root: 'pro-tree-operate-container'
|
277
274
|
},
|
@@ -351,7 +348,7 @@ function List(props) {
|
|
351
348
|
}
|
352
349
|
return /*#__PURE__*/_jsx("div", {
|
353
350
|
className: disabledMode === 'hide' ? 'hide-disable-node' : '',
|
354
|
-
children: _treeData !== null && _treeData !== void 0 && _treeData.length ? /*#__PURE__*/_jsx(
|
351
|
+
children: _treeData !== null && _treeData !== void 0 && _treeData.length ? /*#__PURE__*/_jsx(Tree, _objectSpread(_objectSpread(_objectSpread({}, others), additionProps), {}, {
|
355
352
|
disabled: disabled,
|
356
353
|
style: {
|
357
354
|
width: '100%'
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import "antd/es/checkbox/style";
|
3
|
-
import _Checkbox from "antd/es/checkbox";
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
3
|
import { useEffect } from 'react';
|
4
|
+
import { Checkbox } from 'antd';
|
6
5
|
import { useSetState } from 'ahooks';
|
7
6
|
import classNames from 'classnames';
|
8
7
|
import SearchTitle from "./SearchTitle";
|
@@ -62,7 +61,7 @@ var Cascader = props => {
|
|
62
61
|
})
|
63
62
|
}), /*#__PURE__*/_jsx("div", {
|
64
63
|
className: "pro-tree-modal-cascader-warp",
|
65
|
-
children: /*#__PURE__*/_jsx(
|
64
|
+
children: /*#__PURE__*/_jsx(Checkbox.Group, {
|
66
65
|
disabled: disabled,
|
67
66
|
style: {
|
68
67
|
width: '100%'
|
@@ -77,7 +76,7 @@ var Cascader = props => {
|
|
77
76
|
label: title,
|
78
77
|
searchStr: searchStr
|
79
78
|
})
|
80
|
-
}) : /*#__PURE__*/_jsx(
|
79
|
+
}) : /*#__PURE__*/_jsx(Checkbox, _objectSpread(_objectSpread({}, item), {}, {
|
81
80
|
onChange: e => handleOnChange(e, item[fieldNameValue]),
|
82
81
|
value: item[fieldNameValue],
|
83
82
|
children: /*#__PURE__*/_jsx("span", {
|