@zat-design/sisyphus-react 3.2.1 → 3.2.2-beta.2
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 +66 -35
- package/es/ProDownload/utils.js +0 -2
- package/es/ProDrawerForm/style/index.less +59 -59
- package/es/ProEditTable/components/RenderField/index.js +66 -21
- package/es/ProEditTable/index.js +11 -4
- package/es/ProEditTable/propsType.d.ts +11 -1
- package/es/ProForm/components/base/Checkbox/index.d.ts +1 -0
- package/es/ProForm/components/base/Checkbox/index.js +5 -3
- package/es/ProForm/components/base/DatePicker/index.js +3 -2
- package/es/ProForm/components/base/Input/index.js +4 -2
- package/es/ProForm/components/base/Input/propsType.d.ts +1 -0
- package/es/ProForm/components/base/InputNumber/index.d.ts +1 -0
- package/es/ProForm/components/base/InputNumber/index.js +5 -3
- package/es/ProForm/components/base/ProCascader/index.js +6 -6
- package/es/ProForm/components/base/Radio/index.d.ts +1 -0
- package/es/ProForm/components/base/Radio/index.js +4 -2
- package/es/ProForm/components/base/RangePicker/index.d.ts +1 -0
- package/es/ProForm/components/base/RangePicker/index.js +5 -3
- package/es/ProForm/components/base/Select/index.d.ts +1 -0
- package/es/ProForm/components/base/Select/index.js +4 -2
- package/es/ProForm/components/base/Switch/index.d.ts +1 -0
- package/es/ProForm/components/base/Switch/index.js +4 -2
- package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
- package/es/ProForm/components/base/SwitchCheckbox/index.js +4 -2
- package/es/ProForm/components/base/TextArea/index.d.ts +1 -0
- package/es/ProForm/components/base/TextArea/index.js +4 -3
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -0
- package/es/ProForm/components/base/TimePicker/index.js +4 -2
- package/es/ProForm/components/combination/Container/index.js +7 -5
- package/es/ProForm/components/combination/FormList/index.js +6 -5
- package/es/ProForm/components/combination/FormList/style/index.less +15 -22
- package/es/ProForm/components/combination/Group/index.js +6 -3
- package/es/ProForm/components/combination/ProAddressBar/index.js +29 -30
- package/es/ProForm/components/combination/ProCombination/index.js +11 -11
- package/es/ProForm/components/combination/ProModalSelect/index.js +4 -5
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProNumberRange/index.js +7 -7
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
- package/es/ProForm/components/combination/ProRangeLimit/index.js +4 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
- package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -2
- package/es/ProForm/components/render/Render.js +54 -20
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +13 -12
- package/es/ProForm/index.js +5 -2
- package/es/ProForm/propsType.d.ts +1 -0
- package/es/ProForm/style/index.less +49 -42
- package/es/ProForm/utils/contrastOriginal.d.ts +10 -1
- package/es/ProForm/utils/contrastOriginal.js +15 -18
- package/es/ProForm/utils/useChanged.d.ts +15 -1
- package/es/ProForm/utils/useChanged.js +27 -8
- package/es/ProLayout/components/ProFooter/style/index.less +8 -7
- package/es/ProLayout/components/ProHeader/index.js +1 -0
- package/es/ProLayout/components/ProHeader/style/index.less +7 -0
- package/es/ProSelect/index.js +6 -3
- package/es/ProStep/components/Item/index.js +1 -4
- package/es/ProTable/components/RenderColumn/index.js +1 -1
- package/es/ProTable/style/index.less +6 -0
- package/es/ProTabs/style/index.less +16 -17
- package/es/ProThemeTools/component/PrdTools/index.js +21 -20
- package/es/ProThemeTools/index.js +2 -1
- package/es/ProTree/components/Tree.js +43 -42
- package/es/ProTree/style/index.less +0 -6
- package/es/ProTreeModal/index.js +14 -3
- package/es/ProTreeSelect/index.js +3 -2
- package/es/locale/en_US.d.ts +15 -1
- package/es/locale/en_US.js +17 -3
- package/es/locale/zh_CN.d.ts +15 -1
- package/es/locale/zh_CN.js +15 -1
- package/es/style/theme/antd.less +129 -117
- package/lib/ProDrawerForm/style/index.less +59 -59
- package/lib/ProEditTable/components/RenderField/index.js +61 -22
- package/lib/ProEditTable/index.js +12 -4
- package/lib/ProEditTable/propsType.d.ts +11 -1
- package/lib/ProForm/components/base/Checkbox/index.d.ts +1 -0
- package/lib/ProForm/components/base/Checkbox/index.js +5 -3
- package/lib/ProForm/components/base/DatePicker/index.js +3 -2
- package/lib/ProForm/components/base/Input/index.js +4 -2
- package/lib/ProForm/components/base/Input/propsType.d.ts +1 -0
- package/lib/ProForm/components/base/InputNumber/index.d.ts +1 -0
- package/lib/ProForm/components/base/InputNumber/index.js +5 -3
- package/lib/ProForm/components/base/ProCascader/index.js +6 -6
- package/lib/ProForm/components/base/Radio/index.d.ts +1 -0
- package/lib/ProForm/components/base/Radio/index.js +4 -2
- package/lib/ProForm/components/base/RangePicker/index.d.ts +1 -0
- package/lib/ProForm/components/base/RangePicker/index.js +6 -4
- package/lib/ProForm/components/base/Select/index.d.ts +1 -0
- package/lib/ProForm/components/base/Select/index.js +4 -2
- package/lib/ProForm/components/base/Switch/index.d.ts +1 -0
- package/lib/ProForm/components/base/Switch/index.js +4 -2
- package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +4 -2
- package/lib/ProForm/components/base/TextArea/index.d.ts +1 -0
- package/lib/ProForm/components/base/TextArea/index.js +4 -3
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -0
- package/lib/ProForm/components/base/TimePicker/index.js +4 -2
- package/lib/ProForm/components/combination/Container/index.js +7 -5
- package/lib/ProForm/components/combination/FormList/index.js +6 -5
- package/lib/ProForm/components/combination/FormList/style/index.less +15 -22
- package/lib/ProForm/components/combination/Group/index.js +6 -3
- package/lib/ProForm/components/combination/ProAddressBar/index.js +29 -30
- package/lib/ProForm/components/combination/ProCombination/index.js +11 -11
- package/lib/ProForm/components/combination/ProModalSelect/index.js +4 -5
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProNumberRange/index.js +7 -7
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +4 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -2
- package/lib/ProForm/components/old/InputRange/index.js +1 -0
- package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
- package/lib/ProForm/components/render/Render.js +53 -22
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +13 -12
- package/lib/ProForm/index.js +5 -2
- package/lib/ProForm/propsType.d.ts +1 -0
- package/lib/ProForm/style/index.less +49 -42
- package/lib/ProForm/utils/contrastOriginal.d.ts +10 -1
- package/lib/ProForm/utils/contrastOriginal.js +14 -17
- package/lib/ProForm/utils/useChanged.d.ts +15 -1
- package/lib/ProForm/utils/useChanged.js +27 -8
- package/lib/ProLayout/components/ProFooter/style/index.less +8 -7
- package/lib/ProLayout/components/ProHeader/index.js +1 -0
- package/lib/ProLayout/components/ProHeader/style/index.less +7 -0
- package/lib/ProSelect/index.js +6 -3
- package/lib/ProStep/components/Item/index.js +1 -4
- package/lib/ProTable/components/RenderColumn/index.js +1 -1
- package/lib/ProTable/components/TableResizable/index.js +0 -8
- package/lib/ProTable/style/index.less +6 -0
- package/lib/ProTabs/index.js +0 -1
- package/lib/ProTabs/style/index.less +16 -17
- package/lib/ProThemeTools/component/PrdTools/index.js +21 -20
- package/lib/ProThemeTools/index.js +2 -2
- package/lib/ProTree/components/Tree.js +42 -48
- package/lib/ProTree/index.js +1 -0
- package/lib/ProTree/style/index.less +0 -6
- package/lib/ProTreeModal/components/Tree.js +0 -1
- package/lib/ProTreeModal/index.js +14 -3
- package/lib/ProTreeSelect/index.js +3 -2
- package/lib/ProUpload/index.js +0 -7
- package/lib/locale/en_US.d.ts +15 -1
- package/lib/locale/en_US.js +17 -3
- package/lib/locale/zh_CN.d.ts +15 -1
- package/lib/locale/zh_CN.js +15 -1
- package/lib/old/ProCertValidity/index.js +1 -1
- package/lib/style/theme/antd.less +129 -117
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
|
|
13
13
|
import { useState, useEffect } from 'react';
|
|
14
14
|
import { setThemes, setTableNoStripe } from '../../utils/index';
|
|
15
|
+
import locale from '../../../locale';
|
|
15
16
|
var connect = function connect(Component) {
|
|
16
17
|
var ComponentWrapper = function ComponentWrapper(props) {
|
|
17
18
|
return _jsx(Component, _objectSpread({}, props));
|
|
@@ -62,8 +63,8 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
62
63
|
}, []);
|
|
63
64
|
return _jsxs(NewDrawer, {
|
|
64
65
|
className: "pro-theme-prd-tools-drawer",
|
|
65
|
-
width:
|
|
66
|
-
title: "
|
|
66
|
+
width: 400,
|
|
67
|
+
title: "".concat(locale.ProThemeTools.title),
|
|
67
68
|
placement: "right",
|
|
68
69
|
onClose: onClose,
|
|
69
70
|
open: visible,
|
|
@@ -77,7 +78,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
77
78
|
}), _jsxs("div", {
|
|
78
79
|
className: "pro-theme-tools-space",
|
|
79
80
|
children: [_jsx("p", {
|
|
80
|
-
children: "
|
|
81
|
+
children: "".concat(locale.ProThemeTools.themeColor)
|
|
81
82
|
}), _jsx("ul", {
|
|
82
83
|
className: "pro-theme-color",
|
|
83
84
|
children: active.map(function (item, index) {
|
|
@@ -108,7 +109,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
108
109
|
children: [_jsx("div", {
|
|
109
110
|
className: "pro-theme-tools-item",
|
|
110
111
|
children: _jsx("p", {
|
|
111
|
-
children: "
|
|
112
|
+
children: "".concat(locale.ProThemeTools.layout)
|
|
112
113
|
})
|
|
113
114
|
}), _jsx("div", {
|
|
114
115
|
className: "pro-theme-tools-item",
|
|
@@ -124,13 +125,13 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
124
125
|
},
|
|
125
126
|
children: [_jsx(_Radio.Button, {
|
|
126
127
|
value: 0.5,
|
|
127
|
-
children: "
|
|
128
|
+
children: "".concat(locale.ProThemeTools.layoutMode[0])
|
|
128
129
|
}), _jsx(_Radio.Button, {
|
|
129
130
|
value: 1,
|
|
130
|
-
children: "
|
|
131
|
+
children: "".concat(locale.ProThemeTools.layoutMode[1])
|
|
131
132
|
}), _jsx(_Radio.Button, {
|
|
132
133
|
value: 1.5,
|
|
133
|
-
children: "
|
|
134
|
+
children: "".concat(locale.ProThemeTools.layoutMode[2])
|
|
134
135
|
})]
|
|
135
136
|
})
|
|
136
137
|
})]
|
|
@@ -139,7 +140,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
139
140
|
children: [_jsx("div", {
|
|
140
141
|
className: "pro-theme-tools-item",
|
|
141
142
|
children: _jsx("p", {
|
|
142
|
-
children: "
|
|
143
|
+
children: "".concat(locale.ProThemeTools.formLabel)
|
|
143
144
|
})
|
|
144
145
|
}), _jsx("div", {
|
|
145
146
|
className: "pro-theme-tools-item",
|
|
@@ -176,10 +177,10 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
176
177
|
},
|
|
177
178
|
children: [_jsx(_Radio.Button, {
|
|
178
179
|
value: "left",
|
|
179
|
-
children: "
|
|
180
|
+
children: "".concat(locale.ProThemeTools.flex[0])
|
|
180
181
|
}), _jsx(_Radio.Button, {
|
|
181
182
|
value: "right",
|
|
182
|
-
children: "
|
|
183
|
+
children: "".concat(locale.ProThemeTools.flex[1])
|
|
183
184
|
})]
|
|
184
185
|
})
|
|
185
186
|
})]
|
|
@@ -188,13 +189,13 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
188
189
|
children: [_jsx("div", {
|
|
189
190
|
className: "pro-theme-tools-item",
|
|
190
191
|
children: _jsx("p", {
|
|
191
|
-
children: "
|
|
192
|
+
children: "".concat(locale.ProThemeTools.bigText)
|
|
192
193
|
})
|
|
193
194
|
}), _jsx("div", {
|
|
194
195
|
className: "pro-theme-tools-item",
|
|
195
196
|
children: _jsx(_Switch, {
|
|
196
|
-
checkedChildren: "
|
|
197
|
-
unCheckedChildren: "
|
|
197
|
+
checkedChildren: "".concat(locale.ProThemeTools.switchText[0]),
|
|
198
|
+
unCheckedChildren: "".concat(locale.ProThemeTools.switchText[1]),
|
|
198
199
|
checked: state.zauiBigText,
|
|
199
200
|
onClick: function onClick(value) {
|
|
200
201
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
@@ -212,13 +213,13 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
212
213
|
children: [_jsx("div", {
|
|
213
214
|
className: "pro-theme-tools-item",
|
|
214
215
|
children: _jsx("p", {
|
|
215
|
-
children: "
|
|
216
|
+
children: "".concat(locale.ProThemeTools.tableBorder)
|
|
216
217
|
})
|
|
217
218
|
}), _jsx("div", {
|
|
218
219
|
className: "pro-theme-tools-item",
|
|
219
220
|
children: _jsx(_Switch, {
|
|
220
|
-
checkedChildren: "
|
|
221
|
-
unCheckedChildren: "
|
|
221
|
+
checkedChildren: "".concat(locale.ProThemeTools.switchText[0]),
|
|
222
|
+
unCheckedChildren: "".concat(locale.ProThemeTools.switchText[1]),
|
|
222
223
|
checked: state.zauiTableBorder,
|
|
223
224
|
onClick: function onClick(value) {
|
|
224
225
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
@@ -235,13 +236,13 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
235
236
|
children: [_jsx("div", {
|
|
236
237
|
className: "pro-theme-tools-item",
|
|
237
238
|
children: _jsx("p", {
|
|
238
|
-
children: "
|
|
239
|
+
children: "".concat(locale.ProThemeTools.tableStripe)
|
|
239
240
|
})
|
|
240
241
|
}), _jsx("div", {
|
|
241
242
|
className: "pro-theme-tools-item",
|
|
242
243
|
children: _jsx(_Switch, {
|
|
243
|
-
checkedChildren: "
|
|
244
|
-
unCheckedChildren: "
|
|
244
|
+
checkedChildren: "".concat(locale.ProThemeTools.switchText[0]),
|
|
245
|
+
unCheckedChildren: "".concat(locale.ProThemeTools.switchText[1]),
|
|
245
246
|
checked: state.zauiStripe,
|
|
246
247
|
onClick: function onClick(value) {
|
|
247
248
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
@@ -272,7 +273,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
272
273
|
}]);
|
|
273
274
|
onReset();
|
|
274
275
|
},
|
|
275
|
-
children: "
|
|
276
|
+
children: "".concat(locale.ProThemeTools.reset)
|
|
276
277
|
})]
|
|
277
278
|
});
|
|
278
279
|
};
|
|
@@ -14,6 +14,7 @@ import { useEffect, useState } from 'react';
|
|
|
14
14
|
import classnames from 'classnames';
|
|
15
15
|
import { getKebabCase, setThemes, setTableNoStripe, setTableBorder, getMapKebabCase, getMapHumpCase } from './utils/index';
|
|
16
16
|
import { PrdTools } from './component';
|
|
17
|
+
import locale from '../locale';
|
|
17
18
|
var defaultCacheTime = 1; // 配置保存时间为一天
|
|
18
19
|
var defaultThemeConfig = {
|
|
19
20
|
zauiBrand: '#006AFF',
|
|
@@ -89,7 +90,7 @@ var ProThemeTools = function ProThemeTools(_ref) {
|
|
|
89
90
|
input.select();
|
|
90
91
|
if (document.execCommand('copy')) {
|
|
91
92
|
document.execCommand('copy');
|
|
92
|
-
_message.success(
|
|
93
|
+
_message.success("".concat(locale.ProThemeTools.copySuccess));
|
|
93
94
|
}
|
|
94
95
|
document.body.removeChild(input);
|
|
95
96
|
};
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
*@Description: 树每行节点渲染组件,复选时阻止点击事件冒泡,只有点击树节点文本会向上触发onSelect事件
|
|
15
15
|
*/
|
|
16
16
|
/* eslint-disable no-plusplus */
|
|
17
|
-
import React, { useEffect,
|
|
17
|
+
import React, { useEffect, useState } from 'react';
|
|
18
18
|
import { useSetState } from 'ahooks';
|
|
19
19
|
import { CaretDownOutlined } from '@ant-design/icons';
|
|
20
20
|
import SearchTitle from './SearchTitle';
|
|
@@ -125,7 +125,7 @@ function List(props) {
|
|
|
125
125
|
_useState2 = _slicedToArray(_useState, 2),
|
|
126
126
|
open = _useState2[0],
|
|
127
127
|
setOpen = _useState2[1];
|
|
128
|
-
var operateButton = menu && menu(item === null || item === void 0 ? void 0 : item
|
|
128
|
+
var operateButton = menu && menu(item === null || item === void 0 ? void 0 : item[fieldNameValue], item);
|
|
129
129
|
operateButton === null || operateButton === void 0 ? void 0 : operateButton.map(function (item, i) {
|
|
130
130
|
return _jsx(React.Fragment, {
|
|
131
131
|
children: item
|
|
@@ -263,32 +263,19 @@ function List(props) {
|
|
|
263
263
|
})]
|
|
264
264
|
}, onlyKey);
|
|
265
265
|
};
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
return {
|
|
280
|
-
title: _jsx(TreeNodeRow, {
|
|
281
|
-
nodeClass: nodeClass,
|
|
282
|
-
item: item,
|
|
283
|
-
index: index,
|
|
284
|
-
title: title,
|
|
285
|
-
isChecked: isChecked,
|
|
286
|
-
onlyKey: item[fieldNameValue]
|
|
287
|
-
}),
|
|
288
|
-
key: item[fieldNameValue],
|
|
289
|
-
children: loop(item[fieldNames.children], index)
|
|
290
|
-
};
|
|
291
|
-
}
|
|
266
|
+
// const _treeData = useMemo(() => {
|
|
267
|
+
function fn() {
|
|
268
|
+
var loop = function loop(data, index) {
|
|
269
|
+
index++;
|
|
270
|
+
var treeRow = data.map(function (item) {
|
|
271
|
+
var nodeClass = 'pro-tree-tree-node ';
|
|
272
|
+
var isChecked = false;
|
|
273
|
+
if (currentClickTreeNode === item[fieldNameValue]) {
|
|
274
|
+
nodeClass += ' checked';
|
|
275
|
+
isChecked = true;
|
|
276
|
+
}
|
|
277
|
+
var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]) : item[fieldNameLabel];
|
|
278
|
+
if (item[fieldNames.children]) {
|
|
292
279
|
return {
|
|
293
280
|
title: _jsx(TreeNodeRow, {
|
|
294
281
|
nodeClass: nodeClass,
|
|
@@ -298,23 +285,37 @@ function List(props) {
|
|
|
298
285
|
isChecked: isChecked,
|
|
299
286
|
onlyKey: item[fieldNameValue]
|
|
300
287
|
}),
|
|
301
|
-
key: item[fieldNameValue]
|
|
288
|
+
key: item[fieldNameValue],
|
|
289
|
+
children: loop(item[fieldNames.children], index)
|
|
302
290
|
};
|
|
303
|
-
}
|
|
304
|
-
return
|
|
305
|
-
|
|
291
|
+
}
|
|
292
|
+
return {
|
|
293
|
+
title: _jsx(TreeNodeRow, {
|
|
294
|
+
nodeClass: nodeClass,
|
|
295
|
+
item: item,
|
|
296
|
+
index: index,
|
|
297
|
+
title: title,
|
|
298
|
+
isChecked: isChecked,
|
|
299
|
+
onlyKey: item[fieldNameValue]
|
|
300
|
+
}),
|
|
301
|
+
key: item[fieldNameValue]
|
|
302
|
+
};
|
|
303
|
+
});
|
|
304
|
+
return treeRow; // .filter((item) => item);
|
|
305
|
+
};
|
|
306
306
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
return loop(newTreeData, -1);
|
|
307
|
+
if ((other === null || other === void 0 ? void 0 : other.mode) === 'view') {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
var newTreeData = originalTreeData;
|
|
311
|
+
if (searchStr) {
|
|
312
|
+
newTreeData = filterCheckedNodes(originalTreeData, [], searchStr, fieldNames);
|
|
315
313
|
}
|
|
316
|
-
return
|
|
317
|
-
}
|
|
314
|
+
return loop(newTreeData, -1);
|
|
315
|
+
}
|
|
316
|
+
// return fn();
|
|
317
|
+
// }, [searchStr, expandedKeys, showCodeName, originalTreeData, currentClickTreeNode]);
|
|
318
|
+
var _treeData = fn();
|
|
318
319
|
var onExpand = function onExpand(newExpandedKeys) {
|
|
319
320
|
setState({
|
|
320
321
|
expandedKeys: newExpandedKeys,
|
|
@@ -315,12 +315,6 @@
|
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
// 中意全局样式覆盖
|
|
319
|
-
// .pro-form.pro-form-view .ant-form-item * {
|
|
320
|
-
// line-height: 1!important;
|
|
321
|
-
// height: auto!important;
|
|
322
|
-
// min-height: auto!important;
|
|
323
|
-
// }
|
|
324
318
|
// 重置ant-form view模式样式ant-tree样式
|
|
325
319
|
.pro-form.pro-form-view .ant-form-item .pro-tree * {
|
|
326
320
|
line-height: 1 !important;
|
package/es/ProTreeModal/index.js
CHANGED
|
@@ -77,6 +77,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
77
77
|
var _useSetState = useSetState({
|
|
78
78
|
open: false,
|
|
79
79
|
checkedValues: [],
|
|
80
|
+
beforeClearAllValues: [],
|
|
80
81
|
treeData: [],
|
|
81
82
|
treeViewData: [],
|
|
82
83
|
originalTreeData: [],
|
|
@@ -263,6 +264,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
263
264
|
}) : [];
|
|
264
265
|
setState({
|
|
265
266
|
checkedValues: _checkedValues,
|
|
267
|
+
beforeClearAllValues: state.checkedValues,
|
|
266
268
|
treeViewData: [],
|
|
267
269
|
checkAll: false
|
|
268
270
|
});
|
|
@@ -271,9 +273,18 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
271
273
|
* Drawer close
|
|
272
274
|
*/
|
|
273
275
|
var handleClose = function handleClose() {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
276
|
+
var _state$beforeClearAll;
|
|
277
|
+
if ((_state$beforeClearAll = state.beforeClearAllValues) === null || _state$beforeClearAll === void 0 ? void 0 : _state$beforeClearAll.length) {
|
|
278
|
+
setState({
|
|
279
|
+
open: false,
|
|
280
|
+
checkedValues: state.beforeClearAllValues,
|
|
281
|
+
beforeClearAllValues: []
|
|
282
|
+
});
|
|
283
|
+
} else {
|
|
284
|
+
setState({
|
|
285
|
+
open: false
|
|
286
|
+
});
|
|
287
|
+
}
|
|
277
288
|
openChange === null || openChange === void 0 ? void 0 : openChange(false);
|
|
278
289
|
};
|
|
279
290
|
/**
|
|
@@ -145,9 +145,10 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
145
145
|
_message.error(msg);
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
+
var resultData = transferDataSource(data, showCodeName);
|
|
148
149
|
setState({
|
|
149
|
-
selectList:
|
|
150
|
-
origDataSource:
|
|
150
|
+
selectList: resultData || [],
|
|
151
|
+
origDataSource: resultData || []
|
|
151
152
|
});
|
|
152
153
|
};
|
|
153
154
|
// 配置了异步数据源,拉取枚举数据逻辑 如果有code不掉接口从local里根据code取值
|
package/es/locale/en_US.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ declare const _default: {
|
|
|
38
38
|
errorMessage: string;
|
|
39
39
|
defaultTitle: string;
|
|
40
40
|
};
|
|
41
|
-
ProWaterMark: {};
|
|
42
41
|
ProTable: {
|
|
43
42
|
noData: string;
|
|
44
43
|
resetColumnWidth: string;
|
|
@@ -94,6 +93,7 @@ declare const _default: {
|
|
|
94
93
|
save: string;
|
|
95
94
|
custom: string;
|
|
96
95
|
operation: string;
|
|
96
|
+
total: string;
|
|
97
97
|
onlyOneLineMsg: string;
|
|
98
98
|
deletePoConfirmMsg: string;
|
|
99
99
|
mulDeletePoConfirmMsg: string;
|
|
@@ -134,5 +134,19 @@ declare const _default: {
|
|
|
134
134
|
ProTimeLimit: {
|
|
135
135
|
foreverText: string;
|
|
136
136
|
};
|
|
137
|
+
ProThemeTools: {
|
|
138
|
+
title: string;
|
|
139
|
+
copySuccess: string;
|
|
140
|
+
layout: string;
|
|
141
|
+
layoutMode: string[];
|
|
142
|
+
themeColor: string;
|
|
143
|
+
formLabel: string;
|
|
144
|
+
bigText: string;
|
|
145
|
+
flex: string[];
|
|
146
|
+
switchText: string[];
|
|
147
|
+
tableBorder: string;
|
|
148
|
+
tableStripe: string;
|
|
149
|
+
reset: string;
|
|
150
|
+
};
|
|
137
151
|
};
|
|
138
152
|
export default _default;
|
package/es/locale/en_US.js
CHANGED
|
@@ -38,7 +38,6 @@ export default {
|
|
|
38
38
|
errorMessage: 'The configuration config for ProAction must be data',
|
|
39
39
|
defaultTitle: 'Are you sure delete it?'
|
|
40
40
|
},
|
|
41
|
-
ProWaterMark: {},
|
|
42
41
|
ProTable: {
|
|
43
42
|
noData: 'No data',
|
|
44
43
|
resetColumnWidth: 'Reset column width',
|
|
@@ -94,6 +93,7 @@ export default {
|
|
|
94
93
|
save: 'Save',
|
|
95
94
|
custom: 'Custom',
|
|
96
95
|
operation: 'Operation',
|
|
96
|
+
total: '{total} items in total',
|
|
97
97
|
onlyOneLineMsg: 'Please save the data first',
|
|
98
98
|
deletePoConfirmMsg: 'Are you sure you want to delete this row of data?',
|
|
99
99
|
mulDeletePoConfirmMsg: 'Are you sure you want to delete the selected data?'
|
|
@@ -120,12 +120,12 @@ export default {
|
|
|
120
120
|
ProTreeModal: {
|
|
121
121
|
checkMsg: 'Please check first',
|
|
122
122
|
select: 'Please select',
|
|
123
|
-
input: '
|
|
123
|
+
input: 'Please enter',
|
|
124
124
|
errorArrayMessage: 'Please return a valid array',
|
|
125
125
|
selectMin: 'Select at least {min}',
|
|
126
126
|
selectMax: 'Select at most {max} items',
|
|
127
127
|
noCheck: 'None selected yet',
|
|
128
|
-
checkAll: '
|
|
128
|
+
checkAll: 'Select all',
|
|
129
129
|
check: 'selected',
|
|
130
130
|
clearAll: 'Clear all',
|
|
131
131
|
checkNumber: '{num} items selected',
|
|
@@ -133,5 +133,19 @@ export default {
|
|
|
133
133
|
},
|
|
134
134
|
ProTimeLimit: {
|
|
135
135
|
foreverText: 'long term'
|
|
136
|
+
},
|
|
137
|
+
ProThemeTools: {
|
|
138
|
+
title: 'Global style customization ',
|
|
139
|
+
copySuccess: 'Copy success! ',
|
|
140
|
+
layout: 'Layout',
|
|
141
|
+
layoutMode: ['Compact ', 'Regular', 'Loose'],
|
|
142
|
+
themeColor: 'Theme color',
|
|
143
|
+
formLabel: 'Form label',
|
|
144
|
+
bigText: 'Large text mode',
|
|
145
|
+
flex: ['Left align ', 'Right align'],
|
|
146
|
+
switchText: ['on', 'off'],
|
|
147
|
+
tableBorder: 'Table border',
|
|
148
|
+
tableStripe: 'Table zebra',
|
|
149
|
+
reset: 'Reset'
|
|
136
150
|
}
|
|
137
151
|
};
|
package/es/locale/zh_CN.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ declare const _default: {
|
|
|
38
38
|
errorMessage: string;
|
|
39
39
|
defaultTitle: string;
|
|
40
40
|
};
|
|
41
|
-
ProWaterMark: {};
|
|
42
41
|
ProTable: {
|
|
43
42
|
noData: string;
|
|
44
43
|
resetColumnWidth: string;
|
|
@@ -94,6 +93,7 @@ declare const _default: {
|
|
|
94
93
|
operation: string;
|
|
95
94
|
noData: string;
|
|
96
95
|
clickAdd: string;
|
|
96
|
+
total: string;
|
|
97
97
|
onlyOneLineMsg: string;
|
|
98
98
|
deletePoConfirmMsg: string;
|
|
99
99
|
mulDeletePoConfirmMsg: string;
|
|
@@ -133,5 +133,19 @@ declare const _default: {
|
|
|
133
133
|
ProTimeLimit: {
|
|
134
134
|
foreverText: string;
|
|
135
135
|
};
|
|
136
|
+
ProThemeTools: {
|
|
137
|
+
title: string;
|
|
138
|
+
copySuccess: string;
|
|
139
|
+
layout: string;
|
|
140
|
+
layoutMode: string[];
|
|
141
|
+
themeColor: string;
|
|
142
|
+
formLabel: string;
|
|
143
|
+
bigText: string;
|
|
144
|
+
flex: string[];
|
|
145
|
+
switchText: string[];
|
|
146
|
+
tableBorder: string;
|
|
147
|
+
tableStripe: string;
|
|
148
|
+
reset: string;
|
|
149
|
+
};
|
|
136
150
|
};
|
|
137
151
|
export default _default;
|
package/es/locale/zh_CN.js
CHANGED
|
@@ -38,7 +38,6 @@ export default {
|
|
|
38
38
|
errorMessage: 'ProAction 配置 config 必须为数据',
|
|
39
39
|
defaultTitle: '确认删除吗?'
|
|
40
40
|
},
|
|
41
|
-
ProWaterMark: {},
|
|
42
41
|
ProTable: {
|
|
43
42
|
noData: '暂无数据',
|
|
44
43
|
resetColumnWidth: '重置列宽',
|
|
@@ -94,6 +93,7 @@ export default {
|
|
|
94
93
|
operation: '操作',
|
|
95
94
|
noData: '暂无数据',
|
|
96
95
|
clickAdd: '点击添加',
|
|
96
|
+
total: '共{total}条',
|
|
97
97
|
onlyOneLineMsg: '请先保存数据',
|
|
98
98
|
deletePoConfirmMsg: '您确定要删除该行数据吗?',
|
|
99
99
|
mulDeletePoConfirmMsg: '您确定要删除选中的数据吗?'
|
|
@@ -132,5 +132,19 @@ export default {
|
|
|
132
132
|
},
|
|
133
133
|
ProTimeLimit: {
|
|
134
134
|
foreverText: '长期'
|
|
135
|
+
},
|
|
136
|
+
ProThemeTools: {
|
|
137
|
+
title: '全局样式自定义',
|
|
138
|
+
copySuccess: '复制成功!',
|
|
139
|
+
layout: '布局',
|
|
140
|
+
layoutMode: ['紧凑', '常规', '宽松'],
|
|
141
|
+
themeColor: '主题色',
|
|
142
|
+
formLabel: '表单标题',
|
|
143
|
+
bigText: '大字号模式',
|
|
144
|
+
flex: ['左对齐', '右对齐'],
|
|
145
|
+
switchText: ['开', '关'],
|
|
146
|
+
tableBorder: '表格边框',
|
|
147
|
+
tableStripe: '表格斑马纹',
|
|
148
|
+
reset: '重置'
|
|
135
149
|
}
|
|
136
150
|
};
|