@vtx/components 3.1.17 → 3.1.18
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/CHANGELOG.md +1177 -0
- package/README.md +19 -19
- package/lib/_util/filterSpecialCharacters.js +49 -60
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +3 -0
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getUrlParam.js +6 -0
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/isFunction.js +1 -0
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js +1 -0
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/useColSize.js +10 -1
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js +3 -0
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +32 -14
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/index.js +33 -0
- 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 +21 -5
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js +2 -0
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js +2 -0
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-color-picker/style/index.less +12 -12
- package/lib/vtx-combogrid/Combogrid.js +74 -34
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +45 -20
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js +7 -0
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js +7 -0
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-combogrid/style/index.less +29 -29
- package/lib/vtx-datagrid/Alert.js +11 -3
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +44 -19
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +13 -2
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +140 -77
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +35 -5
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js +10 -0
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.js +10 -0
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/style/index.less +215 -215
- package/lib/vtx-date-picker/QdatePicker.js +46 -16
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +47 -6
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +5 -0
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js +1 -0
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js +1 -0
- 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 +23 -5
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js +1 -0
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js +1 -0
- 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 +20 -6
- package/lib/vtx-ellipsis-text/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/css.js +1 -0
- package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.js +1 -0
- 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 +66 -33
- package/lib/vtx-export/index.js.map +1 -1
- package/lib/vtx-export/style/css.js +5 -0
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js +5 -0
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-export/style/index.less +6 -6
- package/lib/vtx-form-layout/Card.js +26 -5
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +8 -0
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +30 -8
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +7 -2
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +6 -0
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +2 -0
- 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 +22 -8
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js +7 -0
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js +7 -0
- package/lib/vtx-form-layout/style/index.js.map +1 -1
- package/lib/vtx-image/Image.js +92 -56
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +51 -20
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +40 -11
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +6 -0
- package/lib/vtx-image/index.js.map +1 -1
- package/lib/vtx-image/style/css.js +1 -0
- package/lib/vtx-image/style/css.js.map +1 -1
- package/lib/vtx-image/style/index.js +1 -0
- package/lib/vtx-image/style/index.js.map +1 -1
- package/lib/vtx-image/style/index.less +63 -63
- package/lib/vtx-import/index.js +72 -37
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +24 -7
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js +3 -0
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js +3 -0
- 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 +6 -0
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +25 -4
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +4 -0
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +9 -3
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +4 -0
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +74 -34
- package/lib/vtx-import2/index.js.map +1 -1
- package/lib/vtx-import2/style/css.js +3 -0
- package/lib/vtx-import2/style/css.js.map +1 -1
- package/lib/vtx-import2/style/index.js +3 -0
- 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 +22 -6
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +37 -11
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js +1 -0
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js +1 -0
- 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 +16 -4
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +6 -1
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +72 -32
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js +1 -0
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.js +1 -0
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-modal/style/index.less +95 -95
- package/lib/vtx-page-layout/Basic.js +8 -4
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +19 -7
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +10 -2
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +55 -25
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +15 -3
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +34 -4
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +8 -0
- 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 +44 -21
- 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-rps-frame/style/index.less +8 -8
- package/lib/vtx-scrollable-row/index.js +57 -19
- 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 +21 -0
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +12 -6
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +93 -40
- package/lib/vtx-search/index.js.map +1 -1
- package/lib/vtx-search/style/css.js +4 -0
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js +4 -0
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search/style/index.less +83 -83
- package/lib/vtx-search-map-input/index.js +72 -42
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js +2 -0
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js +2 -0
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/index.js +65 -20
- package/lib/vtx-select/index.js.map +1 -1
- package/lib/vtx-select/style/css.js +8 -0
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js +8 -0
- 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 +28 -14
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js +2 -0
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js +2 -0
- 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 +14 -2
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +29 -9
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +98 -43
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +4 -0
- package/lib/vtx-split-pane/index.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js +3 -0
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js +3 -0
- 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 +7 -1
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +22 -5
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +22 -5
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +2 -0
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +16 -0
- 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 +16 -3
- 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 +28 -9
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +137 -67
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +5 -0
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +5 -0
- 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 +246 -0
- package/lib/vtx-wang-editor/index.js.map +1 -0
- package/lib/vtx-wang-editor/style/css.js +6 -0
- package/lib/vtx-wang-editor/style/css.js.map +1 -0
- package/lib/vtx-wang-editor/style/index.css +20 -0
- package/lib/vtx-wang-editor/style/index.js +6 -0
- package/lib/vtx-wang-editor/style/index.js.map +1 -0
- package/lib/vtx-wang-editor/style/index.less +24 -0
- package/lib/vtx-wang-editor/wangEditorUtil.js +229 -0
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -0
- package/lib/vtx-ztree/index.js +103 -51
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js +1 -0
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js +1 -0
- 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 +99 -43
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js +3 -0
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js +3 -0
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.less +74 -74
- package/package.json +126 -123
|
@@ -4,44 +4,68 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
8
10
|
var _popconfirm = _interopRequireDefault(require("antd/lib/popconfirm"));
|
|
11
|
+
|
|
9
12
|
var _dropdown = _interopRequireDefault(require("antd/lib/dropdown"));
|
|
13
|
+
|
|
10
14
|
var _menu = _interopRequireDefault(require("antd/lib/menu"));
|
|
15
|
+
|
|
11
16
|
var _divider = _interopRequireDefault(require("antd/lib/divider"));
|
|
17
|
+
|
|
12
18
|
var _DownOutlined = _interopRequireDefault(require("@ant-design/icons/DownOutlined"));
|
|
19
|
+
|
|
13
20
|
var _excluded = ["confirm"];
|
|
21
|
+
|
|
14
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
15
24
|
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); }
|
|
25
|
+
|
|
16
26
|
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; }
|
|
27
|
+
|
|
17
28
|
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; }
|
|
29
|
+
|
|
18
30
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
31
|
+
|
|
19
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."); }
|
|
33
|
+
|
|
20
34
|
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); }
|
|
35
|
+
|
|
21
36
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
37
|
+
|
|
22
38
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
39
|
+
|
|
23
40
|
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; }
|
|
41
|
+
|
|
24
42
|
var renderColumnButtons = function renderColumnButtons(renderButtons) {
|
|
25
43
|
var _renderButtons;
|
|
44
|
+
|
|
26
45
|
var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
|
|
27
46
|
var text = arguments.length > 2 ? arguments[2] : undefined;
|
|
28
47
|
var record = arguments.length > 3 ? arguments[3] : undefined;
|
|
29
48
|
var index = arguments.length > 4 ? arguments[4] : undefined;
|
|
30
49
|
var actions = (_renderButtons = renderButtons(text, record, index)) === null || _renderButtons === void 0 ? void 0 : _renderButtons.filter(function (item) {
|
|
31
50
|
var _item$visible;
|
|
51
|
+
|
|
32
52
|
return item && ((_item$visible = item.visible) !== null && _item$visible !== void 0 ? _item$visible : true);
|
|
33
53
|
});
|
|
54
|
+
|
|
34
55
|
if (!Array.isArray(actions)) {
|
|
35
56
|
return;
|
|
36
57
|
}
|
|
37
|
-
|
|
38
|
-
// 更多
|
|
58
|
+
|
|
59
|
+
var actionsLen = actions.length; // 更多
|
|
60
|
+
|
|
39
61
|
var moreRender;
|
|
40
62
|
var realVisible = visible;
|
|
63
|
+
|
|
41
64
|
if (actionsLen > visible) {
|
|
42
65
|
realVisible = realVisible - 1;
|
|
43
66
|
var moreActions = actions.slice(realVisible);
|
|
44
67
|
/* eslint-disable */
|
|
68
|
+
|
|
45
69
|
moreRender = /*#__PURE__*/_react["default"].createElement(_dropdown["default"], {
|
|
46
70
|
key: "more",
|
|
47
71
|
overlay: /*#__PURE__*/_react["default"].createElement(_menu["default"], {
|
|
@@ -55,19 +79,23 @@ var renderColumnButtons = function renderColumnButtons(renderButtons) {
|
|
|
55
79
|
}))
|
|
56
80
|
}, /*#__PURE__*/_react["default"].createElement("a", null, "\u66F4\u591A", /*#__PURE__*/_react["default"].createElement(_DownOutlined["default"], null)));
|
|
57
81
|
}
|
|
82
|
+
|
|
58
83
|
return [].concat(_toConsumableArray(actions.slice(0, realVisible).map(function (item, i) {
|
|
59
84
|
var name = item.name,
|
|
60
|
-
|
|
61
|
-
|
|
85
|
+
onClick = item.onClick,
|
|
86
|
+
popconfirm = item.popconfirm;
|
|
87
|
+
|
|
62
88
|
var btnNode = /*#__PURE__*/_react["default"].createElement("a", {
|
|
63
89
|
key: name,
|
|
64
90
|
onClick: onClick && !popconfirm ? function () {
|
|
65
91
|
return onClick(record, index);
|
|
66
92
|
} : undefined
|
|
67
93
|
}, name);
|
|
94
|
+
|
|
68
95
|
if (popconfirm) {
|
|
69
96
|
var confirm = popconfirm.confirm,
|
|
70
|
-
|
|
97
|
+
rest = _objectWithoutProperties(popconfirm, _excluded);
|
|
98
|
+
|
|
71
99
|
btnNode = /*#__PURE__*/_react["default"].createElement(_popconfirm["default"], _extends({}, rest, {
|
|
72
100
|
onConfirm: confirm ? function () {
|
|
73
101
|
return confirm(record, index);
|
|
@@ -75,12 +103,14 @@ var renderColumnButtons = function renderColumnButtons(renderButtons) {
|
|
|
75
103
|
key: name
|
|
76
104
|
}), btnNode);
|
|
77
105
|
}
|
|
106
|
+
|
|
78
107
|
return [btnNode, i != actionsLen - 1 && /*#__PURE__*/_react["default"].createElement(_divider["default"], {
|
|
79
108
|
key: i,
|
|
80
109
|
type: "vertical"
|
|
81
110
|
})];
|
|
82
111
|
})), [moreRender]);
|
|
83
112
|
};
|
|
113
|
+
|
|
84
114
|
var _default = renderColumnButtons;
|
|
85
115
|
exports["default"] = _default;
|
|
86
116
|
//# sourceMappingURL=renderColumnButtons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderColumnButtons.js","names":["renderColumnButtons","renderButtons","visible","text","record","index","actions","filter","item","Array","isArray","actionsLen","length","moreRender","realVisible","moreActions","slice","e","key","onClick","map","i","name","popconfirm","btnNode","undefined","confirm","rest"],"sources":["vtx-datagrid/renderColumnButtons.jsx"],"sourcesContent":["import React from 'react';\nimport Popconfirm from 'antd/lib/popconfirm';\nimport Dropdown from 'antd/lib/dropdown';\nimport Menu from 'antd/lib/menu';\nimport Divider from 'antd/lib/divider';\nimport DownOutlined from '@ant-design/icons/DownOutlined';\n\nconst renderColumnButtons = (renderButtons, visible = 4, text, record, index) => {\n const actions = renderButtons(text, record, index)?.filter(\n item => item && (item.visible ?? true),\n );\n if (!Array.isArray(actions)) {\n return;\n }\n const actionsLen = actions.length;\n // 更多\n let moreRender;\n let realVisible = visible;\n if (actionsLen > visible) {\n realVisible = realVisible - 1;\n const moreActions = actions.slice(realVisible);\n /* eslint-disable */\n moreRender = (\n <Dropdown\n key=\"more\"\n overlay={\n <Menu onClick={e => moreActions[e.key].onClick(record, index)}>\n {moreActions.map((item, i) => (\n <Menu.Item key={i}>{item.name}</Menu.Item>\n ))}\n </Menu>\n }\n >\n <a>\n 更多\n <DownOutlined />\n </a>\n </Dropdown>\n );\n }\n\n return [\n ...actions.slice(0, realVisible).map((item, i) => {\n const { name, onClick, popconfirm } = item;\n let btnNode = (\n <a\n key={name}\n onClick={onClick && !popconfirm ? () => onClick(record, index) : undefined}\n >\n {name}\n </a>\n );\n\n if (popconfirm) {\n const { confirm, ...rest } = popconfirm;\n btnNode = (\n <Popconfirm\n {...rest}\n onConfirm={confirm ? () => confirm(record, index) : undefined}\n key={name}\n >\n {btnNode}\n </Popconfirm>\n );\n }\n\n return [btnNode, i != actionsLen - 1 && <Divider key={i} type=\"vertical\" />];\n }),\n moreRender,\n ];\n};\n\nexport default renderColumnButtons;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderColumnButtons.js","names":["renderColumnButtons","renderButtons","visible","text","record","index","actions","filter","item","Array","isArray","actionsLen","length","moreRender","realVisible","moreActions","slice","e","key","onClick","map","i","name","popconfirm","btnNode","undefined","confirm","rest"],"sources":["vtx-datagrid/renderColumnButtons.jsx"],"sourcesContent":["import React from 'react';\r\nimport Popconfirm from 'antd/lib/popconfirm';\r\nimport Dropdown from 'antd/lib/dropdown';\r\nimport Menu from 'antd/lib/menu';\r\nimport Divider from 'antd/lib/divider';\r\nimport DownOutlined from '@ant-design/icons/DownOutlined';\r\n\r\nconst renderColumnButtons = (renderButtons, visible = 4, text, record, index) => {\r\n const actions = renderButtons(text, record, index)?.filter(\r\n item => item && (item.visible ?? true),\r\n );\r\n if (!Array.isArray(actions)) {\r\n return;\r\n }\r\n const actionsLen = actions.length;\r\n // 更多\r\n let moreRender;\r\n let realVisible = visible;\r\n if (actionsLen > visible) {\r\n realVisible = realVisible - 1;\r\n const moreActions = actions.slice(realVisible);\r\n /* eslint-disable */\r\n moreRender = (\r\n <Dropdown\r\n key=\"more\"\r\n overlay={\r\n <Menu onClick={e => moreActions[e.key].onClick(record, index)}>\r\n {moreActions.map((item, i) => (\r\n <Menu.Item key={i}>{item.name}</Menu.Item>\r\n ))}\r\n </Menu>\r\n }\r\n >\r\n <a>\r\n 更多\r\n <DownOutlined />\r\n </a>\r\n </Dropdown>\r\n );\r\n }\r\n\r\n return [\r\n ...actions.slice(0, realVisible).map((item, i) => {\r\n const { name, onClick, popconfirm } = item;\r\n let btnNode = (\r\n <a\r\n key={name}\r\n onClick={onClick && !popconfirm ? () => onClick(record, index) : undefined}\r\n >\r\n {name}\r\n </a>\r\n );\r\n\r\n if (popconfirm) {\r\n const { confirm, ...rest } = popconfirm;\r\n btnNode = (\r\n <Popconfirm\r\n {...rest}\r\n onConfirm={confirm ? () => confirm(record, index) : undefined}\r\n key={name}\r\n >\r\n {btnNode}\r\n </Popconfirm>\r\n );\r\n }\r\n\r\n return [btnNode, i != actionsLen - 1 && <Divider key={i} type=\"vertical\" />];\r\n }),\r\n moreRender,\r\n ];\r\n};\r\n\r\nexport default renderColumnButtons;\r\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,aAAD,EAAqD;EAAA;;EAAA,IAArCC,OAAqC,uEAA3B,CAA2B;EAAA,IAAxBC,IAAwB;EAAA,IAAlBC,MAAkB;EAAA,IAAVC,KAAU;EAC7E,IAAMC,OAAO,qBAAGL,aAAa,CAACE,IAAD,EAAOC,MAAP,EAAeC,KAAf,CAAhB,mDAAG,eAAoCE,MAApC,CACZ,UAAAC,IAAI;IAAA;;IAAA,OAAIA,IAAI,sBAAKA,IAAI,CAACN,OAAV,yDAAqB,IAArB,CAAR;EAAA,CADQ,CAAhB;;EAGA,IAAI,CAACO,KAAK,CAACC,OAAN,CAAcJ,OAAd,CAAL,EAA6B;IACzB;EACH;;EACD,IAAMK,UAAU,GAAGL,OAAO,CAACM,MAA3B,CAP6E,CAQ7E;;EACA,IAAIC,UAAJ;EACA,IAAIC,WAAW,GAAGZ,OAAlB;;EACA,IAAIS,UAAU,GAAGT,OAAjB,EAA0B;IACtBY,WAAW,GAAGA,WAAW,GAAG,CAA5B;IACA,IAAMC,WAAW,GAAGT,OAAO,CAACU,KAAR,CAAcF,WAAd,CAApB;IACA;;IACAD,UAAU,gBACN,gCAAC,oBAAD;MACI,GAAG,EAAC,MADR;MAEI,OAAO,eACH,gCAAC,gBAAD;QAAM,OAAO,EAAE,iBAAAI,CAAC;UAAA,OAAIF,WAAW,CAACE,CAAC,CAACC,GAAH,CAAX,CAAmBC,OAAnB,CAA2Bf,MAA3B,EAAmCC,KAAnC,CAAJ;QAAA;MAAhB,GACKU,WAAW,CAACK,GAAZ,CAAgB,UAACZ,IAAD,EAAOa,CAAP;QAAA,oBACb,gCAAC,gBAAD,CAAM,IAAN;UAAW,GAAG,EAAEA;QAAhB,GAAoBb,IAAI,CAACc,IAAzB,CADa;MAAA,CAAhB,CADL;IAHR,gBAUI,wEAEI,gCAAC,wBAAD,OAFJ,CAVJ,CADJ;EAiBH;;EAED,oCACOhB,OAAO,CAACU,KAAR,CAAc,CAAd,EAAiBF,WAAjB,EAA8BM,GAA9B,CAAkC,UAACZ,IAAD,EAAOa,CAAP,EAAa;IAC9C,IAAQC,IAAR,GAAsCd,IAAtC,CAAQc,IAAR;IAAA,IAAcH,OAAd,GAAsCX,IAAtC,CAAcW,OAAd;IAAA,IAAuBI,UAAvB,GAAsCf,IAAtC,CAAuBe,UAAvB;;IACA,IAAIC,OAAO,gBACP;MACI,GAAG,EAAEF,IADT;MAEI,OAAO,EAAEH,OAAO,IAAI,CAACI,UAAZ,GAAyB;QAAA,OAAMJ,OAAO,CAACf,MAAD,EAASC,KAAT,CAAb;MAAA,CAAzB,GAAwDoB;IAFrE,GAIKH,IAJL,CADJ;;IASA,IAAIC,UAAJ,EAAgB;MACZ,IAAQG,OAAR,GAA6BH,UAA7B,CAAQG,OAAR;MAAA,IAAoBC,IAApB,4BAA6BJ,UAA7B;;MACAC,OAAO,gBACH,gCAAC,sBAAD,eACQG,IADR;QAEI,SAAS,EAAED,OAAO,GAAG;UAAA,OAAMA,OAAO,CAACtB,MAAD,EAASC,KAAT,CAAb;QAAA,CAAH,GAAkCoB,SAFxD;QAGI,GAAG,EAAEH;MAHT,IAKKE,OALL,CADJ;IASH;;IAED,OAAO,CAACA,OAAD,EAAUH,CAAC,IAAIV,UAAU,GAAG,CAAlB,iBAAuB,gCAAC,mBAAD;MAAS,GAAG,EAAEU,CAAd;MAAiB,IAAI,EAAC;IAAtB,EAAjC,CAAP;EACH,CAzBE,CADP,IA2BIR,UA3BJ;AA6BH,CA/DD;;eAiEeb,mB"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("antd/lib/table/style/css");
|
|
4
|
+
|
|
4
5
|
require("antd/lib/tooltip/style/css");
|
|
6
|
+
|
|
5
7
|
require("antd/lib/popover/style/css");
|
|
8
|
+
|
|
6
9
|
require("antd/lib/checkbox/style/css");
|
|
10
|
+
|
|
7
11
|
require("antd/lib/popconfirm/style/css");
|
|
12
|
+
|
|
8
13
|
require("antd/lib/dropdown/style/css");
|
|
14
|
+
|
|
9
15
|
require("antd/lib/menu/style/css");
|
|
16
|
+
|
|
10
17
|
require("antd/lib/divider/style/css");
|
|
18
|
+
|
|
11
19
|
require("antd/lib/empty/style/css");
|
|
20
|
+
|
|
12
21
|
require("antd/lib/alert/style/css");
|
|
22
|
+
|
|
13
23
|
require("./index.css");
|
|
14
24
|
//# sourceMappingURL=css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["vtx-datagrid/style/index.js"],"sourcesContent":["import 'antd/lib/table/style';\nimport 'antd/lib/tooltip/style';\nimport 'antd/lib/popover/style';\nimport 'antd/lib/checkbox/style';\nimport 'antd/lib/popconfirm/style';\nimport 'antd/lib/dropdown/style';\nimport 'antd/lib/menu/style';\nimport 'antd/lib/divider/style';\nimport 'antd/lib/empty/style';\nimport 'antd/lib/alert/style';\nimport './index.less';\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-datagrid/style/index.js"],"sourcesContent":["import 'antd/lib/table/style';\r\nimport 'antd/lib/tooltip/style';\r\nimport 'antd/lib/popover/style';\r\nimport 'antd/lib/checkbox/style';\r\nimport 'antd/lib/popconfirm/style';\r\nimport 'antd/lib/dropdown/style';\r\nimport 'antd/lib/menu/style';\r\nimport 'antd/lib/divider/style';\r\nimport 'antd/lib/empty/style';\r\nimport 'antd/lib/alert/style';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("antd/lib/table/style");
|
|
4
|
+
|
|
4
5
|
require("antd/lib/tooltip/style");
|
|
6
|
+
|
|
5
7
|
require("antd/lib/popover/style");
|
|
8
|
+
|
|
6
9
|
require("antd/lib/checkbox/style");
|
|
10
|
+
|
|
7
11
|
require("antd/lib/popconfirm/style");
|
|
12
|
+
|
|
8
13
|
require("antd/lib/dropdown/style");
|
|
14
|
+
|
|
9
15
|
require("antd/lib/menu/style");
|
|
16
|
+
|
|
10
17
|
require("antd/lib/divider/style");
|
|
18
|
+
|
|
11
19
|
require("antd/lib/empty/style");
|
|
20
|
+
|
|
12
21
|
require("antd/lib/alert/style");
|
|
22
|
+
|
|
13
23
|
require("./index.less");
|
|
14
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["vtx-datagrid/style/index.js"],"sourcesContent":["import 'antd/lib/table/style';\nimport 'antd/lib/tooltip/style';\nimport 'antd/lib/popover/style';\nimport 'antd/lib/checkbox/style';\nimport 'antd/lib/popconfirm/style';\nimport 'antd/lib/dropdown/style';\nimport 'antd/lib/menu/style';\nimport 'antd/lib/divider/style';\nimport 'antd/lib/empty/style';\nimport 'antd/lib/alert/style';\nimport './index.less';\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-datagrid/style/index.js"],"sourcesContent":["import 'antd/lib/table/style';\r\nimport 'antd/lib/tooltip/style';\r\nimport 'antd/lib/popover/style';\r\nimport 'antd/lib/checkbox/style';\r\nimport 'antd/lib/popconfirm/style';\r\nimport 'antd/lib/dropdown/style';\r\nimport 'antd/lib/menu/style';\r\nimport 'antd/lib/divider/style';\r\nimport 'antd/lib/empty/style';\r\nimport 'antd/lib/alert/style';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA"}
|
|
@@ -1,215 +1,215 @@
|
|
|
1
|
-
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
-
@import '../../style/themes/index';
|
|
3
|
-
|
|
4
|
-
@prefix-cls: vtx-datagrid;
|
|
5
|
-
|
|
6
|
-
.@{prefix-cls} {
|
|
7
|
-
position: relative;
|
|
8
|
-
width: 100%;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
|
|
11
|
-
&-fit {
|
|
12
|
-
height: 100%;
|
|
13
|
-
.ant-table-container {
|
|
14
|
-
border-left: none !important;
|
|
15
|
-
table > thead > tr th:first-child {
|
|
16
|
-
border-left: 1px solid @table-border-color;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
.ant-table-body {
|
|
20
|
-
overflow-y: auto !important;
|
|
21
|
-
}
|
|
22
|
-
.ant-table-header,
|
|
23
|
-
.ant-table-body {
|
|
24
|
-
&::-webkit-scrollbar {
|
|
25
|
-
width: @webkit-scrollbar-width;
|
|
26
|
-
height: @webkit-scrollbar-height;
|
|
27
|
-
background-color: @webkit-scrollbar-color;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&::-webkit-scrollbar-thumb {
|
|
31
|
-
background-color: @webkit-scrollbar-thumb-color;
|
|
32
|
-
border-radius: @webkit-scrollbar-thumb-radius;
|
|
33
|
-
}
|
|
34
|
-
> table {
|
|
35
|
-
min-height: 1px;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
.ant-table-tbody > tr {
|
|
39
|
-
&:nth-child(odd) {
|
|
40
|
-
background: @table-row-odd;
|
|
41
|
-
> td {
|
|
42
|
-
background: @table-row-odd !important;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
> td:first-child {
|
|
46
|
-
border-left: 1px solid @table-border-color;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
.ant-table-fixed-header .ant-table-scroll .ant-table-header {
|
|
50
|
-
min-width: 5px !important;
|
|
51
|
-
}
|
|
52
|
-
.ant-table-pagination {
|
|
53
|
-
position: absolute;
|
|
54
|
-
right: 0;
|
|
55
|
-
bottom: 0;
|
|
56
|
-
}
|
|
57
|
-
.ant-spin-nested-loading {
|
|
58
|
-
height: 100%;
|
|
59
|
-
.ant-spin-container {
|
|
60
|
-
position: relative;
|
|
61
|
-
height: 100%;
|
|
62
|
-
.ant-table {
|
|
63
|
-
height: 100%;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
&-noFit {
|
|
69
|
-
.ant-table-tbody > tr {
|
|
70
|
-
&:nth-child(even) when(@theme=default) {
|
|
71
|
-
background: #f6f6f6;
|
|
72
|
-
> td {
|
|
73
|
-
background: #f6f6f6 !important;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// 固定列目前没有办法用细的滚动条
|
|
79
|
-
// .ant-table-has-fix-right {
|
|
80
|
-
// .ant-table-body {
|
|
81
|
-
// &::-webkit-scrollbar {
|
|
82
|
-
// width: 5px;
|
|
83
|
-
// height: 5px;
|
|
84
|
-
// }
|
|
85
|
-
// }
|
|
86
|
-
// }
|
|
87
|
-
// mac 和 windows下有差异,window chrome下滚动条宽度17px,mac chrome下15px
|
|
88
|
-
// &-userAgent-mac {
|
|
89
|
-
// .ant-table-has-fix-right {
|
|
90
|
-
// .ant-table-body {
|
|
91
|
-
// &::-webkit-scrollbar {
|
|
92
|
-
// width: 5px;
|
|
93
|
-
// height: 5px;
|
|
94
|
-
// }
|
|
95
|
-
// }
|
|
96
|
-
// }
|
|
97
|
-
// }
|
|
98
|
-
.ant-table-thead > tr > th when(@theme=default) {
|
|
99
|
-
// antd4.0 半透明会重叠
|
|
100
|
-
// background-color: fade(#1890ff, 8);
|
|
101
|
-
background-color: rgba(237, 246, 255, 1);
|
|
102
|
-
}
|
|
103
|
-
.ant-table-tbody > tr {
|
|
104
|
-
// &:nth-child(even) when(@theme=default) {
|
|
105
|
-
// background: #f6f6f6;
|
|
106
|
-
// }
|
|
107
|
-
|
|
108
|
-
&.ant-table-placeholder {
|
|
109
|
-
position: absolute;
|
|
110
|
-
top: 25%;
|
|
111
|
-
// top: auto;
|
|
112
|
-
right: 0;
|
|
113
|
-
// bottom: auto;
|
|
114
|
-
left: 0;
|
|
115
|
-
background-color: transparent;
|
|
116
|
-
border-top: none;
|
|
117
|
-
// height: 100%;
|
|
118
|
-
& > td.ant-table-cell {
|
|
119
|
-
display: flex;
|
|
120
|
-
align-items: center;
|
|
121
|
-
justify-content: center;
|
|
122
|
-
width: 100%;
|
|
123
|
-
height: 100%;
|
|
124
|
-
// border-right: @border-width-base @border-style-base @table-border-color;
|
|
125
|
-
// border-left: @border-width-base @border-style-base @table-border-color;
|
|
126
|
-
border: none;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
// fix: checkbox 选中时 固定列 最上面一层透明会 和下面重叠
|
|
131
|
-
// .ant-table-tbody > tr.ant-table-row-selected td {
|
|
132
|
-
// background: transparent;
|
|
133
|
-
// }
|
|
134
|
-
&-alert {
|
|
135
|
-
margin-bottom: 8px;
|
|
136
|
-
&-message when(@theme=default) {
|
|
137
|
-
color: fade(@black, 65%);
|
|
138
|
-
}
|
|
139
|
-
&-message when(@theme=dark) {
|
|
140
|
-
color: @text-color;
|
|
141
|
-
}
|
|
142
|
-
&-info-content > strong {
|
|
143
|
-
margin: 0 4px;
|
|
144
|
-
color: #13c2c2;
|
|
145
|
-
}
|
|
146
|
-
&-info-option {
|
|
147
|
-
margin-left: 10px;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
&-nodata {
|
|
151
|
-
.ant-table-scroll {
|
|
152
|
-
overflow-y: hidden;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
&-toolbar {
|
|
156
|
-
display: table;
|
|
157
|
-
width: 100%;
|
|
158
|
-
margin: 16px 0;
|
|
159
|
-
color: @text-color;
|
|
160
|
-
}
|
|
161
|
-
&-toolbar-left,
|
|
162
|
-
&-toolbar-right {
|
|
163
|
-
display: inline-block;
|
|
164
|
-
display: table-cell;
|
|
165
|
-
vertical-align: middle;
|
|
166
|
-
}
|
|
167
|
-
&-toolbar-left {
|
|
168
|
-
color: @text-color;
|
|
169
|
-
font-size: 16px;
|
|
170
|
-
}
|
|
171
|
-
&-toolbar-right {
|
|
172
|
-
float: right;
|
|
173
|
-
}
|
|
174
|
-
&-toolbar-setting-item {
|
|
175
|
-
display: inline-block;
|
|
176
|
-
margin-left: 16px;
|
|
177
|
-
color: @icon-color;
|
|
178
|
-
font-size: 16px;
|
|
179
|
-
vertical-align: middle;
|
|
180
|
-
cursor: pointer;
|
|
181
|
-
&:hover {
|
|
182
|
-
color: @icon-color-hover;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
&-column-setting-title {
|
|
186
|
-
height: 32px;
|
|
187
|
-
line-height: 32px;
|
|
188
|
-
a {
|
|
189
|
-
display: inline-block;
|
|
190
|
-
float: right;
|
|
191
|
-
vertical-align: middle;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
&-column-setting-checkbox-wrapper {
|
|
195
|
-
color: @text-color;
|
|
196
|
-
vertical-align: middle;
|
|
197
|
-
}
|
|
198
|
-
&-space-item {
|
|
199
|
-
display: inline-block;
|
|
200
|
-
vertical-align: middle;
|
|
201
|
-
}
|
|
202
|
-
.react-resizable {
|
|
203
|
-
position: relative;
|
|
204
|
-
background-clip: padding-box;
|
|
205
|
-
}
|
|
206
|
-
.react-resizable-handle {
|
|
207
|
-
position: absolute;
|
|
208
|
-
right: -5px;
|
|
209
|
-
bottom: 0;
|
|
210
|
-
z-index: 1;
|
|
211
|
-
width: 10px;
|
|
212
|
-
height: 100%;
|
|
213
|
-
cursor: col-resize;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
1
|
+
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
+
@import '../../style/themes/index';
|
|
3
|
+
|
|
4
|
+
@prefix-cls: vtx-datagrid;
|
|
5
|
+
|
|
6
|
+
.@{prefix-cls} {
|
|
7
|
+
position: relative;
|
|
8
|
+
width: 100%;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
|
|
11
|
+
&-fit {
|
|
12
|
+
height: 100%;
|
|
13
|
+
.ant-table-container {
|
|
14
|
+
border-left: none !important;
|
|
15
|
+
table > thead > tr th:first-child {
|
|
16
|
+
border-left: 1px solid @table-border-color;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
.ant-table-body {
|
|
20
|
+
overflow-y: auto !important;
|
|
21
|
+
}
|
|
22
|
+
.ant-table-header,
|
|
23
|
+
.ant-table-body {
|
|
24
|
+
&::-webkit-scrollbar {
|
|
25
|
+
width: @webkit-scrollbar-width;
|
|
26
|
+
height: @webkit-scrollbar-height;
|
|
27
|
+
background-color: @webkit-scrollbar-color;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&::-webkit-scrollbar-thumb {
|
|
31
|
+
background-color: @webkit-scrollbar-thumb-color;
|
|
32
|
+
border-radius: @webkit-scrollbar-thumb-radius;
|
|
33
|
+
}
|
|
34
|
+
> table {
|
|
35
|
+
min-height: 1px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.ant-table-tbody > tr {
|
|
39
|
+
&:nth-child(odd) {
|
|
40
|
+
background: @table-row-odd;
|
|
41
|
+
> td {
|
|
42
|
+
background: @table-row-odd !important;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
> td:first-child {
|
|
46
|
+
border-left: 1px solid @table-border-color;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.ant-table-fixed-header .ant-table-scroll .ant-table-header {
|
|
50
|
+
min-width: 5px !important;
|
|
51
|
+
}
|
|
52
|
+
.ant-table-pagination {
|
|
53
|
+
position: absolute;
|
|
54
|
+
right: 0;
|
|
55
|
+
bottom: 0;
|
|
56
|
+
}
|
|
57
|
+
.ant-spin-nested-loading {
|
|
58
|
+
height: 100%;
|
|
59
|
+
.ant-spin-container {
|
|
60
|
+
position: relative;
|
|
61
|
+
height: 100%;
|
|
62
|
+
.ant-table {
|
|
63
|
+
height: 100%;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
&-noFit {
|
|
69
|
+
.ant-table-tbody > tr {
|
|
70
|
+
&:nth-child(even) when(@theme=default) {
|
|
71
|
+
background: #f6f6f6;
|
|
72
|
+
> td {
|
|
73
|
+
background: #f6f6f6 !important;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// 固定列目前没有办法用细的滚动条
|
|
79
|
+
// .ant-table-has-fix-right {
|
|
80
|
+
// .ant-table-body {
|
|
81
|
+
// &::-webkit-scrollbar {
|
|
82
|
+
// width: 5px;
|
|
83
|
+
// height: 5px;
|
|
84
|
+
// }
|
|
85
|
+
// }
|
|
86
|
+
// }
|
|
87
|
+
// mac 和 windows下有差异,window chrome下滚动条宽度17px,mac chrome下15px
|
|
88
|
+
// &-userAgent-mac {
|
|
89
|
+
// .ant-table-has-fix-right {
|
|
90
|
+
// .ant-table-body {
|
|
91
|
+
// &::-webkit-scrollbar {
|
|
92
|
+
// width: 5px;
|
|
93
|
+
// height: 5px;
|
|
94
|
+
// }
|
|
95
|
+
// }
|
|
96
|
+
// }
|
|
97
|
+
// }
|
|
98
|
+
.ant-table-thead > tr > th when(@theme=default) {
|
|
99
|
+
// antd4.0 半透明会重叠
|
|
100
|
+
// background-color: fade(#1890ff, 8);
|
|
101
|
+
background-color: rgba(237, 246, 255, 1);
|
|
102
|
+
}
|
|
103
|
+
.ant-table-tbody > tr {
|
|
104
|
+
// &:nth-child(even) when(@theme=default) {
|
|
105
|
+
// background: #f6f6f6;
|
|
106
|
+
// }
|
|
107
|
+
|
|
108
|
+
&.ant-table-placeholder {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 25%;
|
|
111
|
+
// top: auto;
|
|
112
|
+
right: 0;
|
|
113
|
+
// bottom: auto;
|
|
114
|
+
left: 0;
|
|
115
|
+
background-color: transparent;
|
|
116
|
+
border-top: none;
|
|
117
|
+
// height: 100%;
|
|
118
|
+
& > td.ant-table-cell {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
width: 100%;
|
|
123
|
+
height: 100%;
|
|
124
|
+
// border-right: @border-width-base @border-style-base @table-border-color;
|
|
125
|
+
// border-left: @border-width-base @border-style-base @table-border-color;
|
|
126
|
+
border: none;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// fix: checkbox 选中时 固定列 最上面一层透明会 和下面重叠
|
|
131
|
+
// .ant-table-tbody > tr.ant-table-row-selected td {
|
|
132
|
+
// background: transparent;
|
|
133
|
+
// }
|
|
134
|
+
&-alert {
|
|
135
|
+
margin-bottom: 8px;
|
|
136
|
+
&-message when(@theme=default) {
|
|
137
|
+
color: fade(@black, 65%);
|
|
138
|
+
}
|
|
139
|
+
&-message when(@theme=dark) {
|
|
140
|
+
color: @text-color;
|
|
141
|
+
}
|
|
142
|
+
&-info-content > strong {
|
|
143
|
+
margin: 0 4px;
|
|
144
|
+
color: #13c2c2;
|
|
145
|
+
}
|
|
146
|
+
&-info-option {
|
|
147
|
+
margin-left: 10px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
&-nodata {
|
|
151
|
+
.ant-table-scroll {
|
|
152
|
+
overflow-y: hidden;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
&-toolbar {
|
|
156
|
+
display: table;
|
|
157
|
+
width: 100%;
|
|
158
|
+
margin: 16px 0;
|
|
159
|
+
color: @text-color;
|
|
160
|
+
}
|
|
161
|
+
&-toolbar-left,
|
|
162
|
+
&-toolbar-right {
|
|
163
|
+
display: inline-block;
|
|
164
|
+
display: table-cell;
|
|
165
|
+
vertical-align: middle;
|
|
166
|
+
}
|
|
167
|
+
&-toolbar-left {
|
|
168
|
+
color: @text-color;
|
|
169
|
+
font-size: 16px;
|
|
170
|
+
}
|
|
171
|
+
&-toolbar-right {
|
|
172
|
+
float: right;
|
|
173
|
+
}
|
|
174
|
+
&-toolbar-setting-item {
|
|
175
|
+
display: inline-block;
|
|
176
|
+
margin-left: 16px;
|
|
177
|
+
color: @icon-color;
|
|
178
|
+
font-size: 16px;
|
|
179
|
+
vertical-align: middle;
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
&:hover {
|
|
182
|
+
color: @icon-color-hover;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
&-column-setting-title {
|
|
186
|
+
height: 32px;
|
|
187
|
+
line-height: 32px;
|
|
188
|
+
a {
|
|
189
|
+
display: inline-block;
|
|
190
|
+
float: right;
|
|
191
|
+
vertical-align: middle;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
&-column-setting-checkbox-wrapper {
|
|
195
|
+
color: @text-color;
|
|
196
|
+
vertical-align: middle;
|
|
197
|
+
}
|
|
198
|
+
&-space-item {
|
|
199
|
+
display: inline-block;
|
|
200
|
+
vertical-align: middle;
|
|
201
|
+
}
|
|
202
|
+
.react-resizable {
|
|
203
|
+
position: relative;
|
|
204
|
+
background-clip: padding-box;
|
|
205
|
+
}
|
|
206
|
+
.react-resizable-handle {
|
|
207
|
+
position: absolute;
|
|
208
|
+
right: -5px;
|
|
209
|
+
bottom: 0;
|
|
210
|
+
z-index: 1;
|
|
211
|
+
width: 10px;
|
|
212
|
+
height: 100%;
|
|
213
|
+
cursor: col-resize;
|
|
214
|
+
}
|
|
215
|
+
}
|