@vtx/components 4.0.0-beta.8 → 4.0.0-beta.80
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/index.js +3 -0
- package/es/utils/filterSpecialCharacters.js +47 -46
- package/es/utils/index.js +1 -2
- package/es/vtx-combogrid/Combogrid.js +5 -4
- package/es/vtx-combogrid/index.js +7 -4
- package/es/vtx-datagrid/Store/Provide.js +106 -137
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/es/vtx-datagrid/columnState.js +91 -0
- package/es/vtx-datagrid/index.js +124 -32
- package/es/vtx-datagrid/mergeComponents.js +15 -0
- package/es/vtx-datagrid/renderColumnButtons.js +30 -11
- package/es/vtx-datagrid/style/index.js +102 -20
- package/es/vtx-date-picker/QdatePicker.js +1 -1
- package/es/vtx-descriptions/Descriptions.js +29 -0
- package/es/vtx-descriptions/index.js +3 -0
- package/es/vtx-descriptions/style/index.js +19 -0
- package/es/vtx-ellipsis-text/index.js +7 -2
- package/es/vtx-ellipsis-text/style/index.js +3 -1
- package/es/vtx-export/index.js +25 -25
- package/es/vtx-export-async/History.js +11 -3
- package/es/vtx-export-async/index.js +45 -15
- package/es/vtx-export-async/util.js +16 -5
- package/es/vtx-form-layout/Card.js +10 -10
- package/es/vtx-form-layout/Divider.js +1 -1
- package/es/vtx-form-layout/FormItem.js +16 -16
- package/es/vtx-form-layout/Pane.js +23 -12
- package/es/vtx-icon/index.js +54 -45
- package/es/vtx-icon/index.js1 +90 -0
- package/es/vtx-image/Preview.js +11 -6
- package/es/vtx-image/style/index.js +0 -1
- package/es/vtx-import/index.js +207 -65
- package/es/vtx-import/result.js +28 -26
- package/es/vtx-import/style/index.js +16 -1
- package/es/vtx-import2/Content.js +2 -1
- package/es/vtx-import2/index.js +30 -19
- package/es/vtx-import2/style/index.js +60 -9
- package/es/vtx-modal/index.js +9 -4
- package/es/vtx-page-layout/style/index.js +4 -2
- package/es/vtx-provider/index.js +7 -3
- package/es/vtx-provider/locale/en_US.js +57 -3
- package/es/vtx-provider/locale/zh_CN.js +57 -3
- package/es/vtx-search/index.js +13 -9
- package/es/vtx-search/style/index.js +2 -1
- package/es/vtx-select/index.js +102 -36
- package/es/vtx-select/style/index.js +11 -56
- package/es/vtx-signature/index.js +5 -4
- package/es/vtx-signature/style/index.js +1 -1
- package/es/vtx-split-pane/Resizer.js +0 -1
- package/es/vtx-split-pane/SplitPane.js +42 -34
- package/es/vtx-split-pane/style/index.js +8 -112
- package/es/vtx-time-picker/index.js +27 -1
- package/es/vtx-transfer/Transfer.js +29 -0
- package/es/vtx-transfer/index.js +3 -0
- package/es/vtx-transfer/style/index.js +19 -0
- package/es/vtx-transfer-select/TransferSelect.js +143 -0
- package/es/vtx-transfer-select/index.js +3 -0
- package/es/vtx-transfer-select/style/index.js +19 -0
- package/es/vtx-tree/index.js +98 -35
- package/es/vtx-tree-select/index.js +71 -105
- package/es/vtx-tree-select/style/index.js +9 -3
- package/es/vtx-upload/FilePreview.js +2 -1
- package/es/vtx-wang-editor/index.js +93 -39
- package/es/vtx-wang-editor/wangEditorUtil.js +4 -0
- package/lib/index.js +36 -0
- package/lib/utils/filterSpecialCharacters.js +48 -46
- package/lib/utils/index.js +0 -7
- package/lib/vtx-combogrid/Combogrid.js +5 -4
- package/lib/vtx-combogrid/index.js +7 -4
- package/lib/vtx-datagrid/Store/Provide.js +113 -143
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/lib/vtx-datagrid/columnState.js +100 -0
- package/lib/vtx-datagrid/index.js +124 -32
- package/lib/vtx-datagrid/mergeComponents.js +21 -0
- package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
- package/lib/vtx-datagrid/style/index.js +102 -20
- package/lib/vtx-date-picker/QdatePicker.js +1 -1
- package/lib/vtx-descriptions/Descriptions.js +38 -0
- package/lib/vtx-descriptions/index.js +15 -0
- package/lib/vtx-descriptions/style/index.js +25 -0
- package/lib/vtx-ellipsis-text/index.js +7 -2
- package/lib/vtx-ellipsis-text/style/index.js +3 -1
- package/lib/vtx-export/index.js +26 -26
- package/lib/vtx-export-async/History.js +11 -3
- package/lib/vtx-export-async/index.js +43 -13
- package/lib/vtx-export-async/util.js +16 -5
- package/lib/vtx-form-layout/Card.js +9 -9
- package/lib/vtx-form-layout/Divider.js +1 -1
- package/lib/vtx-form-layout/FormItem.js +16 -16
- package/lib/vtx-form-layout/Pane.js +22 -11
- package/lib/vtx-icon/index.js +54 -52
- package/lib/vtx-icon/index.js1 +90 -0
- package/lib/vtx-image/Preview.js +11 -6
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-import/index.js +205 -63
- package/lib/vtx-import/result.js +29 -27
- package/lib/vtx-import/style/index.js +16 -1
- package/lib/vtx-import2/Content.js +2 -1
- package/lib/vtx-import2/index.js +29 -18
- package/lib/vtx-import2/style/index.js +60 -9
- package/lib/vtx-modal/index.js +9 -4
- package/lib/vtx-page-layout/style/index.js +4 -2
- package/lib/vtx-provider/index.js +7 -3
- package/lib/vtx-provider/locale/en_US.js +57 -3
- package/lib/vtx-provider/locale/zh_CN.js +57 -3
- package/lib/vtx-search/index.js +13 -9
- package/lib/vtx-search/style/index.js +2 -1
- package/lib/vtx-select/index.js +104 -38
- package/lib/vtx-select/style/index.js +11 -56
- package/lib/vtx-signature/index.js +4 -3
- package/lib/vtx-signature/style/index.js +1 -1
- package/lib/vtx-split-pane/Resizer.js +0 -1
- package/lib/vtx-split-pane/SplitPane.js +40 -31
- package/lib/vtx-split-pane/style/index.js +8 -112
- package/lib/vtx-time-picker/index.js +27 -1
- package/lib/vtx-transfer/Transfer.js +38 -0
- package/lib/vtx-transfer/index.js +15 -0
- package/lib/vtx-transfer/style/index.js +25 -0
- package/lib/vtx-transfer-select/TransferSelect.js +151 -0
- package/lib/vtx-transfer-select/index.js +15 -0
- package/lib/vtx-transfer-select/style/index.js +25 -0
- package/lib/vtx-tree/index.js +96 -33
- package/lib/vtx-tree-select/index.js +71 -105
- package/lib/vtx-tree-select/style/index.js +9 -3
- package/lib/vtx-upload/FilePreview.js +2 -1
- package/lib/vtx-wang-editor/index.js +91 -37
- package/lib/vtx-wang-editor/wangEditorUtil.js +4 -0
- package/package.json +47 -32
- package/es/utils/hooks/useFetchData/index.js +0 -82
- package/lib/utils/hooks/useFetchData/index.js +0 -89
package/es/vtx-import2/index.js
CHANGED
|
@@ -26,15 +26,17 @@ import getToken from "../utils/getToken";
|
|
|
26
26
|
import getSignature from '@vtx/utils/lib/getSignature';
|
|
27
27
|
import useSet from "../utils/useSet";
|
|
28
28
|
import md5 from 'md5';
|
|
29
|
-
import { getVtxToken } from '@vtx/utils';
|
|
29
|
+
import { getVtxToken, getUrlParam } from '@vtx/utils';
|
|
30
30
|
import classnames from 'classnames';
|
|
31
31
|
import { useStyle } from "./style/index";
|
|
32
32
|
import { VtxProvider, useIntl } from "../vtx-provider";
|
|
33
|
+
import VtxModal from "../vtx-modal";
|
|
33
34
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
35
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
36
|
function getFileName() {
|
|
36
37
|
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
37
|
-
var
|
|
38
|
+
var _ref = arguments.length > 1 ? arguments[1] : undefined,
|
|
39
|
+
intl = _ref.intl;
|
|
38
40
|
var index = name.lastIndexOf('.');
|
|
39
41
|
var suffix = name.substring(index);
|
|
40
42
|
return name.substring(0, index) + "(".concat(intl.getMessage('import.errorFile', '错误文件'), ")") + suffix;
|
|
@@ -43,17 +45,20 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
43
45
|
var intl = useIntl();
|
|
44
46
|
var _useContext = useContext(VtxProvider),
|
|
45
47
|
getPrefixCls = _useContext.getPrefixCls;
|
|
46
|
-
var prefixCls = getPrefixCls('
|
|
48
|
+
var prefixCls = getPrefixCls('', 'vtx-import2');
|
|
47
49
|
var _useStyle = useStyle(prefixCls),
|
|
48
50
|
wrapSSR = _useStyle.wrapSSR,
|
|
49
51
|
hashId = _useStyle.hashId;
|
|
50
52
|
var visible = props.visible,
|
|
51
53
|
close = props.close,
|
|
52
54
|
title = props.title,
|
|
53
|
-
accept = props.accept,
|
|
54
|
-
|
|
55
|
+
_props$accept = props.accept,
|
|
56
|
+
accept = _props$accept === void 0 ? 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv' : _props$accept,
|
|
57
|
+
_props$fileKey = props.fileKey,
|
|
58
|
+
fileKey = _props$fileKey === void 0 ? 'file' : _props$fileKey,
|
|
55
59
|
uploadURL = props.uploadURL,
|
|
56
|
-
postData = props.postData,
|
|
60
|
+
_props$postData = props.postData,
|
|
61
|
+
postData = _props$postData === void 0 ? {} : _props$postData,
|
|
57
62
|
errorURL = props.errorURL,
|
|
58
63
|
templateURL = props.templateURL,
|
|
59
64
|
afterUpload = props.afterUpload,
|
|
@@ -132,7 +137,7 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
132
137
|
state = _useSet2[0],
|
|
133
138
|
setState = _useSet2[1];
|
|
134
139
|
var token = getToken();
|
|
135
|
-
if (
|
|
140
|
+
if (props.token) {
|
|
136
141
|
token = props.token;
|
|
137
142
|
}
|
|
138
143
|
var newErrorDownloadName = errorDownloadName;
|
|
@@ -147,7 +152,9 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
147
152
|
}, interval);
|
|
148
153
|
useEffect(function () {
|
|
149
154
|
if (fileList.length !== 0) {
|
|
150
|
-
fileName.current = getFileName(fileList[0].name
|
|
155
|
+
fileName.current = getFileName(fileList[0].name, {
|
|
156
|
+
intl: intl
|
|
157
|
+
});
|
|
151
158
|
}
|
|
152
159
|
}, [fileList]);
|
|
153
160
|
|
|
@@ -202,6 +209,8 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
202
209
|
};
|
|
203
210
|
// 发送请求
|
|
204
211
|
xhr.open('POST', '/cloudFile/common/uploadChunk', true);
|
|
212
|
+
xhr.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
|
|
213
|
+
xhr.setRequestHeader('access_token', token ? "".concat(token) : '');
|
|
205
214
|
xhr.send(list[indexRef.current]);
|
|
206
215
|
} else {
|
|
207
216
|
mergeFile();
|
|
@@ -227,6 +236,8 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
227
236
|
};
|
|
228
237
|
// 发送请求
|
|
229
238
|
xhr.open('POST', '/cloudFile/common/mergeChunk', true);
|
|
239
|
+
xhr.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
|
|
240
|
+
xhr.setRequestHeader('access_token', token ? "".concat(token) : '');
|
|
230
241
|
var data = new FormData();
|
|
231
242
|
data.append('chunkId', state.chunkId);
|
|
232
243
|
data.append('tenantId', getVtxToken('tenantId'));
|
|
@@ -247,6 +258,7 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
247
258
|
}
|
|
248
259
|
request.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
|
|
249
260
|
request.setRequestHeader('access_token', token ? "".concat(token) : '');
|
|
261
|
+
request.setRequestHeader('systemCode', getUrlParam('systemCode') ? getUrlParam('systemCode') : '');
|
|
250
262
|
// 添加操作日志
|
|
251
263
|
request.setRequestHeader('operation', encodeURIComponent(JSON.stringify({
|
|
252
264
|
menuId: sessionStorage.getItem('vtxmenuselectedKeys'),
|
|
@@ -329,9 +341,9 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
329
341
|
}
|
|
330
342
|
}
|
|
331
343
|
};
|
|
332
|
-
var onUpload = function onUpload(
|
|
333
|
-
var
|
|
334
|
-
files =
|
|
344
|
+
var onUpload = function onUpload(_ref2) {
|
|
345
|
+
var _ref2$files = _ref2.files,
|
|
346
|
+
files = _ref2$files === void 0 ? fileList : _ref2$files;
|
|
335
347
|
if (typeof props.beforeUpload === 'function') {
|
|
336
348
|
var flag = beforeUpload(files[0]);
|
|
337
349
|
if (!flag) {
|
|
@@ -366,7 +378,10 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
366
378
|
var modelProps = {
|
|
367
379
|
open: visible,
|
|
368
380
|
width: width || 392,
|
|
369
|
-
maskClosable: false,
|
|
381
|
+
// maskClosable: false,
|
|
382
|
+
mask: {
|
|
383
|
+
closable: false
|
|
384
|
+
},
|
|
370
385
|
footer: [/*#__PURE__*/_jsx(Button, {
|
|
371
386
|
onClick: close,
|
|
372
387
|
children: "".concat(TextEnum.btnCloseText).concat(status === 1 && result ? '(' + countdown + ')' : '')
|
|
@@ -388,7 +403,7 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
388
403
|
})]
|
|
389
404
|
})
|
|
390
405
|
};
|
|
391
|
-
return wrapSSR( /*#__PURE__*/_jsxs(
|
|
406
|
+
return wrapSSR( /*#__PURE__*/_jsxs(VtxModal, _objectSpread(_objectSpread({}, modelProps), {}, {
|
|
392
407
|
children: [status === 0 ? /*#__PURE__*/_jsx(Content, {
|
|
393
408
|
prefixCls: prefixCls,
|
|
394
409
|
fileList: fileList,
|
|
@@ -422,11 +437,6 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
422
437
|
})]
|
|
423
438
|
})));
|
|
424
439
|
};
|
|
425
|
-
VtxImport2.defaultProps = {
|
|
426
|
-
fileKey: 'file',
|
|
427
|
-
accept: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv',
|
|
428
|
-
postData: {}
|
|
429
|
-
};
|
|
430
440
|
VtxImport2.propTypes = {
|
|
431
441
|
visible: PropTypes.bool,
|
|
432
442
|
templateURL: PropTypes.string,
|
|
@@ -447,7 +457,8 @@ VtxImport2.propTypes = {
|
|
|
447
457
|
beforeUpload: PropTypes.func,
|
|
448
458
|
chunkSize: PropTypes.number,
|
|
449
459
|
width: PropTypes.number,
|
|
450
|
-
extraDom: [PropTypes.string, PropTypes.node]
|
|
460
|
+
// extraDom: [PropTypes.string, PropTypes.node],
|
|
461
|
+
extraDom: PropTypes.object
|
|
451
462
|
};
|
|
452
463
|
export { VtxImport2 };
|
|
453
464
|
export default VtxImport2;
|
|
@@ -7,7 +7,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import { useStyle as useAntdStyle } from "../../vtx-provider";
|
|
8
8
|
var genVtxImport2Style = function genVtxImport2Style(token) {
|
|
9
9
|
var componentCls = token.componentCls;
|
|
10
|
-
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
10
|
+
return _defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, '&-modal-header-title', {
|
|
11
11
|
color: token.colorText
|
|
12
12
|
}), '&-modal-header-text', {
|
|
13
13
|
fontWeight: '400'
|
|
@@ -25,8 +25,8 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
|
|
|
25
25
|
height: '80px',
|
|
26
26
|
padding: '16px 16px 16px 48px',
|
|
27
27
|
color: token.colorPrimary,
|
|
28
|
-
fontSize:
|
|
29
|
-
backgroundColor: token.
|
|
28
|
+
fontSize: 14,
|
|
29
|
+
backgroundColor: token.colorBgLayoutTable,
|
|
30
30
|
borderRadius: '4px'
|
|
31
31
|
}, "".concat(componentCls, "-download"), {
|
|
32
32
|
marginLeft: '16px'
|
|
@@ -48,7 +48,58 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
|
|
|
48
48
|
display: 'flex',
|
|
49
49
|
alignItems: 'center',
|
|
50
50
|
justifyContent: 'space-between',
|
|
51
|
-
color:
|
|
51
|
+
color: token.colorTextSecondary
|
|
52
|
+
}, "".concat(componentCls, "-file-name"), {
|
|
53
|
+
overflow: 'hidden',
|
|
54
|
+
whiteSpace: 'nowrap',
|
|
55
|
+
textOverflow: 'ellipsis'
|
|
56
|
+
}))), '&:last-child ', {
|
|
57
|
+
marginTop: '20px'
|
|
58
|
+
}), "".concat(componentCls, "-content-mark"), {
|
|
59
|
+
position: 'absolute',
|
|
60
|
+
top: 0,
|
|
61
|
+
left: 0,
|
|
62
|
+
display: 'flex',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
justifyContent: 'center',
|
|
65
|
+
width: '28px',
|
|
66
|
+
height: '22px',
|
|
67
|
+
color: '#fff',
|
|
68
|
+
backgroundColor: token.colorPrimary,
|
|
69
|
+
border: "1px solid ".concat(token.colorPrimary),
|
|
70
|
+
borderRadius: '4px 0',
|
|
71
|
+
opacity: 0.6
|
|
72
|
+
}))), "".concat(componentCls, "-content-box"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
73
|
+
position: 'relative',
|
|
74
|
+
display: 'flex',
|
|
75
|
+
alignItems: 'center',
|
|
76
|
+
height: '80px',
|
|
77
|
+
padding: '16px 16px 16px 48px',
|
|
78
|
+
color: token.colorPrimary,
|
|
79
|
+
fontSize: 14,
|
|
80
|
+
backgroundColor: token.colorBgLayoutTable,
|
|
81
|
+
borderRadius: '4px'
|
|
82
|
+
}, "".concat(componentCls, "-download"), {
|
|
83
|
+
marginLeft: '16px'
|
|
84
|
+
}), "".concat(componentCls, "-file-list"), _defineProperty(_defineProperty({
|
|
85
|
+
display: 'flex',
|
|
86
|
+
flexDirection: 'column',
|
|
87
|
+
justifyContent: 'space-between',
|
|
88
|
+
width: '100%',
|
|
89
|
+
marginLeft: '16px',
|
|
90
|
+
overflow: 'hidden',
|
|
91
|
+
whiteSpace: 'nowrap',
|
|
92
|
+
textOverflow: 'ellipsis'
|
|
93
|
+
}, "".concat(componentCls, "-text"), {
|
|
94
|
+
cursor: 'pointer',
|
|
95
|
+
overflowRrap: 'break-word',
|
|
96
|
+
wordBreak: 'break-all',
|
|
97
|
+
whiteSpace: 'pre-wrap'
|
|
98
|
+
}), "".concat(componentCls, "-file-item"), _defineProperty({
|
|
99
|
+
display: 'flex',
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
justifyContent: 'space-between',
|
|
102
|
+
color: token.colorBase
|
|
52
103
|
}, "".concat(componentCls, "-file-name"), {
|
|
53
104
|
overflow: 'hidden',
|
|
54
105
|
whiteSpace: 'nowrap',
|
|
@@ -77,17 +128,17 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
|
|
|
77
128
|
}, "".concat(componentCls, "-result"), {
|
|
78
129
|
marginTop: '20px',
|
|
79
130
|
marginBottom: '12px',
|
|
80
|
-
color:
|
|
131
|
+
color: token.colorText,
|
|
81
132
|
fontWeight: '700',
|
|
82
133
|
fontSize: '24px'
|
|
83
134
|
}), "&-success-tips", {
|
|
84
|
-
color:
|
|
85
|
-
fontSize:
|
|
135
|
+
color: token.colorTextSecondary,
|
|
136
|
+
fontSize: 14
|
|
86
137
|
}), "&-error-tips", {
|
|
87
138
|
color: token.colorPrimary,
|
|
88
|
-
fontSize:
|
|
139
|
+
fontSize: 14,
|
|
89
140
|
cursor: 'pointer'
|
|
90
|
-
}))
|
|
141
|
+
}));
|
|
91
142
|
};
|
|
92
143
|
export function useStyle(prefixCls) {
|
|
93
144
|
return useAntdStyle('VtxImport2', function (token) {
|
package/es/vtx-modal/index.js
CHANGED
|
@@ -195,15 +195,20 @@ function VtxModal(props) {
|
|
|
195
195
|
destroyOnHidden: (_props$destroyOnClose = props.destroyOnClose) !== null && _props$destroyOnClose !== void 0 ? _props$destroyOnClose : true
|
|
196
196
|
};
|
|
197
197
|
var newProps = _objectSpread(_objectSpread(_objectSpread({
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
mask: {
|
|
199
|
+
closable: false
|
|
200
|
+
},
|
|
201
|
+
width: 700,
|
|
202
|
+
focusable: {
|
|
203
|
+
autoFocusButton: null,
|
|
204
|
+
focusTriggerAfterClose: true,
|
|
205
|
+
trap: false
|
|
206
|
+
}
|
|
201
207
|
}, props), legacyProps), {}, {
|
|
202
208
|
closable: false,
|
|
203
209
|
open: open,
|
|
204
210
|
title: title,
|
|
205
211
|
wrapClassName: classnames(prefixCls, hashId, wrapClassName, _defineProperty({}, "".concat(prefixCls, "-maxClass"), isFull ? true : false), classId.current),
|
|
206
|
-
// bodyStyle,
|
|
207
212
|
onCancel: onCancel,
|
|
208
213
|
style: _objectSpread(_objectSpread({}, props.style), isFull ? {} : transformStyle)
|
|
209
214
|
});
|
|
@@ -96,7 +96,7 @@ var genVtxStyle = function genVtxStyle(token) {
|
|
|
96
96
|
'&-wrap': _objectSpread(_objectSpread({}, absolute()), {}, {
|
|
97
97
|
backgroundColor: token.colorBgContainer,
|
|
98
98
|
borderRadius: token.borderRadiusLG,
|
|
99
|
-
padding: '0 20px'
|
|
99
|
+
padding: '0 20px 20px 20px'
|
|
100
100
|
}),
|
|
101
101
|
'&-card': {
|
|
102
102
|
background: token.colorBgContainer,
|
|
@@ -109,7 +109,9 @@ var genVtxStyle = function genVtxStyle(token) {
|
|
|
109
109
|
'&-left': _defineProperty(_defineProperty({}, "".concat(componentCls, "-ztree-search"), {
|
|
110
110
|
right: 0
|
|
111
111
|
}), '.ant-vtx-tree-wraaper', {})
|
|
112
|
-
})), "".concat(componentCls, "-button-wrap"), _defineProperty({}, "button + button", {
|
|
112
|
+
})), "".concat(componentCls, "-button-wrap"), _defineProperty(_defineProperty({}, "button + button", {
|
|
113
|
+
marginLeft: 8
|
|
114
|
+
}), "button + .vtx-export-async", {
|
|
113
115
|
marginLeft: 8
|
|
114
116
|
}));
|
|
115
117
|
};
|
package/es/vtx-provider/index.js
CHANGED
|
@@ -264,20 +264,24 @@ export var VtxConfigProvider = function VtxConfigProvider(props) {
|
|
|
264
264
|
borderRadius: 8,
|
|
265
265
|
borderRadiusLG: 12,
|
|
266
266
|
borderRadiusSM: 4
|
|
267
|
-
}, dark ? {
|
|
267
|
+
}, dark ? {
|
|
268
|
+
colorBgLayoutTable: '#111'
|
|
269
|
+
} : _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
268
270
|
colorPrimary: '#3A6DFF',
|
|
271
|
+
colorLink: '#3A6DFF',
|
|
269
272
|
colorText: '#29343D',
|
|
270
273
|
colorTextSecondary: '#78829D',
|
|
271
274
|
colorBorder: '#DCDFE6',
|
|
272
275
|
colorTextPlaceholder: '#BFC3CB',
|
|
273
276
|
colorFillAlter: '#F5F7FA'
|
|
274
|
-
}, "colorFillAlter", '#F5F7FA'), "colorTextPlaceholder", '#BFC3CB'), "colorFillAlterSolid", '#F5F7FA'), "colorBgLayout", '#FAFAFA')), theme.token);
|
|
277
|
+
}, "colorFillAlter", '#F5F7FA'), "colorTextPlaceholder", '#BFC3CB'), "colorFillAlterSolid", '#F5F7FA'), "colorBgLayout", '#F0F2F5'), "colorBgLayoutTable", '#FAFAFA')), theme.token);
|
|
275
278
|
theme.components = _objectSpread(_objectSpread({}, theme.components), {}, {
|
|
276
279
|
Table: _objectSpread({
|
|
277
280
|
headerBorderRadius: 0
|
|
278
281
|
}, (_theme$components = theme.components) === null || _theme$components === void 0 ? void 0 : _theme$components.Table),
|
|
279
282
|
Modal: _objectSpread({
|
|
280
|
-
contentPadding: 0
|
|
283
|
+
contentPadding: 0,
|
|
284
|
+
bodyPadding: 0
|
|
281
285
|
}, (_theme$components2 = theme.components) === null || _theme$components2 === void 0 ? void 0 : _theme$components2.Modal)
|
|
282
286
|
});
|
|
283
287
|
|
|
@@ -125,6 +125,10 @@ export default {
|
|
|
125
125
|
operation: 'Import',
|
|
126
126
|
error: 'Upload failed',
|
|
127
127
|
success: 'Upload successful',
|
|
128
|
+
rowNumber: 'Line No.',
|
|
129
|
+
errorMessage: 'Error Description',
|
|
130
|
+
selectFile: 'Click to select file',
|
|
131
|
+
noFileSelected: "No file selected",
|
|
128
132
|
downloadTemplate: 'Download template',
|
|
129
133
|
pleaseSelectFile: 'Please select the file to upload',
|
|
130
134
|
upload: 'Upload',
|
|
@@ -182,8 +186,58 @@ export default {
|
|
|
182
186
|
download: 'Download'
|
|
183
187
|
},
|
|
184
188
|
wangEditor: {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
189
|
+
messageOverSizeText: 'Exceeds file size limit, maximum file size is',
|
|
190
|
+
messageUploadFailText: 'Upload error',
|
|
191
|
+
messageInsertImgFailText: 'Image Insertion Failed',
|
|
192
|
+
messageInsertVideoFailText: 'Video Insertion Failed',
|
|
193
|
+
messageInsertAttachmentFailText: 'Attachment Insertion Failed'
|
|
194
|
+
},
|
|
195
|
+
envPuzzle: {
|
|
196
|
+
common: {
|
|
197
|
+
startTime: 'Start time',
|
|
198
|
+
endTime: 'End time',
|
|
199
|
+
confirm: 'OK',
|
|
200
|
+
prompt: 'Prompt'
|
|
201
|
+
},
|
|
202
|
+
createModal: {
|
|
203
|
+
clear: 'Clear',
|
|
204
|
+
required: '{label} is required',
|
|
205
|
+
whitespace: '{label} cannot contain only whitespace'
|
|
206
|
+
},
|
|
207
|
+
template: {
|
|
208
|
+
selectedPrefix: 'Selected',
|
|
209
|
+
selectedSuffix: 'items',
|
|
210
|
+
clearSelected: 'Clear',
|
|
211
|
+
deleteItemConfirm: 'Delete this item?',
|
|
212
|
+
deleteRowConfirm: 'Confirm delete?',
|
|
213
|
+
deleteSelectedConfirm: 'Delete the selected {count} records?',
|
|
214
|
+
exportSelectedRows: 'Export selected rows',
|
|
215
|
+
exportCurrentPage: 'Export current page',
|
|
216
|
+
exportAll: 'Export all',
|
|
217
|
+
exportAllFields: 'Export all fields',
|
|
218
|
+
exportingFile: 'Exporting file...',
|
|
219
|
+
paginationTotal: 'Total {total} records'
|
|
220
|
+
},
|
|
221
|
+
import: {
|
|
222
|
+
rowNumber: 'Row',
|
|
223
|
+
errorMessage: 'Error message',
|
|
224
|
+
pleaseUploadFile: 'Please upload a file',
|
|
225
|
+
uploadFile: 'Upload file'
|
|
226
|
+
},
|
|
227
|
+
map: {
|
|
228
|
+
goToMap: 'Open map',
|
|
229
|
+
locate: 'Locate',
|
|
230
|
+
calibrate: 'Calibrate',
|
|
231
|
+
redraw: 'Redraw',
|
|
232
|
+
keywordPlaceholder: 'Enter keywords',
|
|
233
|
+
invalidLayerOptions: 'data and options cannot be empty, and map is required'
|
|
234
|
+
},
|
|
235
|
+
upload: {
|
|
236
|
+
downloading: 'Downloading...',
|
|
237
|
+
pictureUnit: 'files'
|
|
238
|
+
},
|
|
239
|
+
request: {
|
|
240
|
+
operationFailed: 'Operation failed'
|
|
241
|
+
}
|
|
188
242
|
}
|
|
189
243
|
};
|
|
@@ -124,6 +124,10 @@ export default {
|
|
|
124
124
|
operation: '导入',
|
|
125
125
|
error: '上传失败',
|
|
126
126
|
success: '上传成功',
|
|
127
|
+
rowNumber: '行号',
|
|
128
|
+
errorMessage: '错误说明',
|
|
129
|
+
selectFile: '选择文件',
|
|
130
|
+
noFileSelected: "未选择任何文件",
|
|
127
131
|
downloadTemplate: '下载模板',
|
|
128
132
|
pleaseSelectFile: '请选择需要上传的文件',
|
|
129
133
|
upload: '上传',
|
|
@@ -181,9 +185,11 @@ export default {
|
|
|
181
185
|
download: '下载'
|
|
182
186
|
},
|
|
183
187
|
wangEditor: {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
188
|
+
messageOverSizeText: '超过文件大小限制,最大文件大小为',
|
|
189
|
+
messageUploadFailText: '上传出错',
|
|
190
|
+
messageInsertImgFailText: '插入图片失败',
|
|
191
|
+
messageInsertVideoFailText: '插入视频失败',
|
|
192
|
+
messageInsertAttachmentFailText: '插入附件失败'
|
|
187
193
|
},
|
|
188
194
|
colorPicker: {
|
|
189
195
|
primary: '主要',
|
|
@@ -197,5 +203,53 @@ export default {
|
|
|
197
203
|
basic: '基础颜色',
|
|
198
204
|
// 基础色板
|
|
199
205
|
chart: '图表颜色' // 图表专用色
|
|
206
|
+
},
|
|
207
|
+
envPuzzle: {
|
|
208
|
+
common: {
|
|
209
|
+
startTime: '开始时间',
|
|
210
|
+
endTime: '结束时间',
|
|
211
|
+
confirm: '确定',
|
|
212
|
+
prompt: '提示'
|
|
213
|
+
},
|
|
214
|
+
createModal: {
|
|
215
|
+
clear: '清空',
|
|
216
|
+
required: '{label}不能为空',
|
|
217
|
+
whitespace: '{label}不能只包含空白字符'
|
|
218
|
+
},
|
|
219
|
+
template: {
|
|
220
|
+
selectedPrefix: '已选择',
|
|
221
|
+
selectedSuffix: '项',
|
|
222
|
+
clearSelected: '清空',
|
|
223
|
+
deleteItemConfirm: '确定删除该项吗?',
|
|
224
|
+
deleteRowConfirm: '是否确认删除',
|
|
225
|
+
deleteSelectedConfirm: '确定删除选中的{count}条数据吗?',
|
|
226
|
+
exportSelectedRows: '导出选中行',
|
|
227
|
+
exportCurrentPage: '导出当前页',
|
|
228
|
+
exportAll: '导出全部',
|
|
229
|
+
exportAllFields: '导出全量字段',
|
|
230
|
+
exportingFile: '导出文件中...',
|
|
231
|
+
paginationTotal: '总共{total}条记录'
|
|
232
|
+
},
|
|
233
|
+
import: {
|
|
234
|
+
rowNumber: '行数',
|
|
235
|
+
errorMessage: '错误信息',
|
|
236
|
+
pleaseUploadFile: '请上传文件',
|
|
237
|
+
uploadFile: '上传文件'
|
|
238
|
+
},
|
|
239
|
+
map: {
|
|
240
|
+
goToMap: '去地图',
|
|
241
|
+
locate: '定位',
|
|
242
|
+
calibrate: '校正',
|
|
243
|
+
redraw: '重新绘制',
|
|
244
|
+
keywordPlaceholder: '请输入关键字',
|
|
245
|
+
invalidLayerOptions: 'data,options 不能为空或者是map对象没有'
|
|
246
|
+
},
|
|
247
|
+
upload: {
|
|
248
|
+
downloading: '下载中...',
|
|
249
|
+
pictureUnit: '张'
|
|
250
|
+
},
|
|
251
|
+
request: {
|
|
252
|
+
operationFailed: '操作失败'
|
|
253
|
+
}
|
|
200
254
|
}
|
|
201
255
|
};
|
package/es/vtx-search/index.js
CHANGED
|
@@ -55,10 +55,6 @@ function VtxSearch(props) {
|
|
|
55
55
|
isClearButton = _props$isClearButton === void 0 ? true : _props$isClearButton,
|
|
56
56
|
_props$isMoreButton = props.isMoreButton,
|
|
57
57
|
isMoreButton = _props$isMoreButton === void 0 ? true : _props$isMoreButton,
|
|
58
|
-
_props$confirmText = props.confirmText,
|
|
59
|
-
confirmText = _props$confirmText === void 0 ? intl.getMessage('tableForm.search', '查询') : _props$confirmText,
|
|
60
|
-
_props$clearText = props.clearText,
|
|
61
|
-
clearText = _props$clearText === void 0 ? intl.getMessage('tableForm.reset', '重置') : _props$clearText,
|
|
62
58
|
onConfirm = props.onConfirm,
|
|
63
59
|
onClear = props.onClear,
|
|
64
60
|
renderButtons = props.renderButtons,
|
|
@@ -66,7 +62,15 @@ function VtxSearch(props) {
|
|
|
66
62
|
showAll = _props$showAll === void 0 ? false : _props$showAll,
|
|
67
63
|
onToggleShow = props.onToggleShow,
|
|
68
64
|
_props$customEnumText = props.customEnumText,
|
|
69
|
-
customEnumText = _props$customEnumText === void 0 ? {
|
|
65
|
+
customEnumText = _props$customEnumText === void 0 ? {
|
|
66
|
+
confirmText: intl.getMessage('tableForm.search', '查询'),
|
|
67
|
+
//确认按钮文本
|
|
68
|
+
clearText: intl.getMessage('tableForm.reset', '重置'),
|
|
69
|
+
//情况按钮文本
|
|
70
|
+
collapseText: intl.getMessage('tableForm.expand', '收起'),
|
|
71
|
+
//情况按钮文本
|
|
72
|
+
expandText: intl.getMessage('tableForm.collapsed', '展开') //情况按钮文本
|
|
73
|
+
} : _props$customEnumText;
|
|
70
74
|
var vtxSearchRef = useRef();
|
|
71
75
|
var ref = useRef();
|
|
72
76
|
var size = useColSize(vtxSearchRef);
|
|
@@ -296,7 +300,7 @@ function VtxSearch(props) {
|
|
|
296
300
|
},
|
|
297
301
|
type: "primary",
|
|
298
302
|
onClick: onConfirm,
|
|
299
|
-
children: confirmText
|
|
303
|
+
children: customEnumText.confirmText
|
|
300
304
|
})
|
|
301
305
|
}), isClearButton && /*#__PURE__*/_jsx("span", {
|
|
302
306
|
"data-type": 'bt',
|
|
@@ -306,7 +310,7 @@ function VtxSearch(props) {
|
|
|
306
310
|
width: '100%'
|
|
307
311
|
},
|
|
308
312
|
onClick: onClear,
|
|
309
|
-
children: clearText
|
|
313
|
+
children: customEnumText.clearText
|
|
310
314
|
})
|
|
311
315
|
}), isMoreButton && grid.len > realColumn - 1 && /*#__PURE__*/_jsx("div", {
|
|
312
316
|
"data-type": 'bt',
|
|
@@ -315,9 +319,9 @@ function VtxSearch(props) {
|
|
|
315
319
|
},
|
|
316
320
|
className: classnames("".concat(prefix, "-more"), hashId),
|
|
317
321
|
children: showMore ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
318
|
-
children: [
|
|
322
|
+
children: [customEnumText.collapseText, /*#__PURE__*/_jsx(UpOutlined, {})]
|
|
319
323
|
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
320
|
-
children: [
|
|
324
|
+
children: [customEnumText.expandText, /*#__PURE__*/_jsx(DownOutlined, {})]
|
|
321
325
|
})
|
|
322
326
|
})]
|
|
323
327
|
})
|
|
@@ -16,7 +16,8 @@ var genVtxStyle = function genVtxStyle(token) {
|
|
|
16
16
|
transitionDuration: token.toggleSpeed,
|
|
17
17
|
transitionProperty: 'height',
|
|
18
18
|
boxSizing: 'border-box',
|
|
19
|
-
overflow: 'hidden'
|
|
19
|
+
overflow: 'hidden',
|
|
20
|
+
color: token.colorText
|
|
20
21
|
}, "".concat(componentCls, "-element"), {}), "".concat(componentCls, "-label_v"), {
|
|
21
22
|
overflow: 'hidden',
|
|
22
23
|
lineHeight: 1,
|