cloud-b2b 1.1.58 → 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 -141
- package/es/Card/Card.js +0 -19
- package/es/CodeInput/CodeInput.js +0 -123
- package/es/Control/Control.js +0 -444
- package/es/Control/event.js +0 -43
- package/es/Enhance/Dialogs.js +0 -52
- package/es/Enhance/Loading.js +0 -131
- package/es/Header/Header.js +0 -162
- package/es/Header/Vertical.js +0 -106
- package/es/ImageView/ImageView.js +0 -100
- package/es/Indent/Indent.js +0 -19
- package/es/InpurCascader/InputCascader.js +0 -117
- package/es/InputEditor/InputEditor.js +0 -173
- package/es/InputSearch/InputSearch.js +0 -266
- package/es/InputSelect/InputSelect.js +0 -160
- package/es/InputTreeSelect/InputTreeSelect.js +0 -121
- package/es/InputWriting/InputWriting.js +0 -85
- package/es/Layout/Layout.js +0 -201
- package/es/LayoutLink/LayoutLink.js +0 -73
- package/es/Link/Link.js +0 -85
- 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 -200
- package/es/Search/Search.js +0 -497
- package/es/Sidebar/Sidebar.js +0 -144
- package/es/Sidebar2/Sidebar.js +0 -165
- package/es/SuperForm/SuperForm.js +0 -598
- package/es/SuperForm2/SuperForm.js +0 -687
- package/es/SuperIcon/SuperIcon.js +0 -27
- package/es/SuperPagination/SuperPagination.js +0 -109
- package/es/SuperTab/SuperTab.js +0 -107
- package/es/SuperTab2/SuperTab2.js +0 -145
- package/es/SuperTable/DragSortRow.js +0 -97
- package/es/SuperTable/FilterDropDown.js +0 -164
- package/es/SuperTable/SuperTable.js +0 -808
- package/es/SuperTable/fixed.js +0 -34
- package/es/SuperTable2/SuperTable2.js +0 -926
- package/es/SuperTable2/SuperTableCell.js +0 -225
- package/es/SuperTable3/FilterDropDown.js +0 -164
- package/es/SuperTable3/SuperTable.js +0 -665
- package/es/SuperTable3/fixed.js +0 -34
- package/es/SuperToolbar/SuperToolbar.js +0 -195
- package/es/SuperUpload/SuperUpload.js +0 -356
- package/es/Title/Title.js +0 -33
- package/es/Viewer/ImageViews.js +0 -258
- package/es/Viewer/Viewer.js +0 -122
- package/es/WingBlank/WingBlank.js +0 -16
- package/es/helper.js +0 -240
- package/es/index.js +0 -37
- package/es/variables.js +0 -6
- package/lib/Area/Area.js +0 -149
- 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 -131
- 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 -60
- package/lib/Enhance/Loading.js +0 -138
- package/lib/Enhance/index.js +0 -25
- package/lib/Enhance/package.json +0 -6
- package/lib/Header/Header.js +0 -169
- package/lib/Header/Header.less +0 -95
- package/lib/Header/Vertical.js +0 -114
- package/lib/Header/Vertical.less +0 -60
- package/lib/Header/package.json +0 -6
- package/lib/ImageView/ImageView.js +0 -108
- 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 -124
- package/lib/InpurCascader/package.json +0 -6
- package/lib/InputEditor/InputEditor.js +0 -181
- package/lib/InputEditor/inputEditor.less +0 -8
- package/lib/InputEditor/package.json +0 -6
- package/lib/InputSearch/InputSearch.js +0 -274
- package/lib/InputSearch/package.json +0 -6
- package/lib/InputSelect/InputSelect.js +0 -168
- package/lib/InputSelect/package.json +0 -6
- package/lib/InputTreeSelect/InputTreeSelect.js +0 -128
- package/lib/InputTreeSelect/package.json +0 -6
- package/lib/InputWriting/InputWriting.js +0 -93
- package/lib/InputWriting/package.json +0 -6
- package/lib/Layout/Layout.js +0 -209
- package/lib/Layout/Layout.less +0 -28
- package/lib/Layout/package.json +0 -6
- package/lib/LayoutLink/LayoutLink.js +0 -86
- package/lib/LayoutLink/LayoutLink.less +0 -53
- package/lib/LayoutLink/package.json +0 -6
- package/lib/Link/Link.js +0 -93
- 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 -208
- package/lib/NumberInput/package.json +0 -6
- package/lib/Search/Search.js +0 -510
- package/lib/Sidebar/Sidebar.js +0 -152
- package/lib/Sidebar/Sidebar.less +0 -78
- package/lib/Sidebar/package.json +0 -6
- package/lib/Sidebar2/Sidebar.js +0 -173
- package/lib/Sidebar2/Sidebar.less +0 -153
- package/lib/Sidebar2/package.json +0 -6
- package/lib/SuperForm/SuperForm.js +0 -610
- package/lib/SuperForm/SuperForm.less +0 -52
- package/lib/SuperForm/package.json +0 -6
- package/lib/SuperForm2/SuperForm.js +0 -699
- 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 -117
- package/lib/SuperPagination/package.json +0 -6
- package/lib/SuperTab/SuperTab.js +0 -115
- package/lib/SuperTab/SuperTab.less +0 -43
- package/lib/SuperTab/package.json +0 -6
- package/lib/SuperTab2/SuperTab2.js +0 -153
- package/lib/SuperTab2/SuperTab2.less +0 -18
- package/lib/SuperTab2/package.json +0 -6
- package/lib/SuperTable/DragSortRow.js +0 -105
- package/lib/SuperTable/DragSortRow.less +0 -17
- package/lib/SuperTable/FilterDropDown.js +0 -172
- package/lib/SuperTable/FilterDropDown.less +0 -30
- package/lib/SuperTable/SuperTable.js +0 -816
- 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 -939
- package/lib/SuperTable2/SuperTable2.less +0 -118
- package/lib/SuperTable2/SuperTableCell.js +0 -230
- package/lib/SuperTable2/package.json +0 -6
- package/lib/SuperTable3/FilterDropDown.js +0 -172
- package/lib/SuperTable3/FilterDropDown.less +0 -29
- package/lib/SuperTable3/SuperTable.js +0 -673
- 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 -203
- package/lib/SuperToolbar/SuperToolbar.less +0 -17
- package/lib/SuperToolbar/package.json +0 -6
- package/lib/SuperUpload/SuperUpload.js +0 -368
- 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 -266
- package/lib/Viewer/Viewer.js +0 -130
- 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 -246
- 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,27 +0,0 @@
|
|
|
1
|
-
import _Icon from "antd/es/icon";
|
|
2
|
-
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["type", "style"];
|
|
5
|
-
import React from 'react';
|
|
6
|
-
var SuperIcon = function SuperIcon(_ref) {
|
|
7
|
-
var type = _ref.type,
|
|
8
|
-
_ref$style = _ref.style,
|
|
9
|
-
style = _ref$style === void 0 ? {} : _ref$style,
|
|
10
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
-
if (!type) {
|
|
12
|
-
return /*#__PURE__*/React.createElement(_Icon, _extends({
|
|
13
|
-
style: style
|
|
14
|
-
}, props));
|
|
15
|
-
} else if (type.substring(0, 4) !== 'pld-') {
|
|
16
|
-
return /*#__PURE__*/React.createElement(_Icon, _extends({
|
|
17
|
-
type: type,
|
|
18
|
-
style: style
|
|
19
|
-
}, props));
|
|
20
|
-
} else {
|
|
21
|
-
return /*#__PURE__*/React.createElement("i", {
|
|
22
|
-
className: "pldicon anticon anticon-".concat(type),
|
|
23
|
-
style: style
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
export default SuperIcon;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
-
import _Pagination from "antd/es/pagination";
|
|
3
|
-
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
7
|
-
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
8
|
-
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
9
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
10
|
-
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
|
-
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
12
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import PropTypes from 'prop-types';
|
|
16
|
-
/**
|
|
17
|
-
* maxRecords: 最大记录数
|
|
18
|
-
* selRecords: [可选]已选记录条数
|
|
19
|
-
* currentPage:当前页码
|
|
20
|
-
* pageSize:页面大小
|
|
21
|
-
* align: 分页组件的对齐方式,默认居右
|
|
22
|
-
* pageSizeType: 字符串数组,页面大小规格
|
|
23
|
-
* description:字符串描述,类似'共有{maxRecords}条记录'
|
|
24
|
-
* onPageChange:跳转到新的一页时触发,原型func(pageNumber)
|
|
25
|
-
* onPageSizeChange: 页大小改变时触发,原型func(pageSize, pageNumber)
|
|
26
|
-
*/
|
|
27
|
-
var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
28
|
-
_inherits(SuperPagination, _React$Component);
|
|
29
|
-
var _super = _createSuper(SuperPagination);
|
|
30
|
-
function SuperPagination() {
|
|
31
|
-
var _context;
|
|
32
|
-
var _this;
|
|
33
|
-
_classCallCheck(this, SuperPagination);
|
|
34
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
|
-
args[_key] = arguments[_key];
|
|
36
|
-
}
|
|
37
|
-
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
38
|
-
_defineProperty(_assertThisInitialized(_this), "onChange", function (page) {
|
|
39
|
-
var _this$props$callback = _this.props.callback,
|
|
40
|
-
callback = _this$props$callback === void 0 ? {} : _this$props$callback;
|
|
41
|
-
var onPageNumberChange = _this.props.onPageNumberChange || callback.onPageNumberChange;
|
|
42
|
-
onPageNumberChange && onPageNumberChange(page);
|
|
43
|
-
});
|
|
44
|
-
_defineProperty(_assertThisInitialized(_this), "onShowSizeChange", function (current, size) {
|
|
45
|
-
var _this$props$callback2 = _this.props.callback,
|
|
46
|
-
callback = _this$props$callback2 === void 0 ? {} : _this$props$callback2;
|
|
47
|
-
var onPageSizeChange = _this.props.onPageSizeChange || callback.onPageSizeChange;
|
|
48
|
-
onPageSizeChange && onPageSizeChange(size, current || 1);
|
|
49
|
-
});
|
|
50
|
-
return _this;
|
|
51
|
-
}
|
|
52
|
-
_createClass(SuperPagination, [{
|
|
53
|
-
key: "render",
|
|
54
|
-
value: function render() {
|
|
55
|
-
var _this$props = this.props,
|
|
56
|
-
currentPage = _this$props.currentPage,
|
|
57
|
-
maxRecords = _this$props.maxRecords,
|
|
58
|
-
pageSize = _this$props.pageSize,
|
|
59
|
-
pageSizeType = _this$props.pageSizeType,
|
|
60
|
-
align = _this$props.align,
|
|
61
|
-
description = _this$props.description,
|
|
62
|
-
selRecords = _this$props.selRecords,
|
|
63
|
-
_this$props$page = _this$props.page,
|
|
64
|
-
page = _this$props$page === void 0 ? {} : _this$props$page,
|
|
65
|
-
_this$props$option = _this$props.option,
|
|
66
|
-
option = _this$props$option === void 0 ? {} : _this$props$option,
|
|
67
|
-
_this$props$style = _this$props.style,
|
|
68
|
-
style = _this$props$style === void 0 ? {} : _this$props$style;
|
|
69
|
-
var desp = description || (this.props.config || {}).pageDesp || '';
|
|
70
|
-
var props = {
|
|
71
|
-
current: currentPage || page.currentPage,
|
|
72
|
-
total: maxRecords || page.maxRecords,
|
|
73
|
-
pageSize: pageSize || page.pageSize,
|
|
74
|
-
showSizeChanger: true,
|
|
75
|
-
showQuickJumper: true,
|
|
76
|
-
pageSizeOptions: pageSizeType || option.pageSizeType || [],
|
|
77
|
-
onChange: this.onChange,
|
|
78
|
-
onShowSizeChange: this.onShowSizeChange,
|
|
79
|
-
showTotal: function showTotal(total) {
|
|
80
|
-
return desp.replace('{maxRecords}', total).replace('{selRecords}', selRecords || 0);
|
|
81
|
-
},
|
|
82
|
-
style: _Object$assign({}, style, {
|
|
83
|
-
display: 'inline-block',
|
|
84
|
-
textAlign: 'left',
|
|
85
|
-
verticalAlign: 'top'
|
|
86
|
-
})
|
|
87
|
-
};
|
|
88
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
style: {
|
|
90
|
-
textAlign: align || 'right'
|
|
91
|
-
}
|
|
92
|
-
}, /*#__PURE__*/React.createElement(_Pagination, props));
|
|
93
|
-
}
|
|
94
|
-
}]);
|
|
95
|
-
return SuperPagination;
|
|
96
|
-
}(React.Component);
|
|
97
|
-
_defineProperty(SuperPagination, "propTypes", {
|
|
98
|
-
maxRecords: PropTypes.number,
|
|
99
|
-
selRecords: PropTypes.number,
|
|
100
|
-
currentPage: PropTypes.number,
|
|
101
|
-
pageSize: PropTypes.number,
|
|
102
|
-
align: PropTypes.oneOf(['left', 'right', 'center']),
|
|
103
|
-
pageSizeType: PropTypes.array,
|
|
104
|
-
description: PropTypes.string,
|
|
105
|
-
style: PropTypes.object,
|
|
106
|
-
onPageNumberChange: PropTypes.func,
|
|
107
|
-
onPageSizeChange: PropTypes.func
|
|
108
|
-
});
|
|
109
|
-
export default SuperPagination;
|
package/es/SuperTab/SuperTab.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
-
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
9
|
-
import _Tabs from "antd/es/tabs";
|
|
10
|
-
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
|
-
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
12
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import PropTypes from 'prop-types';
|
|
16
|
-
import variables from '../variables';
|
|
17
|
-
var TabPane = _Tabs.TabPane;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* key: 唯一标识一个tab
|
|
21
|
-
* title: 显示在tab上的标题
|
|
22
|
-
* close: 为true则显示关闭按钮,默认为true
|
|
23
|
-
*/
|
|
24
|
-
var TabType = {
|
|
25
|
-
key: PropTypes.string.isRequired,
|
|
26
|
-
title: PropTypes.string.isRequired,
|
|
27
|
-
close: PropTypes.bool
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* activeKey: 处于活动状态tab的key值
|
|
32
|
-
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
33
|
-
* onTabClose: 关闭选项卡时触发,原型为funtion(key)
|
|
34
|
-
*/
|
|
35
|
-
var SuperTab = /*#__PURE__*/function (_React$Component) {
|
|
36
|
-
_inherits(SuperTab, _React$Component);
|
|
37
|
-
var _super = _createSuper(SuperTab);
|
|
38
|
-
function SuperTab() {
|
|
39
|
-
var _context;
|
|
40
|
-
var _this;
|
|
41
|
-
_classCallCheck(this, SuperTab);
|
|
42
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
|
-
args[_key] = arguments[_key];
|
|
44
|
-
}
|
|
45
|
-
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
46
|
-
_defineProperty(_assertThisInitialized(_this), "getEvent", function (name) {
|
|
47
|
-
if (_this.props[name]) {
|
|
48
|
-
return _this.props[name];
|
|
49
|
-
} else if (_this.props.callback) {
|
|
50
|
-
return _this.props.callback[name];
|
|
51
|
-
} else {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
_defineProperty(_assertThisInitialized(_this), "callEvent", function (name, key) {
|
|
56
|
-
var onEvent = _this.getEvent(name);
|
|
57
|
-
if (onEvent) {
|
|
58
|
-
onEvent(key);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
_defineProperty(_assertThisInitialized(_this), "onEdit", function (key, action) {
|
|
62
|
-
if (action === 'remove') {
|
|
63
|
-
_this.callEvent('onTabClose', key);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
_defineProperty(_assertThisInitialized(_this), "onChange", function (key) {
|
|
67
|
-
_this.callEvent('onTabChange', key);
|
|
68
|
-
});
|
|
69
|
-
_defineProperty(_assertThisInitialized(_this), "toTab", function (_ref) {
|
|
70
|
-
var key = _ref.key,
|
|
71
|
-
title = _ref.title,
|
|
72
|
-
close = _ref.close;
|
|
73
|
-
return /*#__PURE__*/React.createElement(TabPane, {
|
|
74
|
-
key: key,
|
|
75
|
-
tab: title,
|
|
76
|
-
closable: close
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
_defineProperty(_assertThisInitialized(_this), "getTabsProps", function () {
|
|
80
|
-
return {
|
|
81
|
-
className: variables('SuperTab'),
|
|
82
|
-
activeKey: _this.props.activeKey,
|
|
83
|
-
type: 'editable-card',
|
|
84
|
-
hideAdd: true,
|
|
85
|
-
onEdit: _this.onEdit,
|
|
86
|
-
onChange: _this.onChange
|
|
87
|
-
};
|
|
88
|
-
});
|
|
89
|
-
return _this;
|
|
90
|
-
}
|
|
91
|
-
_createClass(SuperTab, [{
|
|
92
|
-
key: "render",
|
|
93
|
-
value: function render() {
|
|
94
|
-
var _context2;
|
|
95
|
-
return /*#__PURE__*/React.createElement(_Tabs, this.getTabsProps(), _mapInstanceProperty(_context2 = this.props.tabs).call(_context2, this.toTab));
|
|
96
|
-
}
|
|
97
|
-
}]);
|
|
98
|
-
return SuperTab;
|
|
99
|
-
}(React.Component);
|
|
100
|
-
_defineProperty(SuperTab, "propTypes", {
|
|
101
|
-
activeKey: PropTypes.string.isRequired,
|
|
102
|
-
tabs: PropTypes.arrayOf(PropTypes.shape(TabType)).isRequired,
|
|
103
|
-
onTabChange: PropTypes.func,
|
|
104
|
-
onTabClose: PropTypes.func
|
|
105
|
-
});
|
|
106
|
-
_defineProperty(SuperTab, "PROPS", ['activeKey', 'tabs', 'onTabChange', 'onTabClose']);
|
|
107
|
-
export default SuperTab;
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
-
import _Dropdown from "antd/es/dropdown";
|
|
3
|
-
import _Icon from "antd/es/icon";
|
|
4
|
-
import _Tooltip from "antd/es/tooltip";
|
|
5
|
-
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
6
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
7
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
8
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
9
|
-
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
10
|
-
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
11
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
12
|
-
import _Menu from "antd/es/menu";
|
|
13
|
-
import _Tabs from "antd/es/tabs";
|
|
14
|
-
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
15
|
-
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
16
|
-
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
17
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
19
|
-
import React from 'react';
|
|
20
|
-
import PropTypes from 'prop-types';
|
|
21
|
-
import ReactDOM from 'react-dom';
|
|
22
|
-
import variables from '../variables';
|
|
23
|
-
var TabPane = _Tabs.TabPane;
|
|
24
|
-
var MenuItem = _Menu.Item;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* key: 唯一标识一个tab
|
|
28
|
-
* title: 显示在tab上的标题
|
|
29
|
-
*/
|
|
30
|
-
var TabType = {
|
|
31
|
-
key: PropTypes.string.isRequired,
|
|
32
|
-
title: PropTypes.string.isRequired
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* activeKey: 处于活动状态tab的key值
|
|
37
|
-
* menu: 是否需要右侧下拉列表,默认false
|
|
38
|
-
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
39
|
-
*/
|
|
40
|
-
var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
41
|
-
_inherits(SuperTab2, _React$Component);
|
|
42
|
-
var _super = _createSuper(SuperTab2);
|
|
43
|
-
function SuperTab2() {
|
|
44
|
-
var _context;
|
|
45
|
-
var _this;
|
|
46
|
-
_classCallCheck(this, SuperTab2);
|
|
47
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
|
-
args[_key] = arguments[_key];
|
|
49
|
-
}
|
|
50
|
-
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
51
|
-
_defineProperty(_assertThisInitialized(_this), "onTabChange", function (key) {
|
|
52
|
-
var _this$props = _this.props,
|
|
53
|
-
onTabChange = _this$props.onTabChange,
|
|
54
|
-
_this$props$callback = _this$props.callback,
|
|
55
|
-
callback = _this$props$callback === void 0 ? {} : _this$props$callback;
|
|
56
|
-
if (onTabChange) {
|
|
57
|
-
onTabChange(key);
|
|
58
|
-
} else if (callback.onTabChange) {
|
|
59
|
-
// callback被废弃,只是为了兼容旧代码而已
|
|
60
|
-
callback.onTabChange(key);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
_defineProperty(_assertThisInitialized(_this), "toTab", function (tab) {
|
|
64
|
-
return /*#__PURE__*/React.createElement(TabPane, {
|
|
65
|
-
key: tab.key,
|
|
66
|
-
tab: tab.title
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
_defineProperty(_assertThisInitialized(_this), "toMenu", function () {
|
|
70
|
-
var _this$props2 = _this.props,
|
|
71
|
-
tabs = _this$props2.tabs,
|
|
72
|
-
activeKey = _this$props2.activeKey;
|
|
73
|
-
return /*#__PURE__*/React.createElement(_Menu, {
|
|
74
|
-
style: {
|
|
75
|
-
maxHeight: '450px',
|
|
76
|
-
overflow: 'auto'
|
|
77
|
-
}
|
|
78
|
-
}, _mapInstanceProperty(tabs).call(tabs, function (tab) {
|
|
79
|
-
var _context2, _context3;
|
|
80
|
-
var style = activeKey === tab.key ? {
|
|
81
|
-
color: "#2196f3"
|
|
82
|
-
} : {};
|
|
83
|
-
return tab.tip ? /*#__PURE__*/React.createElement(MenuItem, {
|
|
84
|
-
key: tab.key
|
|
85
|
-
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
|
86
|
-
placement: "leftTop",
|
|
87
|
-
title: tab.tip
|
|
88
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
89
|
-
onClick: _bindInstanceProperty(_context2 = _this.onTabChange).call(_context2, _assertThisInitialized(_this), tab.key),
|
|
90
|
-
style: style
|
|
91
|
-
}, tab.title))) : /*#__PURE__*/React.createElement(MenuItem, {
|
|
92
|
-
key: tab.key
|
|
93
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
94
|
-
onClick: _bindInstanceProperty(_context3 = _this.onTabChange).call(_context3, _assertThisInitialized(_this), tab.key),
|
|
95
|
-
style: style
|
|
96
|
-
}, tab.title));
|
|
97
|
-
}));
|
|
98
|
-
});
|
|
99
|
-
_defineProperty(_assertThisInitialized(_this), "getPopupContainer", function () {
|
|
100
|
-
var container = _this.props.container;
|
|
101
|
-
if (typeof container === 'undefined') {
|
|
102
|
-
return document.body;
|
|
103
|
-
} else {
|
|
104
|
-
return ReactDOM.findDOMNode(container);
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
_defineProperty(_assertThisInitialized(_this), "toDropdown", function () {
|
|
108
|
-
return /*#__PURE__*/React.createElement(_Dropdown, {
|
|
109
|
-
overlay: _this.toMenu(),
|
|
110
|
-
getPopupContainer: _this.getPopupContainer
|
|
111
|
-
}, /*#__PURE__*/React.createElement(_Icon, {
|
|
112
|
-
type: "menu-unfold",
|
|
113
|
-
style: {
|
|
114
|
-
fontSize: 16,
|
|
115
|
-
verticalAlign: -2
|
|
116
|
-
}
|
|
117
|
-
}));
|
|
118
|
-
});
|
|
119
|
-
return _this;
|
|
120
|
-
}
|
|
121
|
-
_createClass(SuperTab2, [{
|
|
122
|
-
key: "render",
|
|
123
|
-
value: function render() {
|
|
124
|
-
var _this$props3 = this.props,
|
|
125
|
-
tabs = _this$props3.tabs,
|
|
126
|
-
activeKey = _this$props3.activeKey,
|
|
127
|
-
_this$props3$menu = _this$props3.menu,
|
|
128
|
-
menu = _this$props3$menu === void 0 ? false : _this$props3$menu;
|
|
129
|
-
return /*#__PURE__*/React.createElement(_Tabs, {
|
|
130
|
-
className: variables('SuperTab2'),
|
|
131
|
-
activeKey: activeKey,
|
|
132
|
-
onChange: this.onTabChange,
|
|
133
|
-
tabBarExtraContent: menu && tabs.length > 3 && this.toDropdown()
|
|
134
|
-
}, _mapInstanceProperty(tabs).call(tabs, this.toTab));
|
|
135
|
-
}
|
|
136
|
-
}]);
|
|
137
|
-
return SuperTab2;
|
|
138
|
-
}(React.Component);
|
|
139
|
-
_defineProperty(SuperTab2, "propTypes", {
|
|
140
|
-
activeKey: PropTypes.string.isRequired,
|
|
141
|
-
tabs: PropTypes.arrayOf(PropTypes.shape(TabType)).isRequired,
|
|
142
|
-
menu: PropTypes.bool,
|
|
143
|
-
onTabChange: PropTypes.func
|
|
144
|
-
});
|
|
145
|
-
export default SuperTab2;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
|
|
3
|
-
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
7
|
-
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
8
|
-
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
9
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["onMoveRow", "index", "className"];
|
|
11
|
-
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
12
|
-
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
13
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
|
-
import React from 'react';
|
|
16
|
-
import variables from '../variables';
|
|
17
|
-
var dragIndex = -1;
|
|
18
|
-
var DragSortRow = /*#__PURE__*/function (_React$Component) {
|
|
19
|
-
_inherits(DragSortRow, _React$Component);
|
|
20
|
-
var _super = _createSuper(DragSortRow);
|
|
21
|
-
function DragSortRow() {
|
|
22
|
-
var _context, _context2;
|
|
23
|
-
var _this;
|
|
24
|
-
_classCallCheck(this, DragSortRow);
|
|
25
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
-
args[_key] = arguments[_key];
|
|
27
|
-
}
|
|
28
|
-
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
29
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
30
|
-
dragIndex: -1,
|
|
31
|
-
firefox: _includesInstanceProperty(_context2 = navigator.userAgent).call(_context2, 'Firefox')
|
|
32
|
-
});
|
|
33
|
-
_defineProperty(_assertThisInitialized(_this), "onDragStart", function (e) {
|
|
34
|
-
dragIndex = _this.props.index;
|
|
35
|
-
if (_this.state.firefox) {
|
|
36
|
-
// 火狐浏览器必须调用setData
|
|
37
|
-
e.dataTransfer.setData('text/plain', 'DragSortRow');
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
_defineProperty(_assertThisInitialized(_this), "onDragEnd", function () {
|
|
41
|
-
dragIndex = -1;
|
|
42
|
-
});
|
|
43
|
-
_defineProperty(_assertThisInitialized(_this), "onDragOver", function (e) {
|
|
44
|
-
if (dragIndex > -1 && dragIndex !== _this.props.index) {
|
|
45
|
-
e.preventDefault();
|
|
46
|
-
if (_this.state.dragIndex !== dragIndex) {
|
|
47
|
-
_this.setState({
|
|
48
|
-
dragIndex: dragIndex
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
_defineProperty(_assertThisInitialized(_this), "onDragLeave", function () {
|
|
54
|
-
_this.setState({
|
|
55
|
-
dragIndex: -1
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
_defineProperty(_assertThisInitialized(_this), "onDrop", function (e) {
|
|
59
|
-
var dragIndex = _this.state.dragIndex;
|
|
60
|
-
_this.setState({
|
|
61
|
-
dragIndex: -1
|
|
62
|
-
});
|
|
63
|
-
_this.props.onMoveRow(dragIndex, _this.props.index);
|
|
64
|
-
|
|
65
|
-
// 火狐浏览器默认会打开一个新窗口,此处阻止其打开
|
|
66
|
-
if (_this.state.firefox) {
|
|
67
|
-
e.preventDefault();
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
return _this;
|
|
71
|
-
}
|
|
72
|
-
_createClass(DragSortRow, [{
|
|
73
|
-
key: "render",
|
|
74
|
-
value: function render() {
|
|
75
|
-
var _context3;
|
|
76
|
-
var _this$props = this.props,
|
|
77
|
-
onMoveRow = _this$props.onMoveRow,
|
|
78
|
-
index = _this$props.index,
|
|
79
|
-
className = _this$props.className,
|
|
80
|
-
restProps = _objectWithoutProperties(_this$props, _excluded);
|
|
81
|
-
var dragIndex = this.state.dragIndex;
|
|
82
|
-
restProps.className = _concatInstanceProperty(_context3 = "".concat(className, " ")).call(_context3, variables('DragSortRow'));
|
|
83
|
-
restProps.draggable = true;
|
|
84
|
-
restProps.onDragStart = this.onDragStart;
|
|
85
|
-
restProps.onDragEnd = this.onDragEnd;
|
|
86
|
-
restProps.onDragOver = this.onDragOver;
|
|
87
|
-
restProps.onDragLeave = this.onDragLeave;
|
|
88
|
-
restProps.onDrop = this.onDrop;
|
|
89
|
-
if (dragIndex > -1) {
|
|
90
|
-
restProps['data-drag-hover'] = dragIndex > index ? 'up' : 'down';
|
|
91
|
-
}
|
|
92
|
-
return /*#__PURE__*/React.createElement("tr", restProps);
|
|
93
|
-
}
|
|
94
|
-
}]);
|
|
95
|
-
return DragSortRow;
|
|
96
|
-
}(React.Component);
|
|
97
|
-
export default DragSortRow;
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
-
import _Input from "antd/es/input";
|
|
3
|
-
import _Button from "antd/es/button";
|
|
4
|
-
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
5
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
6
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
7
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
8
|
-
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
9
|
-
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
10
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
11
|
-
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
12
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import PropTypes from 'prop-types';
|
|
16
|
-
import Control from "../Control/Control";
|
|
17
|
-
import variables from '../variables';
|
|
18
|
-
var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
19
|
-
_inherits(FilterDropDown, _React$Component);
|
|
20
|
-
var _super = _createSuper(FilterDropDown);
|
|
21
|
-
function FilterDropDown(_props) {
|
|
22
|
-
var _this;
|
|
23
|
-
_classCallCheck(this, FilterDropDown);
|
|
24
|
-
_this = _super.call(this, _props);
|
|
25
|
-
_defineProperty(_assertThisInitialized(_this), "onChange", function (e) {
|
|
26
|
-
_this.setState({
|
|
27
|
-
value: e.target.value
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
_defineProperty(_assertThisInitialized(_this), "onDateChange", function (key, value) {
|
|
31
|
-
_this.setState(_defineProperty({}, key, value));
|
|
32
|
-
});
|
|
33
|
-
_defineProperty(_assertThisInitialized(_this), "onSearch", function () {
|
|
34
|
-
var _this$props = _this.props,
|
|
35
|
-
onSearch = _this$props.onSearch,
|
|
36
|
-
isDateFilterByStartAndEnd = _this$props.isDateFilterByStartAndEnd;
|
|
37
|
-
if (onSearch) {
|
|
38
|
-
var value = !_this.state.start && !_this.state.end ? "" : _this.state;
|
|
39
|
-
var val = isDateFilterByStartAndEnd ? value : _this.state.value;
|
|
40
|
-
onSearch(val);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
_defineProperty(_assertThisInitialized(_this), "DateInputCreator", function () {
|
|
44
|
-
var _context, _context2, _context3;
|
|
45
|
-
var props = _this.props.props;
|
|
46
|
-
var propsStart = {
|
|
47
|
-
type: "date",
|
|
48
|
-
size: "small",
|
|
49
|
-
showTime: props ? props.showTime : true,
|
|
50
|
-
value: _this.state.start,
|
|
51
|
-
style: {
|
|
52
|
-
marginRight: '5px'
|
|
53
|
-
},
|
|
54
|
-
onChange: _bindInstanceProperty(_context = _this.onDateChange).call(_context, null, 'start')
|
|
55
|
-
};
|
|
56
|
-
var propsEnd = {
|
|
57
|
-
type: "date",
|
|
58
|
-
size: "small",
|
|
59
|
-
showTime: props ? props.showTime : true,
|
|
60
|
-
value: _this.state.end,
|
|
61
|
-
style: {
|
|
62
|
-
marginLeft: '5px'
|
|
63
|
-
},
|
|
64
|
-
onChange: _bindInstanceProperty(_context2 = _this.onDateChange).call(_context2, null, 'end')
|
|
65
|
-
};
|
|
66
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: variables('FilterDropDown').date
|
|
68
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Control, propsStart), "To", /*#__PURE__*/React.createElement(Control, propsEnd)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Button, {
|
|
69
|
-
size: "small",
|
|
70
|
-
style: {
|
|
71
|
-
marginRight: '5px'
|
|
72
|
-
},
|
|
73
|
-
onClick: _this.props.onClose
|
|
74
|
-
}, "\u5173\u95ED"), /*#__PURE__*/React.createElement(_Button, {
|
|
75
|
-
size: "small",
|
|
76
|
-
type: "primary",
|
|
77
|
-
onClick: _bindInstanceProperty(_context3 = _this.onSearch).call(_context3, null, _this.props.type)
|
|
78
|
-
}, "\u641C\u7D22")));
|
|
79
|
-
});
|
|
80
|
-
_defineProperty(_assertThisInitialized(_this), "InputCreator", function () {
|
|
81
|
-
var props = {
|
|
82
|
-
size: 'small',
|
|
83
|
-
value: _this.state.value,
|
|
84
|
-
onChange: _this.onChange,
|
|
85
|
-
onPressEnter: _this.onSearch,
|
|
86
|
-
ref: function ref(e) {
|
|
87
|
-
return _this.input = e;
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: variables('FilterDropDown')
|
|
92
|
-
}, /*#__PURE__*/React.createElement(_Input, props), /*#__PURE__*/React.createElement(_Button, {
|
|
93
|
-
onClick: _this.onSearch,
|
|
94
|
-
size: "small",
|
|
95
|
-
type: "primary"
|
|
96
|
-
}, "\u641C\u7D22"));
|
|
97
|
-
});
|
|
98
|
-
_this.state = {
|
|
99
|
-
value: _props.value || ''
|
|
100
|
-
};
|
|
101
|
-
if (_props.isDateFilterByStartAndEnd) {
|
|
102
|
-
var _ref = _props.value || {},
|
|
103
|
-
_ref$start = _ref.start,
|
|
104
|
-
start = _ref$start === void 0 ? '' : _ref$start,
|
|
105
|
-
_ref$end = _ref.end,
|
|
106
|
-
end = _ref$end === void 0 ? '' : _ref$end;
|
|
107
|
-
_this.state = {
|
|
108
|
-
start: start,
|
|
109
|
-
end: end
|
|
110
|
-
};
|
|
111
|
-
} else {
|
|
112
|
-
_this.state = {
|
|
113
|
-
value: _props.value || ''
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
return _this;
|
|
117
|
-
}
|
|
118
|
-
_createClass(FilterDropDown, [{
|
|
119
|
-
key: "componentWillReceiveProps",
|
|
120
|
-
value: function componentWillReceiveProps(newProps) {
|
|
121
|
-
if (newProps.isDateFilterByStartAndEnd) {
|
|
122
|
-
var _ref2 = newProps.value || {},
|
|
123
|
-
_ref2$start = _ref2.start,
|
|
124
|
-
start = _ref2$start === void 0 ? '' : _ref2$start,
|
|
125
|
-
_ref2$end = _ref2.end,
|
|
126
|
-
end = _ref2$end === void 0 ? '' : _ref2$end;
|
|
127
|
-
this.setState({
|
|
128
|
-
start: start,
|
|
129
|
-
end: end
|
|
130
|
-
});
|
|
131
|
-
} else {
|
|
132
|
-
this.setState({
|
|
133
|
-
value: newProps.value || ''
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}, {
|
|
138
|
-
key: "componentDidMount",
|
|
139
|
-
value: function componentDidMount() {
|
|
140
|
-
if (this.input) {
|
|
141
|
-
this.input.focus();
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}, {
|
|
145
|
-
key: "componentDidUpdate",
|
|
146
|
-
value: function componentDidUpdate() {
|
|
147
|
-
if (this.input) {
|
|
148
|
-
this.input.focus();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}, {
|
|
152
|
-
key: "render",
|
|
153
|
-
value: function render() {
|
|
154
|
-
return this.props.isDateFilterByStartAndEnd ? this.DateInputCreator() : this.InputCreator();
|
|
155
|
-
}
|
|
156
|
-
}]);
|
|
157
|
-
return FilterDropDown;
|
|
158
|
-
}(React.Component);
|
|
159
|
-
_defineProperty(FilterDropDown, "propTypes", {
|
|
160
|
-
value: PropTypes.any,
|
|
161
|
-
onSearch: PropTypes.func,
|
|
162
|
-
onClose: PropTypes.func
|
|
163
|
-
});
|
|
164
|
-
export default FilterDropDown;
|