cloud-b2b 1.1.57 → 1.1.59
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/package.json +44 -22
- package/src/Area/Area.js +94 -0
- package/src/Card/Card.js +16 -0
- package/src/CodeInput/CodeInput.js +76 -0
- package/src/Control/Control.js +338 -0
- package/src/Control/event.js +45 -0
- package/src/Enhance/Dialogs.js +24 -0
- package/src/Enhance/Loading.js +83 -0
- package/{es → src}/Enhance/index.js +8 -6
- package/src/Header/Header.js +149 -0
- package/src/Header/Vertical.js +74 -0
- package/src/ImageView/ImageView.js +62 -0
- package/src/Indent/Indent.js +12 -0
- package/src/InpurCascader/InputCascader.js +83 -0
- package/src/InputEditor/InputEditor.js +93 -0
- package/src/InputSearch/InputSearch.js +186 -0
- package/src/InputSelect/InputSelect.js +103 -0
- package/src/InputTreeSelect/InputTreeSelect.js +87 -0
- package/src/InputWriting/InputWriting.js +65 -0
- package/src/Layout/Layout.js +121 -0
- package/src/LayoutLink/LayoutLink.js +59 -0
- package/src/Link/Link.js +57 -0
- package/src/Loading/Loading.js +15 -0
- package/src/Loading2/Loading2.js +15 -0
- package/src/ModalWithDrag/ModalWithDrag.js +17 -0
- package/{es → src}/ModalWithDrag/drag.js +128 -116
- package/src/NumberInput/NumberInput.js +137 -0
- package/src/Search/Search.js +368 -0
- package/src/Search2/Search.js +436 -0
- package/{lib/Search → src/Search2}/Search.less +65 -63
- package/{lib/Search → src/Search2}/package.json +6 -6
- package/src/Sidebar/Sidebar.js +111 -0
- package/src/Sidebar2/Sidebar.js +143 -0
- package/src/SuperForm/SuperForm.js +519 -0
- package/src/SuperForm2/SuperForm.js +588 -0
- package/src/SuperIcon/SuperIcon.js +14 -0
- package/src/SuperPagination/SuperPagination.js +65 -0
- package/src/SuperTab/SuperTab.js +84 -0
- package/src/SuperTab2/SuperTab2.js +94 -0
- package/src/SuperTable/DragSortRow.js +62 -0
- package/src/SuperTable/FilterDropDown.js +111 -0
- package/src/SuperTable/SuperTable.js +590 -0
- package/src/SuperTable/fixed.js +34 -0
- package/src/SuperTable2/SuperTable2.js +624 -0
- package/src/SuperTable2/SuperTableCell.js +175 -0
- package/src/SuperTable3/FilterDropDown.js +111 -0
- package/src/SuperTable3/SuperTable.js +498 -0
- package/src/SuperTable3/fixed.js +34 -0
- package/src/SuperToolbar/SuperToolbar.js +128 -0
- package/src/SuperUpload/SuperUpload.js +137 -0
- package/src/Title/Title.js +18 -0
- package/src/Viewer/ImageViews.js +220 -0
- package/src/Viewer/Viewer.js +97 -0
- package/src/WingBlank/WingBlank.js +14 -0
- package/src/helper.js +185 -0
- package/{es → src}/history.js +6 -6
- package/src/index.js +39 -0
- package/src/variables.js +5 -0
- package/test/index.html +10 -0
- package/test/test.js +16 -0
- package/test/test.less +12 -0
- package/test/webpack.config.js +71 -0
- package/tools/babel.config.js +14 -0
- package/tools/build.js +70 -0
- package/tools/publish.js +9 -0
- package/tools/util.js +53 -0
- package/es/Area/Area.js +0 -138
- package/es/Card/Card.js +0 -19
- package/es/CodeInput/CodeInput.js +0 -120
- package/es/Control/Control.js +0 -444
- package/es/Control/event.js +0 -43
- package/es/Enhance/Dialogs.js +0 -49
- package/es/Enhance/Loading.js +0 -128
- package/es/Header/Header.js +0 -159
- package/es/Header/Vertical.js +0 -103
- package/es/ImageView/ImageView.js +0 -97
- package/es/Indent/Indent.js +0 -19
- package/es/InpurCascader/InputCascader.js +0 -114
- package/es/InputEditor/InputEditor.js +0 -171
- package/es/InputSearch/InputSearch.js +0 -263
- package/es/InputSelect/InputSelect.js +0 -157
- package/es/InputTreeSelect/InputTreeSelect.js +0 -118
- package/es/InputWriting/InputWriting.js +0 -82
- package/es/Layout/Layout.js +0 -198
- package/es/LayoutLink/LayoutLink.js +0 -73
- package/es/Link/Link.js +0 -82
- package/es/Loading/Loading.js +0 -13
- package/es/Loading2/Loading2.js +0 -9
- package/es/ModalWithDrag/ModalWithDrag.js +0 -29
- package/es/NumberInput/NumberInput.js +0 -197
- package/es/Search/Search.js +0 -494
- package/es/Sidebar/Sidebar.js +0 -141
- package/es/Sidebar2/Sidebar.js +0 -162
- package/es/SuperForm/SuperForm.js +0 -593
- package/es/SuperForm2/SuperForm.js +0 -682
- package/es/SuperIcon/SuperIcon.js +0 -27
- package/es/SuperPagination/SuperPagination.js +0 -106
- package/es/SuperTab/SuperTab.js +0 -104
- package/es/SuperTab2/SuperTab2.js +0 -142
- package/es/SuperTable/DragSortRow.js +0 -94
- package/es/SuperTable/FilterDropDown.js +0 -161
- package/es/SuperTable/SuperTable.js +0 -805
- package/es/SuperTable/fixed.js +0 -34
- package/es/SuperTable2/SuperTable2.js +0 -923
- package/es/SuperTable2/SuperTableCell.js +0 -215
- package/es/SuperTable3/FilterDropDown.js +0 -161
- package/es/SuperTable3/SuperTable.js +0 -662
- package/es/SuperTable3/fixed.js +0 -34
- package/es/SuperToolbar/SuperToolbar.js +0 -192
- package/es/SuperUpload/SuperUpload.js +0 -356
- package/es/Title/Title.js +0 -33
- package/es/Viewer/ImageViews.js +0 -255
- package/es/Viewer/Viewer.js +0 -119
- package/es/WingBlank/WingBlank.js +0 -16
- package/es/helper.js +0 -241
- package/es/index.js +0 -37
- package/es/variables.js +0 -6
- package/lib/Area/Area.js +0 -146
- package/lib/Area/package.json +0 -6
- package/lib/Card/Card.js +0 -27
- package/lib/Card/package.json +0 -6
- package/lib/CodeInput/CodeInput.js +0 -128
- package/lib/CodeInput/package.json +0 -6
- package/lib/Control/Control.js +0 -450
- package/lib/Control/event.js +0 -51
- package/lib/Control/package.json +0 -6
- package/lib/Enhance/Dialogs.js +0 -57
- package/lib/Enhance/Loading.js +0 -135
- package/lib/Enhance/index.js +0 -25
- package/lib/Enhance/package.json +0 -6
- package/lib/Header/Header.js +0 -166
- package/lib/Header/Header.less +0 -95
- package/lib/Header/Vertical.js +0 -111
- package/lib/Header/Vertical.less +0 -60
- package/lib/Header/package.json +0 -6
- package/lib/ImageView/ImageView.js +0 -105
- package/lib/ImageView/ImageView.less +0 -14
- package/lib/ImageView/package.json +0 -6
- package/lib/Indent/Indent.js +0 -27
- package/lib/Indent/package.json +0 -6
- package/lib/InpurCascader/InputCascader.js +0 -121
- package/lib/InpurCascader/package.json +0 -6
- package/lib/InputEditor/InputEditor.js +0 -179
- package/lib/InputEditor/inputEditor.less +0 -8
- package/lib/InputEditor/package.json +0 -6
- package/lib/InputSearch/InputSearch.js +0 -271
- package/lib/InputSearch/package.json +0 -6
- package/lib/InputSelect/InputSelect.js +0 -165
- package/lib/InputSelect/package.json +0 -6
- package/lib/InputTreeSelect/InputTreeSelect.js +0 -125
- package/lib/InputTreeSelect/package.json +0 -6
- package/lib/InputWriting/InputWriting.js +0 -90
- package/lib/InputWriting/package.json +0 -6
- package/lib/Layout/Layout.js +0 -206
- package/lib/Layout/Layout.less +0 -28
- package/lib/Layout/package.json +0 -6
- package/lib/LayoutLink/LayoutLink.js +0 -85
- package/lib/LayoutLink/LayoutLink.less +0 -53
- package/lib/LayoutLink/package.json +0 -6
- package/lib/Link/Link.js +0 -90
- package/lib/Link/package.json +0 -6
- package/lib/Loading/Loading.js +0 -21
- package/lib/Loading/Loading.less +0 -13
- package/lib/Loading/package.json +0 -6
- package/lib/Loading2/Loading2.js +0 -17
- package/lib/Loading2/Loading2.less +0 -19
- package/lib/Loading2/package.json +0 -6
- package/lib/ModalWithDrag/ModalWithDrag.js +0 -37
- package/lib/ModalWithDrag/ModalWithDrag.less +0 -6
- package/lib/ModalWithDrag/drag.js +0 -124
- package/lib/ModalWithDrag/package.json +0 -6
- package/lib/NumberInput/NumberInput.js +0 -205
- package/lib/NumberInput/package.json +0 -6
- package/lib/Search/Search.js +0 -506
- package/lib/Sidebar/Sidebar.js +0 -149
- package/lib/Sidebar/Sidebar.less +0 -78
- package/lib/Sidebar/package.json +0 -6
- package/lib/Sidebar2/Sidebar.js +0 -170
- package/lib/Sidebar2/Sidebar.less +0 -153
- package/lib/Sidebar2/package.json +0 -6
- package/lib/SuperForm/SuperForm.js +0 -604
- package/lib/SuperForm/SuperForm.less +0 -52
- package/lib/SuperForm/package.json +0 -6
- package/lib/SuperForm2/SuperForm.js +0 -693
- package/lib/SuperForm2/SuperForm.less +0 -52
- package/lib/SuperForm2/package.json +0 -6
- package/lib/SuperIcon/SuperIcon.js +0 -35
- package/lib/SuperIcon/package.json +0 -6
- package/lib/SuperPagination/SuperPagination.js +0 -114
- package/lib/SuperPagination/package.json +0 -6
- package/lib/SuperTab/SuperTab.js +0 -112
- package/lib/SuperTab/SuperTab.less +0 -43
- package/lib/SuperTab/package.json +0 -6
- package/lib/SuperTab2/SuperTab2.js +0 -150
- package/lib/SuperTab2/SuperTab2.less +0 -18
- package/lib/SuperTab2/package.json +0 -6
- package/lib/SuperTable/DragSortRow.js +0 -102
- package/lib/SuperTable/DragSortRow.less +0 -17
- package/lib/SuperTable/FilterDropDown.js +0 -169
- package/lib/SuperTable/FilterDropDown.less +0 -30
- package/lib/SuperTable/SuperTable.js +0 -813
- package/lib/SuperTable/SuperTable.less +0 -132
- package/lib/SuperTable/fixed.js +0 -42
- package/lib/SuperTable/package.json +0 -6
- package/lib/SuperTable2/SuperTable2.js +0 -935
- package/lib/SuperTable2/SuperTable2.less +0 -118
- package/lib/SuperTable2/SuperTableCell.js +0 -220
- package/lib/SuperTable2/package.json +0 -6
- package/lib/SuperTable3/FilterDropDown.js +0 -169
- package/lib/SuperTable3/FilterDropDown.less +0 -29
- package/lib/SuperTable3/SuperTable.js +0 -670
- package/lib/SuperTable3/SuperTable.less +0 -99
- package/lib/SuperTable3/fixed.js +0 -42
- package/lib/SuperTable3/package.json +0 -6
- package/lib/SuperToolbar/SuperToolbar.js +0 -200
- package/lib/SuperToolbar/SuperToolbar.less +0 -17
- package/lib/SuperToolbar/package.json +0 -6
- package/lib/SuperUpload/SuperUpload.js +0 -367
- package/lib/SuperUpload/SuperUpload.less +0 -28
- package/lib/SuperUpload/package.json +0 -6
- package/lib/Title/Title.js +0 -41
- package/lib/Title/Title.less +0 -35
- package/lib/Title/package.json +0 -6
- package/lib/Viewer/ImageViews.js +0 -263
- package/lib/Viewer/Viewer.js +0 -127
- package/lib/Viewer/Viewer.less +0 -67
- package/lib/Viewer/imgView.less +0 -59
- package/lib/Viewer/package.json +0 -7
- package/lib/WingBlank/WingBlank.js +0 -24
- package/lib/WingBlank/WingBlank.less +0 -12
- package/lib/WingBlank/package.json +0 -6
- package/lib/adjust.less +0 -89
- package/lib/helper.js +0 -247
- package/lib/history.js +0 -12
- package/lib/index.js +0 -271
- package/lib/index.less +0 -31
- package/lib/style.less +0 -30
- package/lib/variables.js +0 -14
- package/lib/variables.less +0 -73
- /package/{es → src}/Area/package.json +0 -0
- /package/{es → src}/Card/package.json +0 -0
- /package/{es → src}/CodeInput/package.json +0 -0
- /package/{es → src}/Control/package.json +0 -0
- /package/{es → src}/Enhance/package.json +0 -0
- /package/{es → src}/Header/Header.less +0 -0
- /package/{es → src}/Header/Vertical.less +0 -0
- /package/{es → src}/Header/package.json +0 -0
- /package/{es → src}/ImageView/ImageView.less +0 -0
- /package/{es → src}/ImageView/package.json +0 -0
- /package/{es → src}/Indent/package.json +0 -0
- /package/{es → src}/InpurCascader/package.json +0 -0
- /package/{es → src}/InputEditor/inputEditor.less +0 -0
- /package/{es → src}/InputEditor/package.json +0 -0
- /package/{es → src}/InputSearch/package.json +0 -0
- /package/{es → src}/InputSelect/package.json +0 -0
- /package/{es → src}/InputTreeSelect/package.json +0 -0
- /package/{es → src}/InputWriting/package.json +0 -0
- /package/{es → src}/Layout/Layout.less +0 -0
- /package/{es → src}/Layout/package.json +0 -0
- /package/{es → src}/LayoutLink/LayoutLink.less +0 -0
- /package/{es → src}/LayoutLink/package.json +0 -0
- /package/{es → src}/Link/package.json +0 -0
- /package/{es → src}/Loading/Loading.less +0 -0
- /package/{es → src}/Loading/package.json +0 -0
- /package/{es → src}/Loading2/Loading2.less +0 -0
- /package/{es → src}/Loading2/package.json +0 -0
- /package/{es → src}/ModalWithDrag/ModalWithDrag.less +0 -0
- /package/{es → src}/ModalWithDrag/package.json +0 -0
- /package/{es → src}/NumberInput/package.json +0 -0
- /package/{es → src}/Search/Search.less +0 -0
- /package/{es → src}/Search/package.json +0 -0
- /package/{es → src}/Sidebar/Sidebar.less +0 -0
- /package/{es → src}/Sidebar/package.json +0 -0
- /package/{es → src}/Sidebar2/Sidebar.less +0 -0
- /package/{es → src}/Sidebar2/package.json +0 -0
- /package/{es → src}/SuperForm/SuperForm.less +0 -0
- /package/{es → src}/SuperForm/package.json +0 -0
- /package/{es → src}/SuperForm2/SuperForm.less +0 -0
- /package/{es → src}/SuperForm2/package.json +0 -0
- /package/{es → src}/SuperIcon/package.json +0 -0
- /package/{es → src}/SuperPagination/package.json +0 -0
- /package/{es → src}/SuperTab/SuperTab.less +0 -0
- /package/{es → src}/SuperTab/package.json +0 -0
- /package/{es → src}/SuperTab2/SuperTab2.less +0 -0
- /package/{es → src}/SuperTab2/package.json +0 -0
- /package/{es → src}/SuperTable/DragSortRow.less +0 -0
- /package/{es → src}/SuperTable/FilterDropDown.less +0 -0
- /package/{es → src}/SuperTable/SuperTable.less +0 -0
- /package/{es → src}/SuperTable/package.json +0 -0
- /package/{es → src}/SuperTable2/SuperTable2.less +0 -0
- /package/{es → src}/SuperTable2/package.json +0 -0
- /package/{es → src}/SuperTable3/FilterDropDown.less +0 -0
- /package/{es → src}/SuperTable3/SuperTable.less +0 -0
- /package/{es → src}/SuperTable3/package.json +0 -0
- /package/{es → src}/SuperToolbar/SuperToolbar.less +0 -0
- /package/{es → src}/SuperToolbar/package.json +0 -0
- /package/{es → src}/SuperUpload/SuperUpload.less +0 -0
- /package/{es → src}/SuperUpload/package.json +0 -0
- /package/{es → src}/Title/Title.less +0 -0
- /package/{es → src}/Title/package.json +0 -0
- /package/{es → src}/Viewer/Viewer.less +0 -0
- /package/{es → src}/Viewer/imgView.less +0 -0
- /package/{es → src}/Viewer/package.json +0 -0
- /package/{es → src}/WingBlank/WingBlank.less +0 -0
- /package/{es → src}/WingBlank/package.json +0 -0
- /package/{es → src}/adjust.less +0 -0
- /package/{es → src}/style.less +0 -0
- /package/{es → src}/variables.less +0 -0
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-SuperForm2 {
|
|
4
|
-
position: relative;
|
|
5
|
-
|
|
6
|
-
> form {
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
|
|
9
|
-
> div {
|
|
10
|
-
margin-bottom: -6px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
[role='add'] {
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
margin-left: 4px;
|
|
16
|
-
color: @primary-color;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:global(.ant-form-item-label) {
|
|
20
|
-
line-height: 16px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:global(.ant-form-item-control) > span > textArea {
|
|
24
|
-
min-height: 22px !important;
|
|
25
|
-
margin-bottom: 0 !important;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:global(.ant-form-item-control) input,
|
|
29
|
-
:global(.ant-calendar-picker),
|
|
30
|
-
:global(.ant-select) {
|
|
31
|
-
display: block;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:global(.ant-select-selection--multiple) {
|
|
35
|
-
border-top-width: 1px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:global(.ant-radio-group-small) {
|
|
39
|
-
display: block;
|
|
40
|
-
height: @input-height-sm;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.checkbox {
|
|
44
|
-
position: absolute;
|
|
45
|
-
top:15px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.formItemWithCheckbox{
|
|
49
|
-
margin-left: 20px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
var _icon = _interopRequireDefault(require("antd/lib/icon"));
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
11
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
var _excluded = ["type", "style"];
|
|
14
|
-
var SuperIcon = function SuperIcon(_ref) {
|
|
15
|
-
var type = _ref.type,
|
|
16
|
-
_ref$style = _ref.style,
|
|
17
|
-
style = _ref$style === void 0 ? {} : _ref$style,
|
|
18
|
-
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
19
|
-
if (!type) {
|
|
20
|
-
return /*#__PURE__*/_react["default"].createElement(_icon["default"], (0, _extends2["default"])({
|
|
21
|
-
style: style
|
|
22
|
-
}, props));
|
|
23
|
-
} else if (type.substring(0, 4) !== 'pld-') {
|
|
24
|
-
return /*#__PURE__*/_react["default"].createElement(_icon["default"], (0, _extends2["default"])({
|
|
25
|
-
type: type,
|
|
26
|
-
style: style
|
|
27
|
-
}, props));
|
|
28
|
-
} else {
|
|
29
|
-
return /*#__PURE__*/_react["default"].createElement("i", {
|
|
30
|
-
className: "pldicon anticon anticon-".concat(type),
|
|
31
|
-
style: style
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
var _default = exports["default"] = SuperIcon;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|
|
4
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports["default"] = void 0;
|
|
10
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
11
|
-
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
|
12
|
-
var _pagination = _interopRequireDefault(require("antd/lib/pagination"));
|
|
13
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
15
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
16
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
17
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
18
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
19
|
-
var _react = _interopRequireDefault(require("react"));
|
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
22
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
-
/**
|
|
24
|
-
* maxRecords: 最大记录数
|
|
25
|
-
* selRecords: [可选]已选记录条数
|
|
26
|
-
* currentPage:当前页码
|
|
27
|
-
* pageSize:页面大小
|
|
28
|
-
* align: 分页组件的对齐方式,默认居右
|
|
29
|
-
* pageSizeType: 字符串数组,页面大小规格
|
|
30
|
-
* description:字符串描述,类似'共有{maxRecords}条记录'
|
|
31
|
-
* onPageChange:跳转到新的一页时触发,原型func(pageNumber)
|
|
32
|
-
* onPageSizeChange: 页大小改变时触发,原型func(pageSize, pageNumber)
|
|
33
|
-
*/
|
|
34
|
-
var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
35
|
-
function SuperPagination() {
|
|
36
|
-
var _context;
|
|
37
|
-
var _this;
|
|
38
|
-
(0, _classCallCheck2["default"])(this, SuperPagination);
|
|
39
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
40
|
-
args[_key] = arguments[_key];
|
|
41
|
-
}
|
|
42
|
-
_this = _callSuper(this, SuperPagination, (0, _concat["default"])(_context = []).call(_context, args));
|
|
43
|
-
(0, _defineProperty2["default"])(_this, "onChange", function (page) {
|
|
44
|
-
var _this$props$callback = _this.props.callback,
|
|
45
|
-
callback = _this$props$callback === void 0 ? {} : _this$props$callback;
|
|
46
|
-
var onPageNumberChange = _this.props.onPageNumberChange || callback.onPageNumberChange;
|
|
47
|
-
onPageNumberChange && onPageNumberChange(page);
|
|
48
|
-
});
|
|
49
|
-
(0, _defineProperty2["default"])(_this, "onShowSizeChange", function (current, size) {
|
|
50
|
-
var _this$props$callback2 = _this.props.callback,
|
|
51
|
-
callback = _this$props$callback2 === void 0 ? {} : _this$props$callback2;
|
|
52
|
-
var onPageSizeChange = _this.props.onPageSizeChange || callback.onPageSizeChange;
|
|
53
|
-
onPageSizeChange && onPageSizeChange(size, current || 1);
|
|
54
|
-
});
|
|
55
|
-
return _this;
|
|
56
|
-
}
|
|
57
|
-
(0, _inherits2["default"])(SuperPagination, _React$Component);
|
|
58
|
-
return (0, _createClass2["default"])(SuperPagination, [{
|
|
59
|
-
key: "render",
|
|
60
|
-
value: function render() {
|
|
61
|
-
var _this$props = this.props,
|
|
62
|
-
currentPage = _this$props.currentPage,
|
|
63
|
-
maxRecords = _this$props.maxRecords,
|
|
64
|
-
pageSize = _this$props.pageSize,
|
|
65
|
-
pageSizeType = _this$props.pageSizeType,
|
|
66
|
-
align = _this$props.align,
|
|
67
|
-
description = _this$props.description,
|
|
68
|
-
selRecords = _this$props.selRecords,
|
|
69
|
-
_this$props$page = _this$props.page,
|
|
70
|
-
page = _this$props$page === void 0 ? {} : _this$props$page,
|
|
71
|
-
_this$props$option = _this$props.option,
|
|
72
|
-
option = _this$props$option === void 0 ? {} : _this$props$option,
|
|
73
|
-
_this$props$style = _this$props.style,
|
|
74
|
-
style = _this$props$style === void 0 ? {} : _this$props$style;
|
|
75
|
-
var desp = description || (this.props.config || {}).pageDesp || '';
|
|
76
|
-
var props = {
|
|
77
|
-
current: currentPage || page.currentPage,
|
|
78
|
-
total: maxRecords || page.maxRecords,
|
|
79
|
-
pageSize: pageSize || page.pageSize,
|
|
80
|
-
showSizeChanger: true,
|
|
81
|
-
showQuickJumper: true,
|
|
82
|
-
pageSizeOptions: pageSizeType || option.pageSizeType || [],
|
|
83
|
-
onChange: this.onChange,
|
|
84
|
-
onShowSizeChange: this.onShowSizeChange,
|
|
85
|
-
showTotal: function showTotal(total) {
|
|
86
|
-
return desp.replace('{maxRecords}', total).replace('{selRecords}', selRecords || 0);
|
|
87
|
-
},
|
|
88
|
-
style: (0, _assign["default"])({}, style, {
|
|
89
|
-
display: 'inline-block',
|
|
90
|
-
textAlign: 'left',
|
|
91
|
-
verticalAlign: 'top'
|
|
92
|
-
})
|
|
93
|
-
};
|
|
94
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
95
|
-
style: {
|
|
96
|
-
textAlign: align || 'right'
|
|
97
|
-
}
|
|
98
|
-
}, /*#__PURE__*/_react["default"].createElement(_pagination["default"], props));
|
|
99
|
-
}
|
|
100
|
-
}]);
|
|
101
|
-
}(_react["default"].Component);
|
|
102
|
-
(0, _defineProperty2["default"])(SuperPagination, "propTypes", {
|
|
103
|
-
maxRecords: _propTypes["default"].number,
|
|
104
|
-
selRecords: _propTypes["default"].number,
|
|
105
|
-
currentPage: _propTypes["default"].number,
|
|
106
|
-
pageSize: _propTypes["default"].number,
|
|
107
|
-
align: _propTypes["default"].oneOf(['left', 'right', 'center']),
|
|
108
|
-
pageSizeType: _propTypes["default"].array,
|
|
109
|
-
description: _propTypes["default"].string,
|
|
110
|
-
style: _propTypes["default"].object,
|
|
111
|
-
onPageNumberChange: _propTypes["default"].func,
|
|
112
|
-
onPageSizeChange: _propTypes["default"].func
|
|
113
|
-
});
|
|
114
|
-
var _default = exports["default"] = SuperPagination;
|
package/lib/SuperTab/SuperTab.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|
|
4
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports["default"] = void 0;
|
|
10
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
11
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
13
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
15
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
17
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
18
|
-
var _tabs = _interopRequireDefault(require("antd/lib/tabs"));
|
|
19
|
-
var _react = _interopRequireDefault(require("react"));
|
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
var _variables = _interopRequireDefault(require("../variables"));
|
|
22
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
23
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
|
-
var TabPane = _tabs["default"].TabPane;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* key: 唯一标识一个tab
|
|
28
|
-
* title: 显示在tab上的标题
|
|
29
|
-
* close: 为true则显示关闭按钮,默认为true
|
|
30
|
-
*/
|
|
31
|
-
var TabType = {
|
|
32
|
-
key: _propTypes["default"].string.isRequired,
|
|
33
|
-
title: _propTypes["default"].string.isRequired,
|
|
34
|
-
close: _propTypes["default"].bool
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* activeKey: 处于活动状态tab的key值
|
|
39
|
-
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
40
|
-
* onTabClose: 关闭选项卡时触发,原型为funtion(key)
|
|
41
|
-
*/
|
|
42
|
-
var SuperTab = /*#__PURE__*/function (_React$Component) {
|
|
43
|
-
function SuperTab() {
|
|
44
|
-
var _context;
|
|
45
|
-
var _this;
|
|
46
|
-
(0, _classCallCheck2["default"])(this, SuperTab);
|
|
47
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
|
-
args[_key] = arguments[_key];
|
|
49
|
-
}
|
|
50
|
-
_this = _callSuper(this, SuperTab, (0, _concat["default"])(_context = []).call(_context, args));
|
|
51
|
-
(0, _defineProperty2["default"])(_this, "getEvent", function (name) {
|
|
52
|
-
if (_this.props[name]) {
|
|
53
|
-
return _this.props[name];
|
|
54
|
-
} else if (_this.props.callback) {
|
|
55
|
-
return _this.props.callback[name];
|
|
56
|
-
} else {
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
(0, _defineProperty2["default"])(_this, "callEvent", function (name, key) {
|
|
61
|
-
var onEvent = _this.getEvent(name);
|
|
62
|
-
if (onEvent) {
|
|
63
|
-
onEvent(key);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
(0, _defineProperty2["default"])(_this, "onEdit", function (key, action) {
|
|
67
|
-
if (action === 'remove') {
|
|
68
|
-
_this.callEvent('onTabClose', key);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
(0, _defineProperty2["default"])(_this, "onChange", function (key) {
|
|
72
|
-
_this.callEvent('onTabChange', key);
|
|
73
|
-
});
|
|
74
|
-
(0, _defineProperty2["default"])(_this, "toTab", function (_ref) {
|
|
75
|
-
var key = _ref.key,
|
|
76
|
-
title = _ref.title,
|
|
77
|
-
close = _ref.close;
|
|
78
|
-
return /*#__PURE__*/_react["default"].createElement(TabPane, {
|
|
79
|
-
key: key,
|
|
80
|
-
tab: title,
|
|
81
|
-
closable: close
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
(0, _defineProperty2["default"])(_this, "getTabsProps", function () {
|
|
85
|
-
return {
|
|
86
|
-
className: (0, _variables["default"])('SuperTab'),
|
|
87
|
-
activeKey: _this.props.activeKey,
|
|
88
|
-
type: 'editable-card',
|
|
89
|
-
hideAdd: true,
|
|
90
|
-
onEdit: _this.onEdit,
|
|
91
|
-
onChange: _this.onChange
|
|
92
|
-
};
|
|
93
|
-
});
|
|
94
|
-
return _this;
|
|
95
|
-
}
|
|
96
|
-
(0, _inherits2["default"])(SuperTab, _React$Component);
|
|
97
|
-
return (0, _createClass2["default"])(SuperTab, [{
|
|
98
|
-
key: "render",
|
|
99
|
-
value: function render() {
|
|
100
|
-
var _context2;
|
|
101
|
-
return /*#__PURE__*/_react["default"].createElement(_tabs["default"], this.getTabsProps(), (0, _map["default"])(_context2 = this.props.tabs).call(_context2, this.toTab));
|
|
102
|
-
}
|
|
103
|
-
}]);
|
|
104
|
-
}(_react["default"].Component);
|
|
105
|
-
(0, _defineProperty2["default"])(SuperTab, "propTypes", {
|
|
106
|
-
activeKey: _propTypes["default"].string.isRequired,
|
|
107
|
-
tabs: _propTypes["default"].arrayOf(_propTypes["default"].shape(TabType)).isRequired,
|
|
108
|
-
onTabChange: _propTypes["default"].func,
|
|
109
|
-
onTabClose: _propTypes["default"].func
|
|
110
|
-
});
|
|
111
|
-
(0, _defineProperty2["default"])(SuperTab, "PROPS", ['activeKey', 'tabs', 'onTabChange', 'onTabClose']);
|
|
112
|
-
var _default = exports["default"] = SuperTab;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-SuperTab {
|
|
4
|
-
:global {
|
|
5
|
-
.ant-tabs-bar {
|
|
6
|
-
margin-bottom: 0;
|
|
7
|
-
border-color: @brand-primary;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ant-tabs-nav-container {
|
|
11
|
-
font-size: @font-size-base;
|
|
12
|
-
line-height: 16px;
|
|
13
|
-
height: 27px !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ant-tabs-tab {
|
|
17
|
-
background: @background-color !important;
|
|
18
|
-
line-height: 25px !important;
|
|
19
|
-
|
|
20
|
-
.ant-tabs-close-x {
|
|
21
|
-
width: 14px !important;
|
|
22
|
-
height: 14px !important;
|
|
23
|
-
color: #333 !important;
|
|
24
|
-
margin-left: 0 !important;
|
|
25
|
-
padding-top: 1px;
|
|
26
|
-
vertical-align: -3px !important;
|
|
27
|
-
|
|
28
|
-
&:hover {
|
|
29
|
-
background: #d5d5d8;
|
|
30
|
-
border-radius: 50% !important;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
> svg {
|
|
34
|
-
transform: scale(0.7);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.ant-tabs-tab-active {
|
|
40
|
-
border-color: @brand-primary !important;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|
|
4
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports["default"] = void 0;
|
|
10
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
11
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
12
|
-
var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
|
|
13
|
-
var _dropdown = _interopRequireDefault(require("antd/lib/dropdown"));
|
|
14
|
-
var _icon = _interopRequireDefault(require("antd/lib/icon"));
|
|
15
|
-
var _tooltip = _interopRequireDefault(require("antd/lib/tooltip"));
|
|
16
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
17
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
19
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
20
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
21
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
22
|
-
var _menu = _interopRequireDefault(require("antd/lib/menu"));
|
|
23
|
-
var _tabs = _interopRequireDefault(require("antd/lib/tabs"));
|
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
26
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
27
|
-
var _variables = _interopRequireDefault(require("../variables"));
|
|
28
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
29
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30
|
-
var TabPane = _tabs["default"].TabPane;
|
|
31
|
-
var MenuItem = _menu["default"].Item;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* key: 唯一标识一个tab
|
|
35
|
-
* title: 显示在tab上的标题
|
|
36
|
-
*/
|
|
37
|
-
var TabType = {
|
|
38
|
-
key: _propTypes["default"].string.isRequired,
|
|
39
|
-
title: _propTypes["default"].string.isRequired
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* activeKey: 处于活动状态tab的key值
|
|
44
|
-
* menu: 是否需要右侧下拉列表,默认false
|
|
45
|
-
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
46
|
-
*/
|
|
47
|
-
var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
48
|
-
function SuperTab2() {
|
|
49
|
-
var _context;
|
|
50
|
-
var _this;
|
|
51
|
-
(0, _classCallCheck2["default"])(this, SuperTab2);
|
|
52
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
53
|
-
args[_key] = arguments[_key];
|
|
54
|
-
}
|
|
55
|
-
_this = _callSuper(this, SuperTab2, (0, _concat["default"])(_context = []).call(_context, args));
|
|
56
|
-
(0, _defineProperty2["default"])(_this, "onTabChange", function (key) {
|
|
57
|
-
var _this$props = _this.props,
|
|
58
|
-
onTabChange = _this$props.onTabChange,
|
|
59
|
-
_this$props$callback = _this$props.callback,
|
|
60
|
-
callback = _this$props$callback === void 0 ? {} : _this$props$callback;
|
|
61
|
-
if (onTabChange) {
|
|
62
|
-
onTabChange(key);
|
|
63
|
-
} else if (callback.onTabChange) {
|
|
64
|
-
// callback被废弃,只是为了兼容旧代码而已
|
|
65
|
-
callback.onTabChange(key);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
(0, _defineProperty2["default"])(_this, "toTab", function (tab) {
|
|
69
|
-
return /*#__PURE__*/_react["default"].createElement(TabPane, {
|
|
70
|
-
key: tab.key,
|
|
71
|
-
tab: tab.title
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
(0, _defineProperty2["default"])(_this, "toMenu", function () {
|
|
75
|
-
var _this$props2 = _this.props,
|
|
76
|
-
tabs = _this$props2.tabs,
|
|
77
|
-
activeKey = _this$props2.activeKey;
|
|
78
|
-
return /*#__PURE__*/_react["default"].createElement(_menu["default"], {
|
|
79
|
-
style: {
|
|
80
|
-
maxHeight: '450px',
|
|
81
|
-
overflow: 'auto'
|
|
82
|
-
}
|
|
83
|
-
}, (0, _map["default"])(tabs).call(tabs, function (tab) {
|
|
84
|
-
var _context2, _context3;
|
|
85
|
-
var style = activeKey === tab.key ? {
|
|
86
|
-
color: "#2196f3"
|
|
87
|
-
} : {};
|
|
88
|
-
return tab.tip ? /*#__PURE__*/_react["default"].createElement(MenuItem, {
|
|
89
|
-
key: tab.key
|
|
90
|
-
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
91
|
-
placement: "leftTop",
|
|
92
|
-
title: tab.tip
|
|
93
|
-
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
94
|
-
onClick: (0, _bind["default"])(_context2 = _this.onTabChange).call(_context2, _this, tab.key),
|
|
95
|
-
style: style
|
|
96
|
-
}, tab.title))) : /*#__PURE__*/_react["default"].createElement(MenuItem, {
|
|
97
|
-
key: tab.key
|
|
98
|
-
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
99
|
-
onClick: (0, _bind["default"])(_context3 = _this.onTabChange).call(_context3, _this, tab.key),
|
|
100
|
-
style: style
|
|
101
|
-
}, tab.title));
|
|
102
|
-
}));
|
|
103
|
-
});
|
|
104
|
-
(0, _defineProperty2["default"])(_this, "getPopupContainer", function () {
|
|
105
|
-
var container = _this.props.container;
|
|
106
|
-
if (typeof container === 'undefined') {
|
|
107
|
-
return document.body;
|
|
108
|
-
} else {
|
|
109
|
-
return _reactDom["default"].findDOMNode(container);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
(0, _defineProperty2["default"])(_this, "toDropdown", function () {
|
|
113
|
-
return /*#__PURE__*/_react["default"].createElement(_dropdown["default"], {
|
|
114
|
-
overlay: _this.toMenu(),
|
|
115
|
-
getPopupContainer: _this.getPopupContainer
|
|
116
|
-
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
117
|
-
type: "menu-unfold",
|
|
118
|
-
style: {
|
|
119
|
-
fontSize: 16,
|
|
120
|
-
verticalAlign: -2
|
|
121
|
-
}
|
|
122
|
-
}));
|
|
123
|
-
});
|
|
124
|
-
return _this;
|
|
125
|
-
}
|
|
126
|
-
(0, _inherits2["default"])(SuperTab2, _React$Component);
|
|
127
|
-
return (0, _createClass2["default"])(SuperTab2, [{
|
|
128
|
-
key: "render",
|
|
129
|
-
value: function render() {
|
|
130
|
-
var _this$props3 = this.props,
|
|
131
|
-
tabs = _this$props3.tabs,
|
|
132
|
-
activeKey = _this$props3.activeKey,
|
|
133
|
-
_this$props3$menu = _this$props3.menu,
|
|
134
|
-
menu = _this$props3$menu === void 0 ? false : _this$props3$menu;
|
|
135
|
-
return /*#__PURE__*/_react["default"].createElement(_tabs["default"], {
|
|
136
|
-
className: (0, _variables["default"])('SuperTab2'),
|
|
137
|
-
activeKey: activeKey,
|
|
138
|
-
onChange: this.onTabChange,
|
|
139
|
-
tabBarExtraContent: menu && tabs.length > 3 && this.toDropdown()
|
|
140
|
-
}, (0, _map["default"])(tabs).call(tabs, this.toTab));
|
|
141
|
-
}
|
|
142
|
-
}]);
|
|
143
|
-
}(_react["default"].Component);
|
|
144
|
-
(0, _defineProperty2["default"])(SuperTab2, "propTypes", {
|
|
145
|
-
activeKey: _propTypes["default"].string.isRequired,
|
|
146
|
-
tabs: _propTypes["default"].arrayOf(_propTypes["default"].shape(TabType)).isRequired,
|
|
147
|
-
menu: _propTypes["default"].bool,
|
|
148
|
-
onTabChange: _propTypes["default"].func
|
|
149
|
-
});
|
|
150
|
-
var _default = exports["default"] = SuperTab2;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-SuperTab2 {
|
|
4
|
-
:global(.ant-tabs-bar) {
|
|
5
|
-
margin-bottom: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:global(.ant-tabs-nav-container) {
|
|
9
|
-
font-size: @font-size-base;
|
|
10
|
-
line-height: 16px;
|
|
11
|
-
height: 32px !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:global(.ant-tabs-tab) {
|
|
15
|
-
padding: 8px 6px;
|
|
16
|
-
margin-right: 4px;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|
|
4
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports["default"] = void 0;
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
|
11
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
12
|
-
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
13
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
15
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
16
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
17
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
18
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
19
|
-
var _react = _interopRequireDefault(require("react"));
|
|
20
|
-
var _variables = _interopRequireDefault(require("../variables"));
|
|
21
|
-
var _excluded = ["onMoveRow", "index", "className"];
|
|
22
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
23
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
|
-
var dragIndex = -1;
|
|
25
|
-
var DragSortRow = /*#__PURE__*/function (_React$Component) {
|
|
26
|
-
function DragSortRow() {
|
|
27
|
-
var _context, _context2;
|
|
28
|
-
var _this;
|
|
29
|
-
(0, _classCallCheck2["default"])(this, DragSortRow);
|
|
30
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
-
args[_key] = arguments[_key];
|
|
32
|
-
}
|
|
33
|
-
_this = _callSuper(this, DragSortRow, (0, _concat["default"])(_context = []).call(_context, args));
|
|
34
|
-
(0, _defineProperty2["default"])(_this, "state", {
|
|
35
|
-
dragIndex: -1,
|
|
36
|
-
firefox: (0, _includes["default"])(_context2 = navigator.userAgent).call(_context2, 'Firefox')
|
|
37
|
-
});
|
|
38
|
-
(0, _defineProperty2["default"])(_this, "onDragStart", function (e) {
|
|
39
|
-
dragIndex = _this.props.index;
|
|
40
|
-
if (_this.state.firefox) {
|
|
41
|
-
// 火狐浏览器必须调用setData
|
|
42
|
-
e.dataTransfer.setData('text/plain', 'DragSortRow');
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
(0, _defineProperty2["default"])(_this, "onDragEnd", function () {
|
|
46
|
-
dragIndex = -1;
|
|
47
|
-
});
|
|
48
|
-
(0, _defineProperty2["default"])(_this, "onDragOver", function (e) {
|
|
49
|
-
if (dragIndex > -1 && dragIndex !== _this.props.index) {
|
|
50
|
-
e.preventDefault();
|
|
51
|
-
if (_this.state.dragIndex !== dragIndex) {
|
|
52
|
-
_this.setState({
|
|
53
|
-
dragIndex: dragIndex
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
(0, _defineProperty2["default"])(_this, "onDragLeave", function () {
|
|
59
|
-
_this.setState({
|
|
60
|
-
dragIndex: -1
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
(0, _defineProperty2["default"])(_this, "onDrop", function (e) {
|
|
64
|
-
var dragIndex = _this.state.dragIndex;
|
|
65
|
-
_this.setState({
|
|
66
|
-
dragIndex: -1
|
|
67
|
-
});
|
|
68
|
-
_this.props.onMoveRow(dragIndex, _this.props.index);
|
|
69
|
-
|
|
70
|
-
// 火狐浏览器默认会打开一个新窗口,此处阻止其打开
|
|
71
|
-
if (_this.state.firefox) {
|
|
72
|
-
e.preventDefault();
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
return _this;
|
|
76
|
-
}
|
|
77
|
-
(0, _inherits2["default"])(DragSortRow, _React$Component);
|
|
78
|
-
return (0, _createClass2["default"])(DragSortRow, [{
|
|
79
|
-
key: "render",
|
|
80
|
-
value: function render() {
|
|
81
|
-
var _context3;
|
|
82
|
-
var _this$props = this.props,
|
|
83
|
-
onMoveRow = _this$props.onMoveRow,
|
|
84
|
-
index = _this$props.index,
|
|
85
|
-
className = _this$props.className,
|
|
86
|
-
restProps = (0, _objectWithoutProperties2["default"])(_this$props, _excluded);
|
|
87
|
-
var dragIndex = this.state.dragIndex;
|
|
88
|
-
restProps.className = (0, _concat["default"])(_context3 = "".concat(className, " ")).call(_context3, (0, _variables["default"])('DragSortRow'));
|
|
89
|
-
restProps.draggable = true;
|
|
90
|
-
restProps.onDragStart = this.onDragStart;
|
|
91
|
-
restProps.onDragEnd = this.onDragEnd;
|
|
92
|
-
restProps.onDragOver = this.onDragOver;
|
|
93
|
-
restProps.onDragLeave = this.onDragLeave;
|
|
94
|
-
restProps.onDrop = this.onDrop;
|
|
95
|
-
if (dragIndex > -1) {
|
|
96
|
-
restProps['data-drag-hover'] = dragIndex > index ? 'up' : 'down';
|
|
97
|
-
}
|
|
98
|
-
return /*#__PURE__*/_react["default"].createElement("tr", restProps);
|
|
99
|
-
}
|
|
100
|
-
}]);
|
|
101
|
-
}(_react["default"].Component);
|
|
102
|
-
var _default = exports["default"] = DragSortRow;
|