@vtx/components 3.1.65 → 3.1.67
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/lib/_util/filterSpecialCharacters.js +55 -44
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +1 -4
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getUrlParam.js +1 -8
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/isFunction.js +0 -1
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js +0 -1
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/useColSize.js +2 -12
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js +0 -3
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +23 -39
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js +1 -2
- package/lib/config.js.map +1 -1
- package/lib/index.js +0 -27
- package/lib/index.js.map +1 -1
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -9
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/vtx-color-picker/index.js +9 -26
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js +0 -2
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js +0 -2
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-combogrid/Combogrid.js +50 -87
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +28 -54
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js +0 -7
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js +0 -7
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/Alert.js +4 -13
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +38 -74
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +3 -15
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +100 -169
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +7 -38
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js +0 -10
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.js +0 -10
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-date-picker/QdatePicker.js +21 -51
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +24 -65
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +1 -7
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js +0 -1
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js +0 -1
- package/lib/vtx-date-picker/style/index.js.map +1 -1
- package/lib/vtx-date-picker/style/index.less +39 -39
- package/lib/vtx-editor/index.js +9 -28
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js +0 -1
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js +0 -1
- package/lib/vtx-editor/style/index.js.map +1 -1
- package/lib/vtx-editor/style/index.less +8 -8
- package/lib/vtx-ellipsis-text/index.js +14 -27
- package/lib/vtx-ellipsis-text/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/css.js +0 -1
- package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.js +0 -1
- package/lib/vtx-ellipsis-text/style/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.less +13 -13
- package/lib/vtx-export/index.js +28 -62
- package/lib/vtx-export/index.js.map +1 -1
- package/lib/vtx-export/style/css.js +0 -5
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js +0 -5
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-export-async/History.js +56 -93
- package/lib/vtx-export-async/History.js.map +1 -1
- package/lib/vtx-export-async/index.js +56 -97
- package/lib/vtx-export-async/index.js.map +1 -1
- package/lib/vtx-export-async/style/css.js.map +1 -1
- package/lib/vtx-export-async/style/index.js.map +1 -1
- package/lib/vtx-export-async/util.js +3 -14
- package/lib/vtx-export-async/util.js.map +1 -1
- package/lib/vtx-form-layout/Card.js +11 -33
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +5 -11
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +11 -33
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +3 -9
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +1 -8
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +1 -4
- package/lib/vtx-form-layout/context.js.map +1 -1
- package/lib/vtx-form-layout/demo/Modal.less +43 -43
- package/lib/vtx-form-layout/index.js +9 -24
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js +0 -7
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js +0 -7
- package/lib/vtx-form-layout/style/index.js.map +1 -1
- package/lib/vtx-form-layout/style/index.less +216 -216
- package/lib/vtx-image/Image.js +73 -113
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +30 -59
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +17 -47
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +4 -11
- package/lib/vtx-image/index.js.map +1 -1
- package/lib/vtx-image/style/css.js +0 -1
- package/lib/vtx-image/style/css.js.map +1 -1
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-image/style/index.js.map +1 -1
- package/lib/vtx-import/index.js +46 -79
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +10 -28
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js +0 -3
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js +0 -3
- package/lib/vtx-import/style/index.js.map +1 -1
- package/lib/vtx-import/style/index.less +8 -8
- package/lib/vtx-import2/CheckResult.js +1 -8
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +11 -33
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +1 -6
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +7 -14
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +1 -6
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +52 -109
- package/lib/vtx-import2/index.js.map +1 -1
- package/lib/vtx-import2/style/css.js +0 -3
- package/lib/vtx-import2/style/css.js.map +1 -1
- package/lib/vtx-import2/style/index.js +0 -3
- package/lib/vtx-import2/style/index.js.map +1 -1
- package/lib/vtx-import2/style/index.less +102 -102
- package/lib/vtx-input/TextArea.js +10 -27
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +20 -45
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js +0 -1
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js +0 -1
- package/lib/vtx-input/style/index.js.map +1 -1
- package/lib/vtx-input/style/index.less +24 -24
- package/lib/vtx-input/useLength.js +7 -20
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +2 -8
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +51 -84
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js +0 -1
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.js +0 -1
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-page-layout/Basic.js +3 -8
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +15 -26
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +3 -12
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +39 -69
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +11 -22
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +23 -51
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +1 -10
- package/lib/vtx-page-layout/index.js.map +1 -1
- package/lib/vtx-page-layout/style/css.js.map +1 -1
- package/lib/vtx-page-layout/style/index.js.map +1 -1
- package/lib/vtx-page-layout/style/index.less +138 -138
- package/lib/vtx-rps-frame/index.js +37 -56
- package/lib/vtx-rps-frame/index.js.map +1 -1
- package/lib/vtx-rps-frame/style/css.js.map +1 -1
- package/lib/vtx-rps-frame/style/index.js.map +1 -1
- package/lib/vtx-scrollable-row/index.js +30 -64
- package/lib/vtx-scrollable-row/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/css.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.less +113 -113
- package/lib/vtx-search/VtxCol.js +7 -26
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +7 -14
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +61 -106
- package/lib/vtx-search/index.js.map +1 -1
- package/lib/vtx-search/style/css.js +0 -4
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js +0 -4
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search-map-input/index.js +56 -89
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js +0 -2
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js +0 -2
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/index.js +37 -87
- package/lib/vtx-select/index.js.map +1 -1
- package/lib/vtx-select/style/css.js +0 -8
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js +0 -8
- package/lib/vtx-select/style/index.js.map +1 -1
- package/lib/vtx-select/style/index.less +68 -68
- package/lib/vtx-signature/index.js +18 -33
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js +0 -2
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js +0 -2
- package/lib/vtx-signature/style/index.js.map +1 -1
- package/lib/vtx-signature/style/index.less +33 -33
- package/lib/vtx-split-pane/Pane.js +11 -22
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +19 -39
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +51 -107
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +1 -6
- package/lib/vtx-split-pane/index.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js +0 -3
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js +0 -3
- package/lib/vtx-split-pane/style/index.js.map +1 -1
- package/lib/vtx-split-pane/style/index.less +76 -76
- package/lib/vtx-statistics-column/Back.js +2 -9
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +14 -30
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +14 -30
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +1 -4
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +1 -18
- package/lib/vtx-statistics-column/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/css.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.less +59 -59
- package/lib/vtx-time-picker/index.js +4 -18
- package/lib/vtx-time-picker/index.js.map +1 -1
- package/lib/vtx-time-picker/style/css.js.map +1 -1
- package/lib/vtx-time-picker/style/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js +15 -33
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +77 -148
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +0 -5
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +0 -5
- package/lib/vtx-upload/style/index.js.map +1 -1
- package/lib/vtx-upload/style/index.less +61 -61
- package/lib/vtx-wang-editor/index.js +74 -116
- package/lib/vtx-wang-editor/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/css.js +0 -1
- package/lib/vtx-wang-editor/style/css.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.js +0 -1
- package/lib/vtx-wang-editor/style/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.less +12 -12
- package/lib/vtx-wang-editor/wangEditorUtil.js +75 -136
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
- package/lib/vtx-ztree/index.js +71 -121
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js +0 -1
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js +0 -1
- package/lib/vtx-ztree/style/index.js.map +1 -1
- package/lib/vtx-ztree/style/index.less +45 -45
- package/lib/vtx-ztree-select/index.js +73 -142
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js +0 -3
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js +0 -3
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.less +107 -107
- package/package.json +126 -126
|
@@ -1,179 +1,135 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = VtxDatagrid;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
11
|
var _table = _interopRequireDefault(require("antd/lib/table"));
|
|
17
|
-
|
|
18
12
|
var _tooltip = _interopRequireDefault(require("antd/lib/tooltip"));
|
|
19
|
-
|
|
20
13
|
var _dropdown = _interopRequireDefault(require("antd/lib/dropdown"));
|
|
21
|
-
|
|
22
14
|
var _menu = _interopRequireDefault(require("antd/lib/menu"));
|
|
23
|
-
|
|
24
15
|
var _empty = _interopRequireDefault(require("antd/lib/empty"));
|
|
25
|
-
|
|
26
16
|
var _RedoOutlined = _interopRequireDefault(require("@ant-design/icons/RedoOutlined"));
|
|
27
|
-
|
|
28
17
|
var _ColumnHeightOutlined = _interopRequireDefault(require("@ant-design/icons/ColumnHeightOutlined"));
|
|
29
|
-
|
|
30
18
|
var _SettingOutlined = _interopRequireDefault(require("@ant-design/icons/SettingOutlined"));
|
|
31
|
-
|
|
32
19
|
var _Alert = _interopRequireDefault(require("./Alert"));
|
|
33
|
-
|
|
34
20
|
var _ColumnSetting = _interopRequireDefault(require("./ColumnSetting"));
|
|
35
|
-
|
|
36
21
|
var _ResizeableTitle = _interopRequireDefault(require("./ResizeableTitle"));
|
|
37
|
-
|
|
38
22
|
var _renderColumnButtons = _interopRequireDefault(require("./renderColumnButtons"));
|
|
39
|
-
|
|
40
23
|
var _useSet3 = _interopRequireDefault(require("../_util/useSet"));
|
|
41
|
-
|
|
42
24
|
var _isFunction = _interopRequireDefault(require("../_util/isFunction"));
|
|
43
|
-
|
|
44
25
|
var _axios = _interopRequireDefault(require("axios"));
|
|
45
|
-
|
|
46
26
|
var _excluded = ["prefixCls", "toolbar", "toolbarClassName", "toolbarTilte", "buttonGroup", "refreshIconVisible", "hideColumnSetting", "hideColumnHeight", "visibleColumnKeys", "defaultVisibleColumnKeys", "onVisibleColumnsChange", "onRefresh", "indexColumn", "indexFixed", "bordered", "indexTitle", "startIndex", "autoFit", "headFootHeight", "columnResizable", "components", "className", "style", "emptyText", "onRowSelectionClear", "searchCollapseEvent$", "disabledColumnKeys", "onColumnsSave", "uniqueKey", "customEnumText"];
|
|
47
|
-
|
|
48
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
49
|
-
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
53
|
-
|
|
28
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
29
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
54
30
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
55
|
-
|
|
56
31
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
57
|
-
|
|
58
32
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
59
|
-
|
|
60
33
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
61
|
-
|
|
62
34
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
63
|
-
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
69
|
-
|
|
35
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
38
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
39
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
70
40
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
71
|
-
|
|
72
41
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
73
|
-
|
|
74
42
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
75
|
-
|
|
76
43
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
77
|
-
|
|
78
44
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
79
|
-
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
83
|
-
|
|
45
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
46
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
84
47
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
85
|
-
|
|
86
48
|
var isMac = navigator.userAgent.indexOf('Mac OS') !== -1;
|
|
87
|
-
|
|
88
49
|
function VtxDatagrid(props) {
|
|
89
|
-
var _rest$dataSource, _rest$rowSelection, _rest$rowSelection2, _dataSource2,
|
|
90
|
-
|
|
50
|
+
var _rest$dataSource, _rest$rowSelection, _rest$rowSelection2, _dataSource2, _rest$rowSelection3, _dataSource3;
|
|
91
51
|
var _useSet = (0, _useSet3["default"])({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
52
|
+
// 显示列
|
|
53
|
+
visibleColumns: [],
|
|
54
|
+
// 列设置选中的列
|
|
55
|
+
checkedColumnKeys: [],
|
|
56
|
+
// 列设置选项
|
|
57
|
+
columnSettingOptions: [],
|
|
58
|
+
datagridId: "vtx-datagrid-".concat(new Date().getTime()),
|
|
59
|
+
scrollY: 0,
|
|
60
|
+
size: 'middle',
|
|
61
|
+
projectKey: ''
|
|
62
|
+
}),
|
|
63
|
+
_useSet2 = _slicedToArray(_useSet, 2),
|
|
64
|
+
state = _useSet2[0],
|
|
65
|
+
setState = _useSet2[1];
|
|
107
66
|
var visibleColumns = state.visibleColumns,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
var datagridRef = (0, _react.useRef)(null);
|
|
114
|
-
|
|
115
|
-
var alertHeight = (0, _react.useRef)(0);
|
|
116
|
-
|
|
117
|
-
var toolbarHeight = (0, _react.useRef)(0);
|
|
118
|
-
|
|
67
|
+
checkedColumnKeys = state.checkedColumnKeys,
|
|
68
|
+
columnSettingOptions = state.columnSettingOptions,
|
|
69
|
+
datagridId = state.datagridId,
|
|
70
|
+
scrollY = state.scrollY,
|
|
71
|
+
size = state.size;
|
|
72
|
+
var datagridRef = (0, _react.useRef)(null);
|
|
73
|
+
// 列设置提示高度
|
|
74
|
+
var alertHeight = (0, _react.useRef)(0);
|
|
75
|
+
// 工具栏高度
|
|
76
|
+
var toolbarHeight = (0, _react.useRef)(0);
|
|
77
|
+
// 列接口显示字段
|
|
119
78
|
var settingRef = (0, _react.useRef)();
|
|
120
|
-
|
|
121
79
|
var _props$prefixCls = props.prefixCls,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
80
|
+
prefixCls = _props$prefixCls === void 0 ? 'vtx-datagrid' : _props$prefixCls,
|
|
81
|
+
_props$toolbar = props.toolbar,
|
|
82
|
+
toolbar = _props$toolbar === void 0 ? true : _props$toolbar,
|
|
83
|
+
toolbarClassName = props.toolbarClassName,
|
|
84
|
+
_props$toolbarTilte = props.toolbarTilte,
|
|
85
|
+
toolbarTilte = _props$toolbarTilte === void 0 ? '查询结果' : _props$toolbarTilte,
|
|
86
|
+
buttonGroup = props.buttonGroup,
|
|
87
|
+
_props$refreshIconVis = props.refreshIconVisible,
|
|
88
|
+
refreshIconVisible = _props$refreshIconVis === void 0 ? true : _props$refreshIconVis,
|
|
89
|
+
hideColumnSetting = props.hideColumnSetting,
|
|
90
|
+
hideColumnHeight = props.hideColumnHeight,
|
|
91
|
+
visibleColumnKeys = props.visibleColumnKeys,
|
|
92
|
+
defaultVisibleColumnKeys = props.defaultVisibleColumnKeys,
|
|
93
|
+
onVisibleColumnsChange = props.onVisibleColumnsChange,
|
|
94
|
+
onRefresh = props.onRefresh,
|
|
95
|
+
_props$indexColumn = props.indexColumn,
|
|
96
|
+
indexColumn = _props$indexColumn === void 0 ? true : _props$indexColumn,
|
|
97
|
+
_props$indexFixed = props.indexFixed,
|
|
98
|
+
indexFixed = _props$indexFixed === void 0 ? false : _props$indexFixed,
|
|
99
|
+
_props$bordered = props.bordered,
|
|
100
|
+
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
101
|
+
_props$indexTitle = props.indexTitle,
|
|
102
|
+
indexTitle = _props$indexTitle === void 0 ? '序号' : _props$indexTitle,
|
|
103
|
+
_props$startIndex = props.startIndex,
|
|
104
|
+
startIndex = _props$startIndex === void 0 ? 1 : _props$startIndex,
|
|
105
|
+
_props$autoFit = props.autoFit,
|
|
106
|
+
autoFit = _props$autoFit === void 0 ? true : _props$autoFit,
|
|
107
|
+
_props$headFootHeight = props.headFootHeight,
|
|
108
|
+
headFootHeight = _props$headFootHeight === void 0 ? 115 : _props$headFootHeight,
|
|
109
|
+
columnResizable = props.columnResizable,
|
|
110
|
+
components = props.components,
|
|
111
|
+
className = props.className,
|
|
112
|
+
style = props.style,
|
|
113
|
+
_props$emptyText = props.emptyText,
|
|
114
|
+
emptyText = _props$emptyText === void 0 ? '暂无数据' : _props$emptyText,
|
|
115
|
+
onRowSelectionClear = props.onRowSelectionClear,
|
|
116
|
+
searchCollapseEvent$ = props.searchCollapseEvent$,
|
|
117
|
+
disabledColumnKeys = props.disabledColumnKeys,
|
|
118
|
+
onColumnsSave = props.onColumnsSave,
|
|
119
|
+
uniqueKey = props.uniqueKey,
|
|
120
|
+
_props$customEnumText = props.customEnumText,
|
|
121
|
+
customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText,
|
|
122
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
123
|
+
|
|
124
|
+
// 规则,菜单根目录_页面路由
|
|
167
125
|
function getUniqueKey() {
|
|
168
126
|
var route = location.href.match(/#\/(\S*)\?/);
|
|
169
|
-
|
|
170
127
|
if (route) {
|
|
171
128
|
(0, _axios["default"])({
|
|
172
129
|
method: 'GET',
|
|
173
130
|
url: "".concat(location.pathname, "resources/json/menu.json")
|
|
174
131
|
}).then(function (res) {
|
|
175
132
|
var _res$data;
|
|
176
|
-
|
|
177
133
|
if ((res === null || res === void 0 ? void 0 : res.status) == 200 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.key) {
|
|
178
134
|
setState({
|
|
179
135
|
projectKey: "".concat(res.data.key, "_").concat(route ? route[1] : 'test')
|
|
@@ -182,18 +138,15 @@ function VtxDatagrid(props) {
|
|
|
182
138
|
});
|
|
183
139
|
}
|
|
184
140
|
}
|
|
185
|
-
|
|
186
141
|
(0, _react.useEffect)(function () {
|
|
187
142
|
// 当没有传入唯一值而且没有自定义列保存的时候根据规则自动生成唯一值
|
|
188
143
|
if (!uniqueKey && !onColumnsSave) {
|
|
189
144
|
getUniqueKey();
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
145
|
+
}
|
|
146
|
+
// componentDidMount
|
|
193
147
|
if (autoFit) {
|
|
194
148
|
window.addEventListener('resize', calculateHeight, false);
|
|
195
149
|
}
|
|
196
|
-
|
|
197
150
|
return function () {
|
|
198
151
|
// componentWillUnmount
|
|
199
152
|
if (autoFit) {
|
|
@@ -205,8 +158,9 @@ function VtxDatagrid(props) {
|
|
|
205
158
|
if (autoFit) {
|
|
206
159
|
calculateHeight();
|
|
207
160
|
}
|
|
208
|
-
}, [(_rest$dataSource = rest.dataSource) === null || _rest$dataSource === void 0 ? void 0 : _rest$dataSource.length, (((_rest$rowSelection = rest.rowSelection) === null || _rest$rowSelection === void 0 ? void 0 : _rest$rowSelection.selectedRowKeys) || []).join(',')]);
|
|
161
|
+
}, [(_rest$dataSource = rest.dataSource) === null || _rest$dataSource === void 0 ? void 0 : _rest$dataSource.length, (((_rest$rowSelection = rest.rowSelection) === null || _rest$rowSelection === void 0 ? void 0 : _rest$rowSelection.selectedRowKeys) || []).join(',')]);
|
|
209
162
|
|
|
163
|
+
// 只有被TableLayout.Page包裹时才会存在searchCollapseEvent$这个参数
|
|
210
164
|
if (searchCollapseEvent$) {
|
|
211
165
|
// eslint-disable-next-line react/prop-types
|
|
212
166
|
searchCollapseEvent$.useSubscription(function () {
|
|
@@ -218,10 +172,8 @@ function VtxDatagrid(props) {
|
|
|
218
172
|
}, 350);
|
|
219
173
|
});
|
|
220
174
|
}
|
|
221
|
-
|
|
222
175
|
(0, _react.useEffect)(function () {
|
|
223
176
|
var _rest$columns;
|
|
224
|
-
|
|
225
177
|
parseColumns();
|
|
226
178
|
setState({
|
|
227
179
|
columnSettingOptions: (_rest$columns = rest.columns) === null || _rest$columns === void 0 ? void 0 : _rest$columns.map(function (col) {
|
|
@@ -231,15 +183,12 @@ function VtxDatagrid(props) {
|
|
|
231
183
|
})
|
|
232
184
|
});
|
|
233
185
|
}, [rest.columns]);
|
|
234
|
-
|
|
235
186
|
var parseColumns = function parseColumns(type) {
|
|
236
187
|
// 显示工具栏的同时并显示列设置
|
|
237
188
|
if (toolbar && !hideColumnSetting) {
|
|
238
189
|
var _settingRef$current;
|
|
239
|
-
|
|
240
190
|
if (defaultVisibleColumnKeys || visibleColumnKeys || (_settingRef$current = settingRef.current) !== null && _settingRef$current !== void 0 && _settingRef$current.showColumns) {
|
|
241
191
|
var _settingRef$current2, _rest$columns2;
|
|
242
|
-
|
|
243
192
|
var columnKeys = type === 'reset' ? defaultVisibleColumnKeys : ((_settingRef$current2 = settingRef.current) === null || _settingRef$current2 === void 0 ? void 0 : _settingRef$current2.showColumns) || visibleColumnKeys || defaultVisibleColumnKeys;
|
|
244
193
|
setState({
|
|
245
194
|
checkedColumnKeys: columnKeys,
|
|
@@ -249,7 +198,6 @@ function VtxDatagrid(props) {
|
|
|
249
198
|
});
|
|
250
199
|
} else {
|
|
251
200
|
var _rest$columns3;
|
|
252
|
-
|
|
253
201
|
setState({
|
|
254
202
|
checkedColumnKeys: (_rest$columns3 = rest.columns) === null || _rest$columns3 === void 0 ? void 0 : _rest$columns3.map(function (item) {
|
|
255
203
|
return item.dataIndex || item.key;
|
|
@@ -263,18 +211,15 @@ function VtxDatagrid(props) {
|
|
|
263
211
|
});
|
|
264
212
|
}
|
|
265
213
|
};
|
|
266
|
-
|
|
267
214
|
var hasAlert = (((_rest$rowSelection2 = rest.rowSelection) === null || _rest$rowSelection2 === void 0 ? void 0 : _rest$rowSelection2.selectedRowKeys) || []).length > 0;
|
|
268
215
|
alertHeight.current = hasAlert ? 49 : 0;
|
|
269
|
-
toolbarHeight.current = toolbar ? 56 : 0;
|
|
270
|
-
|
|
216
|
+
toolbarHeight.current = toolbar ? 56 : 0;
|
|
217
|
+
// 高度计算
|
|
271
218
|
var calculateHeight = function calculateHeight() {
|
|
272
219
|
var _datagridRef$current;
|
|
273
|
-
|
|
274
220
|
if (!datagridRef.current) {
|
|
275
221
|
return null;
|
|
276
222
|
}
|
|
277
|
-
|
|
278
223
|
var bodyHeight = ((_datagridRef$current = datagridRef.current) === null || _datagridRef$current === void 0 ? void 0 : _datagridRef$current.clientHeight) - headFootHeight - toolbarHeight.current - alertHeight.current;
|
|
279
224
|
var divs = datagridRef.current.getElementsByTagName('div');
|
|
280
225
|
var bodyDiv = Array.prototype.filter.call(divs, function (dom) {
|
|
@@ -284,9 +229,9 @@ function VtxDatagrid(props) {
|
|
|
284
229
|
setState({
|
|
285
230
|
scrollY: bodyHeight
|
|
286
231
|
});
|
|
287
|
-
};
|
|
288
|
-
|
|
232
|
+
};
|
|
289
233
|
|
|
234
|
+
// 列设置回调
|
|
290
235
|
var handleChangeColumns = function handleChangeColumns(keys) {
|
|
291
236
|
setState({
|
|
292
237
|
checkedColumnKeys: keys,
|
|
@@ -295,11 +240,10 @@ function VtxDatagrid(props) {
|
|
|
295
240
|
})
|
|
296
241
|
});
|
|
297
242
|
onVisibleColumnsChange && onVisibleColumnsChange(keys);
|
|
298
|
-
};
|
|
299
|
-
|
|
243
|
+
};
|
|
300
244
|
|
|
245
|
+
// 工具栏
|
|
301
246
|
var toolbarRender;
|
|
302
|
-
|
|
303
247
|
if (toolbar) {
|
|
304
248
|
toolbarRender = /*#__PURE__*/_react["default"].createElement("div", {
|
|
305
249
|
className: (0, _classnames2["default"])("".concat(prefixCls, "-toolbar"), toolbarClassName)
|
|
@@ -359,14 +303,13 @@ function VtxDatagrid(props) {
|
|
|
359
303
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
360
304
|
title: (customEnumText === null || customEnumText === void 0 ? void 0 : customEnumText.columnSettingText) || "列设置"
|
|
361
305
|
}, /*#__PURE__*/_react["default"].createElement(_SettingOutlined["default"], null)))))));
|
|
362
|
-
}
|
|
363
|
-
|
|
306
|
+
}
|
|
364
307
|
|
|
308
|
+
// 分页
|
|
365
309
|
var getPagination = function getPagination(pagination) {
|
|
366
310
|
if (typeof pagination === 'boolean' && !pagination) {
|
|
367
311
|
return pagination;
|
|
368
312
|
}
|
|
369
|
-
|
|
370
313
|
return _objectSpread({
|
|
371
314
|
pageSizeOptions: ['10', '20', '30', '40', '50'],
|
|
372
315
|
showSizeChanger: true,
|
|
@@ -375,20 +318,17 @@ function VtxDatagrid(props) {
|
|
|
375
318
|
return "\u5171 ".concat(total, " \u6761");
|
|
376
319
|
}
|
|
377
320
|
}, pagination);
|
|
378
|
-
};
|
|
379
|
-
|
|
321
|
+
};
|
|
380
322
|
|
|
323
|
+
// 处理操作按钮
|
|
381
324
|
var columns = (visibleColumns || []).map(function (column) {
|
|
382
325
|
var newColumn = _objectSpread({}, column);
|
|
383
|
-
|
|
384
326
|
if (newColumn.renderButtons) {
|
|
385
327
|
delete newColumn.renderButtons;
|
|
386
328
|
}
|
|
387
|
-
|
|
388
329
|
if (newColumn.renderButtonsVisibleNum) {
|
|
389
330
|
delete newColumn.renderButtonsVisibleNum;
|
|
390
331
|
}
|
|
391
|
-
|
|
392
332
|
return _objectSpread(_objectSpread({}, newColumn), {}, {
|
|
393
333
|
render: (0, _isFunction["default"])(column.renderButtons) ? function (text, record, index) {
|
|
394
334
|
return (0, _renderColumnButtons["default"])(column.renderButtons, column.renderButtonsVisibleNum, text, record, index, customEnumText);
|
|
@@ -396,8 +336,8 @@ function VtxDatagrid(props) {
|
|
|
396
336
|
return ['', null, undefined].includes(text) ? '-' : text;
|
|
397
337
|
}
|
|
398
338
|
});
|
|
399
|
-
});
|
|
400
|
-
|
|
339
|
+
});
|
|
340
|
+
// 配置了列可伸缩
|
|
401
341
|
if (columnResizable) {
|
|
402
342
|
columns = columns.map(function (col, index) {
|
|
403
343
|
return _objectSpread(_objectSpread({}, col), {}, {
|
|
@@ -409,15 +349,12 @@ function VtxDatagrid(props) {
|
|
|
409
349
|
}
|
|
410
350
|
});
|
|
411
351
|
});
|
|
412
|
-
|
|
413
352
|
var handleResize = function handleResize(index) {
|
|
414
353
|
return function (e, _ref2) {
|
|
415
354
|
var size = _ref2.size;
|
|
416
355
|
setState(function (_ref3) {
|
|
417
356
|
var visibleColumns = _ref3.visibleColumns;
|
|
418
|
-
|
|
419
357
|
var nextColumns = _toConsumableArray(visibleColumns);
|
|
420
|
-
|
|
421
358
|
nextColumns[index] = _objectSpread(_objectSpread({}, nextColumns[index]), {}, {
|
|
422
359
|
width: size.width
|
|
423
360
|
});
|
|
@@ -427,14 +364,12 @@ function VtxDatagrid(props) {
|
|
|
427
364
|
});
|
|
428
365
|
};
|
|
429
366
|
};
|
|
430
|
-
}
|
|
431
|
-
|
|
367
|
+
}
|
|
432
368
|
|
|
369
|
+
// 序号添加
|
|
433
370
|
var dataSource = rest.dataSource;
|
|
434
|
-
|
|
435
371
|
if (indexColumn) {
|
|
436
372
|
var _dataSource;
|
|
437
|
-
|
|
438
373
|
columns = [{
|
|
439
374
|
title: indexTitle,
|
|
440
375
|
dataIndex: '_serialNum',
|
|
@@ -448,18 +383,15 @@ function VtxDatagrid(props) {
|
|
|
448
383
|
});
|
|
449
384
|
});
|
|
450
385
|
}
|
|
451
|
-
|
|
452
386
|
var scroll;
|
|
453
|
-
|
|
454
387
|
if (autoFit) {
|
|
455
388
|
scroll = _objectSpread(_objectSpread({}, rest.scroll || {}), {}, {
|
|
456
389
|
y: scrollY
|
|
457
390
|
});
|
|
458
391
|
}
|
|
459
|
-
|
|
460
392
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
461
393
|
id: datagridId,
|
|
462
|
-
className: (0, _classnames2["default"])(prefixCls, className, (
|
|
394
|
+
className: (0, _classnames2["default"])(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-fit"), autoFit), "".concat(prefixCls, "-noFit"), !autoFit), "".concat(prefixCls, "-nodata"), !((_dataSource2 = dataSource) !== null && _dataSource2 !== void 0 && _dataSource2.length)), "".concat(prefixCls, "-userAgent-mac"), isMac)),
|
|
463
395
|
style: style,
|
|
464
396
|
ref: datagridRef
|
|
465
397
|
}, toolbarRender, hasAlert && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -491,7 +423,6 @@ function VtxDatagrid(props) {
|
|
|
491
423
|
}) : components
|
|
492
424
|
})));
|
|
493
425
|
}
|
|
494
|
-
|
|
495
426
|
VtxDatagrid.propTypes = {
|
|
496
427
|
prefixCls: _propTypes["default"].string,
|
|
497
428
|
refreshIconVisible: _propTypes["default"].bool,
|