tntd 1.4.32 → 1.4.33-beta.1
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/components/Ellipsis/index.js +47 -15
- package/components/QueryListScene/QueryForm.js +4 -4
- package/components/QueryListScene/createActions.js +4 -4
- package/dist/1.tntd.js +1 -1
- package/dist/stats.json +24089 -23289
- package/dist/tntd.css +1 -1
- package/dist/tntd.js +7 -10
- package/es/ArrayInput/icon.js +5 -5
- package/es/ArrayInput/index.js +79 -111
- package/es/AuthContext.js +1 -1
- package/es/Columns/index.js +33 -40
- package/es/DevelopmentLogin/LoginModal.js +33 -46
- package/es/DevelopmentLogin/index.js +14 -18
- package/es/Ellipsis/Svg/CopySVG.js +13 -13
- package/es/Ellipsis/Svg/TickSVG.js +8 -8
- package/es/Ellipsis/index.js +100 -79
- package/es/Handle/index.js +46 -64
- package/es/Icon/fonts/iconfont.js +7 -12
- package/es/Icon/index.js +12 -15
- package/es/Img/Contain.js +26 -31
- package/es/Img/Cover.js +43 -57
- package/es/Img/index.js +39 -48
- package/es/Layout/ActionsContext.js +3 -2
- package/es/Layout/AppList.js +39 -94
- package/es/Layout/Application.js +28 -74
- package/es/Layout/Avatar.js +30 -67
- package/es/Layout/CompatibleLanguage.js +41 -96
- package/es/Layout/EnterpriseLayout/Avatar.js +39 -77
- package/es/Layout/EnterpriseLayout/Language.js +16 -34
- package/es/Layout/EnterpriseLayout/Theme.js +18 -36
- package/es/Layout/EnterpriseLayout/index.js +14 -16
- package/es/Layout/GlobalNavigation/NavigationPopup.js +61 -172
- package/es/Layout/GlobalNavigation/index.js +22 -56
- package/es/Layout/Header.js +26 -47
- package/es/Layout/HeaderActions.js +45 -59
- package/es/Layout/HeaderNavs.js +24 -51
- package/es/Layout/HeaderTabs.js +53 -106
- package/es/Layout/Iconfont.js +1 -1
- package/es/Layout/Language.js +16 -34
- package/es/Layout/Layout.js +88 -110
- package/es/Layout/Logo.js +17 -33
- package/es/Layout/OrgAppList.js +64 -109
- package/es/Layout/SideMenu.js +67 -128
- package/es/Layout/Theme.js +25 -63
- package/es/Layout/index.js +28 -37
- package/es/Layout/paaslayout/CompactSideMenu.js +37 -76
- package/es/Layout/paaslayout/Header.js +23 -46
- package/es/Layout/paaslayout/Logo.js +4 -14
- package/es/Layout/paaslayout/SideMenu.js +41 -80
- package/es/Layout/paaslayout/index.js +77 -104
- package/es/Layout/storage.js +10 -9
- package/es/LoadingButton/index.js +18 -27
- package/es/Modal/index.js +42 -51
- package/es/Page/Box.js +36 -43
- package/es/Page/index.js +56 -71
- package/es/Page/utils.js +0 -5
- package/es/QueryForm/Field/Checkbox.js +7 -11
- package/es/QueryForm/Field/Select.js +34 -44
- package/es/QueryForm/Field/SelectInput.js +31 -46
- package/es/QueryForm/Field/fieldsMap.js +0 -1
- package/es/QueryForm/Field/index.js +46 -78
- package/es/QueryForm/createActions.js +6 -7
- package/es/QueryForm/index.js +79 -140
- package/es/QueryListScene/List.js +83 -139
- package/es/QueryListScene/QueryForm.js +54 -91
- package/es/QueryListScene/QueryListScene.js +29 -47
- package/es/QueryListScene/Title.js +3 -3
- package/es/QueryListScene/Toolbar.js +13 -14
- package/es/QueryListScene/createActions.js +4 -4
- package/es/Select/DropDownWrap.js +32 -55
- package/es/Select/index.js +140 -232
- package/es/Table/ResizableTable/index.js +29 -43
- package/es/Table/index.js +20 -19
- package/es/Title/index.js +23 -25
- package/es/locale.js +1 -5
- package/es/utils/checkAuth.js +6 -8
- package/es/utils/findMenuInfoByPath.js +0 -4
- package/es/utils/index.js +17 -27
- package/lib/ArrayInput/icon.js +7 -9
- package/lib/ArrayInput/index.js +82 -131
- package/lib/AuthContext.js +2 -6
- package/lib/Columns/index.js +36 -54
- package/lib/DevelopmentLogin/LoginModal.js +36 -63
- package/lib/DevelopmentLogin/index.js +21 -31
- package/lib/Ellipsis/Svg/CopySVG.js +15 -18
- package/lib/Ellipsis/Svg/TickSVG.js +10 -13
- package/lib/Ellipsis/index.js +105 -93
- package/lib/Handle/index.js +51 -87
- package/lib/Icon/fonts/iconfont.js +7 -12
- package/lib/Icon/iconList.js +1 -2
- package/lib/Icon/index.js +16 -26
- package/lib/Img/Contain.js +29 -40
- package/lib/Img/Cover.js +48 -72
- package/lib/Img/index.js +42 -58
- package/lib/Layout/ActionsContext.js +1 -5
- package/lib/Layout/AppList.js +45 -124
- package/lib/Layout/Application.js +31 -92
- package/lib/Layout/Avatar.js +36 -91
- package/lib/Layout/CompatibleLanguage.js +44 -116
- package/lib/Layout/EnterpriseLayout/Avatar.js +45 -105
- package/lib/Layout/EnterpriseLayout/Language.js +22 -54
- package/lib/Layout/EnterpriseLayout/Theme.js +21 -50
- package/lib/Layout/EnterpriseLayout/index.js +17 -27
- package/lib/Layout/GlobalNavigation/NavigationPopup.js +64 -192
- package/lib/Layout/GlobalNavigation/index.js +28 -80
- package/lib/Layout/Header.js +36 -68
- package/lib/Layout/HeaderActions.js +51 -81
- package/lib/Layout/HeaderNavs.js +30 -70
- package/lib/Layout/HeaderTabs.js +58 -127
- package/lib/Layout/Iconfont.js +4 -9
- package/lib/Layout/Language.js +22 -54
- package/lib/Layout/Layout.js +93 -134
- package/lib/Layout/Logo.js +26 -47
- package/lib/Layout/OrgAppList.js +69 -133
- package/lib/Layout/SideMenu.js +72 -151
- package/lib/Layout/Theme.js +28 -79
- package/lib/Layout/createActions.js +3 -9
- package/lib/Layout/images/index.js +5 -36
- package/lib/Layout/index.js +35 -63
- package/lib/Layout/paaslayout/CompactSideMenu.js +40 -90
- package/lib/Layout/paaslayout/Header.js +30 -60
- package/lib/Layout/paaslayout/Logo.js +11 -24
- package/lib/Layout/paaslayout/SideMenu.js +44 -93
- package/lib/Layout/paaslayout/index.js +82 -128
- package/lib/Layout/storage.js +26 -68
- package/lib/LoadingButton/index.js +21 -36
- package/lib/Modal/index.js +45 -62
- package/lib/Page/Box.js +38 -50
- package/lib/Page/index.js +58 -84
- package/lib/Page/utils.js +5 -16
- package/lib/QueryForm/Field/Checkbox.js +10 -19
- package/lib/QueryForm/Field/Select.js +39 -60
- package/lib/QueryForm/Field/SelectInput.js +36 -65
- package/lib/QueryForm/Field/fieldsMap.js +6 -23
- package/lib/QueryForm/Field/index.js +50 -91
- package/lib/QueryForm/createActions.js +9 -16
- package/lib/QueryForm/index.js +83 -165
- package/lib/QueryForm/useForm.js +1 -6
- package/lib/QueryListScene/List.js +89 -153
- package/lib/QueryListScene/QueryForm.js +58 -101
- package/lib/QueryListScene/QueryListScene.js +31 -56
- package/lib/QueryListScene/Title.js +6 -11
- package/lib/QueryListScene/Toolbar.js +16 -22
- package/lib/QueryListScene/createActions.js +7 -13
- package/lib/QueryListScene/index.js +5 -19
- package/lib/QueryListScene/useActions.js +1 -6
- package/lib/Select/DropDownWrap.js +35 -63
- package/lib/Select/index.js +142 -245
- package/lib/Table/ResizableTable/index.js +31 -54
- package/lib/Table/index.js +21 -34
- package/lib/Title/index.js +26 -34
- package/lib/index.js +36 -57
- package/lib/locale.js +9 -25
- package/lib/utils/checkAuth.js +9 -16
- package/lib/utils/findMenuInfoByPath.js +3 -12
- package/lib/utils/index.js +26 -60
- package/package.json +3 -2
package/es/Select/index.js
CHANGED
|
@@ -1,43 +1,33 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import "antd/lib/empty/style";
|
|
2
3
|
import _Empty from "antd/lib/empty";
|
|
3
4
|
import "antd/lib/select/style";
|
|
4
5
|
import _Select from "antd/lib/select";
|
|
5
|
-
|
|
6
|
-
function _extends() { _extends = Object.assign
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
25
|
-
|
|
26
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
27
|
-
|
|
28
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
|
-
|
|
30
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
31
|
-
|
|
32
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
33
|
-
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
-
|
|
6
|
+
var _excluded = ["dropdownStyle", "optionLabelProp", "dropdownClassName"];
|
|
7
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
12
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
19
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
20
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
23
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
24
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
36
25
|
import React, { PureComponent } from 'react';
|
|
37
|
-
import DropDownWrap from './DropDownWrap';
|
|
38
|
-
|
|
39
|
-
var ITEM_ELEMENT_NUMBER = 30; // Select size 配置
|
|
26
|
+
import DropDownWrap from './DropDownWrap';
|
|
40
27
|
|
|
28
|
+
// 页面实际渲染的下拉菜单数量,实际为 2 * ITEM_ELEMENT_NUMBER
|
|
29
|
+
var ITEM_ELEMENT_NUMBER = 30;
|
|
30
|
+
// Select size 配置
|
|
41
31
|
var ITEM_HEIGHT_CFG = {
|
|
42
32
|
small: 24,
|
|
43
33
|
large: 40,
|
|
@@ -49,23 +39,14 @@ var ARROW_CODE = {
|
|
|
49
39
|
};
|
|
50
40
|
var DROPDOWN_HEIGHT = 224;
|
|
51
41
|
var Option = _Select.Option;
|
|
52
|
-
|
|
53
|
-
var SuperSelect =
|
|
54
|
-
/*#__PURE__*/
|
|
55
|
-
function (_PureComponent) {
|
|
56
|
-
_inherits(SuperSelect, _PureComponent);
|
|
57
|
-
|
|
42
|
+
var SuperSelect = /*#__PURE__*/function (_PureComponent) {
|
|
58
43
|
function SuperSelect(props) {
|
|
59
44
|
var _this;
|
|
60
|
-
|
|
61
45
|
_classCallCheck(this, SuperSelect);
|
|
62
|
-
|
|
63
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(SuperSelect).call(this, props));
|
|
64
|
-
|
|
46
|
+
_this = _callSuper(this, SuperSelect, [props]);
|
|
65
47
|
_this.turnChildren = function (children) {
|
|
66
48
|
if (!children) return [];
|
|
67
49
|
var arr = [];
|
|
68
|
-
|
|
69
50
|
if (children && children.props) {
|
|
70
51
|
arr.push(children);
|
|
71
52
|
} else {
|
|
@@ -79,61 +60,47 @@ function (_PureComponent) {
|
|
|
79
60
|
}
|
|
80
61
|
});
|
|
81
62
|
}
|
|
82
|
-
|
|
83
63
|
return arr;
|
|
84
64
|
};
|
|
85
|
-
|
|
86
65
|
_this.formulaWidth = function () {
|
|
87
66
|
// 获取dom设置宽度
|
|
88
67
|
var _this$props = _this.props,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
68
|
+
arr2 = _this$props.children,
|
|
69
|
+
_this$props$dropdownM = _this$props.dropdownMatchSelectWidth,
|
|
70
|
+
dropdownMatchSelectWidth = _this$props$dropdownM === void 0 ? true : _this$props$dropdownM,
|
|
71
|
+
maxWidth = _this$props.maxWidth;
|
|
93
72
|
var selectDom = document.getElementById(_this.id);
|
|
94
73
|
var selectWidth = selectDom.clientWidth || selectDom.offsetWidth;
|
|
95
74
|
var arr = [];
|
|
96
75
|
var formulaMaxWidth = 10;
|
|
97
|
-
|
|
98
76
|
if (!dropdownMatchSelectWidth) {
|
|
99
77
|
formulaMaxWidth = maxWidth || 10;
|
|
100
78
|
}
|
|
101
|
-
|
|
102
79
|
if (!dropdownMatchSelectWidth && !maxWidth) {
|
|
103
80
|
var children = _this.turnChildren(arr2);
|
|
104
|
-
|
|
105
81
|
for (var i = 0; i < children.length; i++) {
|
|
106
82
|
var val = children[i].props.children;
|
|
107
|
-
|
|
108
83
|
var textWidth = _this.getTextPixelWith(val);
|
|
109
|
-
|
|
110
84
|
arr.push(textWidth.toFixed(2));
|
|
111
85
|
}
|
|
112
|
-
|
|
113
86
|
if (arr.length > 0) {
|
|
114
87
|
formulaMaxWidth = Math.max.apply(Math, arr);
|
|
115
88
|
}
|
|
116
89
|
}
|
|
117
|
-
|
|
118
90
|
_this.setState({
|
|
119
91
|
selectWidth: selectWidth,
|
|
120
92
|
maxWidth: formulaMaxWidth
|
|
121
93
|
});
|
|
122
94
|
};
|
|
123
|
-
|
|
95
|
+
// 获取单行文本的像素宽度
|
|
124
96
|
_this.getTextPixelWith = function (text) {
|
|
125
97
|
var fontStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '14px';
|
|
126
98
|
var canvas = document.createElement('canvas'); // 创建 canvas 画布
|
|
127
|
-
|
|
128
99
|
var context = canvas.getContext('2d'); // 获取 canvas 绘图上下文环境
|
|
129
|
-
|
|
130
100
|
context.font = fontStyle; // 设置字体样式,使用前设置好对应的 font 样式才能准确获取文字的像素长度
|
|
131
|
-
|
|
132
101
|
var dimension = context.measureText(text); // 测量文字
|
|
133
|
-
|
|
134
102
|
return dimension.width;
|
|
135
103
|
};
|
|
136
|
-
|
|
137
104
|
_this.getItemStyle = function (i) {
|
|
138
105
|
return {
|
|
139
106
|
position: 'absolute',
|
|
@@ -142,91 +109,75 @@ function (_PureComponent) {
|
|
|
142
109
|
height: _this.ITEM_HEIGHT
|
|
143
110
|
};
|
|
144
111
|
};
|
|
145
|
-
|
|
146
112
|
_this.addEvent = function () {
|
|
147
|
-
_this.scrollEle = document.querySelector(".".concat(_this.dropdownClassName));
|
|
148
|
-
|
|
113
|
+
_this.scrollEle = document.querySelector(".".concat(_this.dropdownClassName));
|
|
114
|
+
// 下拉菜单未展开时元素不存在
|
|
149
115
|
if (!_this.scrollEle) return;
|
|
150
|
-
|
|
151
116
|
_this.scrollEle.addEventListener('scroll', _this.onScroll, false);
|
|
152
|
-
|
|
153
117
|
_this.inputEle = document.querySelector("#".concat(_this.id));
|
|
154
118
|
if (!_this.inputEle) return;
|
|
155
|
-
|
|
156
119
|
_this.inputEle.addEventListener('keydown', _this.onKeyDown, false);
|
|
157
120
|
};
|
|
158
|
-
|
|
121
|
+
// 模拟 antd select 按下 上下箭头 键时滚动列表
|
|
159
122
|
_this.onKeyDown = function (e) {
|
|
160
123
|
var _ref = e || {},
|
|
161
|
-
|
|
162
|
-
|
|
124
|
+
keyCode = _ref.keyCode;
|
|
163
125
|
setTimeout(function () {
|
|
164
126
|
var activeItem = document.querySelector(".".concat(_this.dropdownClassName, " .ant-select-dropdown-menu-item-active"));
|
|
165
127
|
if (!activeItem) return;
|
|
166
128
|
var offsetTop = activeItem.offsetTop;
|
|
167
129
|
var isUp = ARROW_CODE[keyCode] === 'up';
|
|
168
|
-
var isDown = ARROW_CODE[keyCode] === 'down';
|
|
130
|
+
var isDown = ARROW_CODE[keyCode] === 'down';
|
|
169
131
|
|
|
132
|
+
// 在所有列表第一行按上键
|
|
170
133
|
if (offsetTop - _this.prevTop > DROPDOWN_HEIGHT && isUp) {
|
|
171
134
|
_this.scrollEle.scrollTo(0, _this.allHeight - DROPDOWN_HEIGHT);
|
|
172
|
-
|
|
173
135
|
_this.prevTop = _this.allHeight;
|
|
174
136
|
return;
|
|
175
|
-
}
|
|
176
|
-
|
|
137
|
+
}
|
|
177
138
|
|
|
139
|
+
// 在所有列表中最后一行按下键
|
|
178
140
|
if (_this.prevTop > offsetTop + DROPDOWN_HEIGHT && isDown) {
|
|
179
141
|
_this.scrollEle.scrollTo(0, 0);
|
|
180
|
-
|
|
181
142
|
_this.prevTop = 0;
|
|
182
143
|
return;
|
|
183
144
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
145
|
+
_this.prevTop = offsetTop;
|
|
146
|
+
// 向下滚动到下拉框最后一行时,向下滚动一行的高度
|
|
187
147
|
if (offsetTop > _this.scrollEle.scrollTop + DROPDOWN_HEIGHT - _this.ITEM_HEIGHT + 10 && isDown) {
|
|
188
148
|
_this.scrollEle.scrollTo(0, _this.scrollTop + _this.ITEM_HEIGHT);
|
|
189
|
-
|
|
190
149
|
return;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
150
|
+
}
|
|
151
|
+
// 向上滚动到下拉框第一一行时,向上滚动一行的高度
|
|
194
152
|
if (offsetTop < _this.scrollEle.scrollTop && isUp) {
|
|
195
153
|
_this.scrollEle.scrollTo(0, _this.scrollTop - _this.ITEM_HEIGHT);
|
|
196
154
|
}
|
|
197
155
|
}, 100);
|
|
198
156
|
};
|
|
199
|
-
|
|
200
157
|
_this.onScroll = function () {
|
|
201
158
|
return _this.throttleByHeight(_this.onScrollReal);
|
|
202
159
|
};
|
|
203
|
-
|
|
204
160
|
_this.onScrollReal = function () {
|
|
205
161
|
_this.allList = _this.getUseChildrenList();
|
|
206
|
-
|
|
207
162
|
var _this$getStartAndEndI = _this.getStartAndEndIndex(),
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
163
|
+
startIndex = _this$getStartAndEndI.startIndex,
|
|
164
|
+
endIndex = _this$getStartAndEndI.endIndex;
|
|
165
|
+
_this.prevScrollTop = _this.scrollTop;
|
|
166
|
+
// 重新渲染列表组件 Wrap
|
|
213
167
|
var allHeight = _this.allList.length * _this.ITEM_HEIGHT || 100;
|
|
214
|
-
|
|
215
168
|
_this.wrap.reactList(allHeight, startIndex, endIndex);
|
|
216
169
|
};
|
|
217
|
-
|
|
218
170
|
_this.throttleByHeight = function () {
|
|
219
|
-
_this.scrollTop = _this.scrollEle.scrollTop;
|
|
220
|
-
|
|
171
|
+
_this.scrollTop = _this.scrollEle.scrollTop;
|
|
172
|
+
// 滚动的高度
|
|
221
173
|
var delta = _this.prevScrollTop - _this.scrollTop;
|
|
222
174
|
delta = delta < 0 ? 0 - delta : delta;
|
|
223
175
|
delta > _this.reactDelta && _this.onScrollReal();
|
|
224
176
|
};
|
|
225
|
-
|
|
177
|
+
// 列表可展示所有 children
|
|
226
178
|
_this.getUseChildrenList = function () {
|
|
227
179
|
return _this.state.filterChildren || _this.state.children;
|
|
228
180
|
};
|
|
229
|
-
|
|
230
181
|
_this.getStartAndEndIndex = function () {
|
|
231
182
|
// 滚动后显示在列表可视区中的第一个 item 的 index
|
|
232
183
|
var showIndex = Number((_this.scrollTop / _this.ITEM_HEIGHT).toFixed(0));
|
|
@@ -237,74 +188,67 @@ function (_PureComponent) {
|
|
|
237
188
|
endIndex: endIndex
|
|
238
189
|
};
|
|
239
190
|
};
|
|
240
|
-
|
|
191
|
+
// 须使用 setTimeout 确保在 dom 加载完成之后添加事件
|
|
241
192
|
_this.setSuperDrowDownMenu = function (visible) {
|
|
242
193
|
if (!visible) return;
|
|
243
194
|
_this.allList = _this.getUseChildrenList();
|
|
244
|
-
|
|
245
195
|
if (!_this.eventTimer || !_this.scrollEle) {
|
|
246
196
|
_this.eventTimer = setTimeout(function () {
|
|
247
197
|
return _this.addEvent();
|
|
248
198
|
}, 0);
|
|
249
199
|
} else {
|
|
250
|
-
var allHeight = _this.allList.length * _this.ITEM_HEIGHT || 100;
|
|
251
|
-
|
|
200
|
+
var allHeight = _this.allList.length * _this.ITEM_HEIGHT || 100;
|
|
201
|
+
// 下拉列表单独重新渲染
|
|
252
202
|
var _this$getStartAndEndI2 = _this.getStartAndEndIndex(),
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
203
|
+
startIndex = _this$getStartAndEndI2.startIndex,
|
|
204
|
+
endIndex = _this$getStartAndEndI2.endIndex;
|
|
256
205
|
setTimeout(function () {
|
|
257
206
|
_this.wrap && _this.wrap.reactList(allHeight, startIndex, endIndex);
|
|
258
207
|
}, 0);
|
|
259
208
|
}
|
|
260
209
|
};
|
|
261
|
-
|
|
262
210
|
_this.onDropdownVisibleChange = function (visible) {
|
|
263
211
|
var onDropdownVisibleChange = _this.props.onDropdownVisibleChange;
|
|
264
212
|
onDropdownVisibleChange && onDropdownVisibleChange(visible);
|
|
265
213
|
var _this$state = _this.state,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
214
|
+
value = _this$state.value,
|
|
215
|
+
children = _this$state.children;
|
|
216
|
+
// 关闭下拉框前清空筛选条件,防止下次打开任然显示筛选后的 options
|
|
269
217
|
if (!visible) {
|
|
270
218
|
// 定时器确保关闭后再设置 filterChildren,防止列表刷新闪烁
|
|
271
219
|
setTimeout(function () {
|
|
272
220
|
_this.setState({
|
|
273
221
|
filterChildren: null
|
|
274
222
|
});
|
|
275
|
-
|
|
276
223
|
_this.setDefaultScrollTop(value);
|
|
277
|
-
}, 100);
|
|
224
|
+
}, 100);
|
|
225
|
+
// this.removeEvent();
|
|
278
226
|
} else {
|
|
279
227
|
// this.addEvent();
|
|
280
228
|
if (value) {
|
|
281
229
|
// 如果已有 value, 设置默认滚动位置
|
|
282
|
-
_this.setDefaultScrollTop();
|
|
283
|
-
|
|
284
|
-
|
|
230
|
+
_this.setDefaultScrollTop();
|
|
231
|
+
// 设置下拉列表显示数据
|
|
285
232
|
_this.setSuperDrowDownMenu(visible);
|
|
286
233
|
} else if (!value && value !== 0 && children && children.length > 0) {
|
|
287
234
|
// 无数据时,下拉回归至第一个
|
|
288
235
|
var val = children[0].props.value;
|
|
289
|
-
|
|
290
236
|
_this.setDefaultScrollTop(val);
|
|
291
237
|
}
|
|
292
238
|
}
|
|
293
239
|
};
|
|
294
|
-
|
|
295
240
|
_this.onDeselect = function (value) {
|
|
296
241
|
var onDeselect = _this.props.onDeselect;
|
|
297
242
|
onDeselect && onDeselect(value);
|
|
298
243
|
};
|
|
299
|
-
|
|
244
|
+
// 在搜索重新计算下拉滚动条高度
|
|
300
245
|
_this.onChange = function (value, opt) {
|
|
301
246
|
var _this$props2 = _this.props,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
247
|
+
showSearch = _this$props2.showSearch,
|
|
248
|
+
onChange = _this$props2.onChange,
|
|
249
|
+
autoClearSearchValue = _this$props2.autoClearSearchValue,
|
|
250
|
+
maxCount = _this$props2.maxCount,
|
|
251
|
+
mode = _this$props2.mode;
|
|
308
252
|
if (showSearch || _this.isMultiple) {
|
|
309
253
|
// 搜索模式下选择后是否需要重置搜索状态
|
|
310
254
|
if (autoClearSearchValue !== false) {
|
|
@@ -316,7 +260,6 @@ function (_PureComponent) {
|
|
|
316
260
|
});
|
|
317
261
|
}
|
|
318
262
|
}
|
|
319
|
-
|
|
320
263
|
if (mode === 'multiple') {
|
|
321
264
|
if (value.length <= maxCount) {
|
|
322
265
|
_this.setState({
|
|
@@ -328,27 +271,21 @@ function (_PureComponent) {
|
|
|
328
271
|
value: value
|
|
329
272
|
});
|
|
330
273
|
}
|
|
331
|
-
|
|
332
274
|
onChange && onChange(value, opt);
|
|
333
|
-
|
|
334
275
|
if (mode !== 'multiple') {
|
|
335
276
|
_this.select && _this.select.blur();
|
|
336
277
|
}
|
|
337
278
|
};
|
|
338
|
-
|
|
339
279
|
_this.onSearch = function (v) {
|
|
340
280
|
var _this$props3 = _this.props,
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
281
|
+
showSearch = _this$props3.showSearch,
|
|
282
|
+
onSearch = _this$props3.onSearch,
|
|
283
|
+
filterOption = _this$props3.filterOption,
|
|
284
|
+
arr = _this$props3.children;
|
|
346
285
|
var children = _this.turnChildren(arr);
|
|
347
|
-
|
|
348
286
|
if (showSearch && filterOption !== false) {
|
|
349
287
|
// 须根据 filterOption(如有该自定义函数)手动 filter 搜索匹配的列表
|
|
350
288
|
var filterChildren = null;
|
|
351
|
-
|
|
352
289
|
if (typeof filterOption === 'function') {
|
|
353
290
|
filterChildren = children.filter(function (item) {
|
|
354
291
|
return filterOption(v, item);
|
|
@@ -357,17 +294,18 @@ function (_PureComponent) {
|
|
|
357
294
|
filterChildren = children.filter(function (item) {
|
|
358
295
|
return _this.filterOption(v, item);
|
|
359
296
|
});
|
|
360
|
-
}
|
|
361
|
-
|
|
297
|
+
}
|
|
362
298
|
|
|
299
|
+
// 搜索框有值,去除disabled=true的children
|
|
363
300
|
var newFilterChild = [];
|
|
364
301
|
filterChildren && filterChildren.forEach(function (item, index) {
|
|
365
302
|
if (!item.props.disabled) {
|
|
366
303
|
newFilterChild.push(item);
|
|
367
304
|
}
|
|
368
305
|
});
|
|
369
|
-
filterChildren = newFilterChild;
|
|
306
|
+
filterChildren = newFilterChild;
|
|
370
307
|
|
|
308
|
+
// 设置下拉列表显示数据
|
|
371
309
|
_this.setState({
|
|
372
310
|
filterChildren: v === '' ? null : filterChildren
|
|
373
311
|
}, function () {
|
|
@@ -375,77 +313,62 @@ function (_PureComponent) {
|
|
|
375
313
|
// 搜索后需要重置滚动位置到0,防止上次 scrollTop 位置无数据
|
|
376
314
|
if (filterChildren) {
|
|
377
315
|
_this.scrollTop = 0;
|
|
378
|
-
|
|
379
316
|
_this.scrollEle.scrollTo(0, 0);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
317
|
+
}
|
|
318
|
+
// 搜索成功后需要重新设置列表的总高度
|
|
383
319
|
_this.setSuperDrowDownMenu(true);
|
|
384
320
|
}, 0);
|
|
385
321
|
});
|
|
386
322
|
}
|
|
387
|
-
|
|
388
323
|
onSearch && onSearch(v);
|
|
389
324
|
};
|
|
390
|
-
|
|
391
325
|
_this.filterOption = function (v, option) {
|
|
392
326
|
// 自定义过滤对应的 option 属性配置
|
|
393
327
|
var filterProps = _this.props.optionFilterProp || 'value';
|
|
394
328
|
return "".concat(option.props[filterProps]).indexOf(v) >= 0;
|
|
395
329
|
};
|
|
396
|
-
|
|
397
330
|
_this.setDefaultScrollTop = function (data) {
|
|
398
331
|
var value = _this.state.value;
|
|
399
332
|
var arr = _this.props.children;
|
|
400
|
-
|
|
401
333
|
var children = _this.turnChildren(arr);
|
|
402
|
-
|
|
403
334
|
var val = data || data === 0 ? data : value;
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
if (itemValue === val || Array.isArray(val) && val.includes(itemValue)) {
|
|
410
|
-
var _ret = function () {
|
|
335
|
+
var _loop = function _loop() {
|
|
336
|
+
var item = children[i];
|
|
337
|
+
var itemValue = item.props.value;
|
|
338
|
+
if (itemValue === val || Array.isArray(val) && val.includes(itemValue)) {
|
|
411
339
|
var targetScrollTop = i * _this.ITEM_HEIGHT;
|
|
412
340
|
setTimeout(function () {
|
|
413
341
|
if (!_this.scrollEle) {
|
|
414
342
|
_this.addEvent();
|
|
415
343
|
}
|
|
416
|
-
|
|
417
344
|
_this.scrollEle && _this.scrollEle.scrollTo(0, targetScrollTop);
|
|
418
345
|
}, 100);
|
|
419
346
|
return {
|
|
420
347
|
v: void 0
|
|
421
348
|
};
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
_ret;
|
|
352
|
+
for (var i = 0; i < children.length; i++) {
|
|
353
|
+
_ret = _loop();
|
|
354
|
+
if (_ret) return _ret.v;
|
|
426
355
|
}
|
|
427
356
|
};
|
|
428
|
-
|
|
429
357
|
_this.removeEvent = function () {
|
|
430
358
|
if (!_this.scrollEle) return;
|
|
431
|
-
|
|
432
359
|
_this.scrollEle.removeEventListener('scroll', _this.onScroll, false);
|
|
433
|
-
|
|
434
360
|
if (!_this.inputEle) return;
|
|
435
|
-
|
|
436
361
|
_this.inputEle.removeEventListener('keydown', _this.onKeyDown, false);
|
|
437
362
|
};
|
|
438
|
-
|
|
439
363
|
var _mode = props.mode,
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
364
|
+
defaultValue = props.defaultValue,
|
|
365
|
+
_value = props.value,
|
|
366
|
+
optionHeight = props.optionHeight,
|
|
367
|
+
_arr = props.children;
|
|
444
368
|
_this.isMultiple = ['tags', 'multiple'].includes(_mode);
|
|
369
|
+
var _children = _this.turnChildren(_arr);
|
|
445
370
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
371
|
+
// 设置默认 value
|
|
449
372
|
var defaultV = _this.isMultiple ? [] : '';
|
|
450
373
|
defaultV = _value || defaultValue || defaultV;
|
|
451
374
|
_this.state = {
|
|
@@ -455,62 +378,60 @@ function (_PureComponent) {
|
|
|
455
378
|
value: defaultV,
|
|
456
379
|
maxWidth: null,
|
|
457
380
|
selectWidth: null
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
_this.ITEM_HEIGHT = optionHeight || ITEM_HEIGHT_CFG[props.size || 'default'];
|
|
461
|
-
|
|
462
|
-
_this.visibleDomHeight = _this.ITEM_HEIGHT * ITEM_ELEMENT_NUMBER;
|
|
463
|
-
|
|
464
|
-
_this.reactDelta = _this.visibleDomHeight / 3;
|
|
465
|
-
|
|
466
|
-
_this.isStopReact = false;
|
|
467
|
-
|
|
468
|
-
_this.prevScrollTop = 0;
|
|
469
|
-
|
|
381
|
+
};
|
|
382
|
+
// 下拉菜单项行高
|
|
383
|
+
_this.ITEM_HEIGHT = optionHeight || ITEM_HEIGHT_CFG[props.size || 'default'];
|
|
384
|
+
// 可视区 dom 高度
|
|
385
|
+
_this.visibleDomHeight = _this.ITEM_HEIGHT * ITEM_ELEMENT_NUMBER;
|
|
386
|
+
// 滚动时重新渲染的 scrollTop 判断值,大于 reactDelta 则刷新下拉列表
|
|
387
|
+
_this.reactDelta = _this.visibleDomHeight / 3;
|
|
388
|
+
// 是否拖动滚动条快速滚动状态
|
|
389
|
+
_this.isStopReact = false;
|
|
390
|
+
// 上一次滚动的 scrollTop 值
|
|
391
|
+
_this.prevScrollTop = 0;
|
|
392
|
+
// 上一次按下方向键时 scrollTop 值
|
|
470
393
|
_this.prevTop = 0;
|
|
471
|
-
_this.scrollTop = 0;
|
|
394
|
+
_this.scrollTop = 0;
|
|
472
395
|
|
|
396
|
+
// className
|
|
473
397
|
_this.dropdownClassName = "dc".concat(+new Date());
|
|
474
398
|
_this.id = "sid".concat(+new Date());
|
|
475
399
|
return _this;
|
|
476
400
|
}
|
|
477
|
-
|
|
478
|
-
_createClass(SuperSelect, [{
|
|
401
|
+
_inherits(SuperSelect, _PureComponent);
|
|
402
|
+
return _createClass(SuperSelect, [{
|
|
479
403
|
key: "componentDidMount",
|
|
480
404
|
value: function componentDidMount() {
|
|
481
405
|
var _this2 = this;
|
|
482
|
-
|
|
483
406
|
// defaultOpens=true 时添加滚动事件
|
|
484
407
|
setTimeout(function () {
|
|
485
408
|
_this2.addEvent();
|
|
486
409
|
}, 500);
|
|
487
410
|
var arr = this.props.children;
|
|
488
|
-
var children = this.turnChildren(arr);
|
|
489
|
-
|
|
490
|
-
this.formulaWidth();
|
|
411
|
+
var children = this.turnChildren(arr);
|
|
412
|
+
// if (children && children.length > 0) {
|
|
413
|
+
this.formulaWidth();
|
|
414
|
+
// }
|
|
491
415
|
}
|
|
492
416
|
}, {
|
|
493
417
|
key: "componentDidUpdate",
|
|
494
418
|
value: function componentDidUpdate(prevProps) {
|
|
495
419
|
var _this$props4 = this.props,
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
420
|
+
mode = _this$props4.mode,
|
|
421
|
+
defaultValue = _this$props4.defaultValue,
|
|
422
|
+
value = _this$props4.value,
|
|
423
|
+
children = _this$props4.children;
|
|
500
424
|
var arr = this.turnChildren(children);
|
|
501
|
-
|
|
502
425
|
if (prevProps.children !== children) {
|
|
503
426
|
this.isMultiple = ['tags', 'multiple'].includes(mode);
|
|
504
427
|
this.setState({
|
|
505
428
|
children: arr || [],
|
|
506
429
|
filterChildren: null
|
|
507
430
|
});
|
|
508
|
-
|
|
509
431
|
if (arr && arr.length > 0) {
|
|
510
432
|
this.formulaWidth();
|
|
511
433
|
}
|
|
512
434
|
}
|
|
513
|
-
|
|
514
435
|
if (prevProps.value !== value) {
|
|
515
436
|
// 更新时设置默认 value
|
|
516
437
|
var defaultV = this.isMultiple ? [] : '';
|
|
@@ -529,52 +450,44 @@ function (_PureComponent) {
|
|
|
529
450
|
key: "render",
|
|
530
451
|
value: function render() {
|
|
531
452
|
var _this3 = this;
|
|
532
|
-
|
|
533
453
|
var _this$state2 = this.state,
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
454
|
+
maxWidth = _this$state2.maxWidth,
|
|
455
|
+
selectWidth = _this$state2.selectWidth;
|
|
537
456
|
var _this$props5 = this.props,
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
457
|
+
dropdownStyle = _this$props5.dropdownStyle,
|
|
458
|
+
optionLabelProp = _this$props5.optionLabelProp,
|
|
459
|
+
dropdownClassName = _this$props5.dropdownClassName,
|
|
460
|
+
props = _objectWithoutProperties(_this$props5, _excluded);
|
|
543
461
|
this.allList = this.getUseChildrenList();
|
|
544
462
|
this.allHeight = this.allList.length * this.ITEM_HEIGHT || 100;
|
|
545
|
-
|
|
546
463
|
var _this$getStartAndEndI3 = this.getStartAndEndIndex(),
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
464
|
+
startIndex = _this$getStartAndEndI3.startIndex,
|
|
465
|
+
endIndex = _this$getStartAndEndI3.endIndex;
|
|
550
466
|
var dynamicWidth = maxWidth;
|
|
551
|
-
|
|
552
467
|
if (this.allList.length === 0 || maxWidth < selectWidth) {
|
|
553
468
|
dynamicWidth = selectWidth;
|
|
554
469
|
}
|
|
555
|
-
|
|
556
|
-
dropdownStyle = _objectSpread({
|
|
470
|
+
dropdownStyle = _objectSpread(_objectSpread({
|
|
557
471
|
maxHeight: "".concat(DROPDOWN_HEIGHT, "px")
|
|
558
|
-
}, dropdownStyle, {
|
|
472
|
+
}, dropdownStyle), {}, {
|
|
559
473
|
overflow: 'auto',
|
|
560
474
|
position: 'relative',
|
|
561
475
|
maxWidth: dynamicWidth
|
|
562
476
|
});
|
|
563
|
-
var value = this.state.value;
|
|
564
|
-
|
|
565
|
-
var _props = _objectSpread({}, props);
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
delete _props.value; // value 为空字符会隐藏 placeholder,改为 undefined
|
|
477
|
+
var value = this.state.value;
|
|
478
|
+
// 判断处于 antd Form 中时不自动设置 value
|
|
479
|
+
var _props = _objectSpread({}, props);
|
|
480
|
+
// 先删除 value,再手动赋值,防止空 value 影响 placeholder
|
|
481
|
+
delete _props.value;
|
|
569
482
|
|
|
483
|
+
// value 为空字符会隐藏 placeholder,改为 undefined
|
|
570
484
|
if (typeof value === 'string' && !value) {
|
|
571
485
|
_props.value = undefined;
|
|
572
486
|
} else {
|
|
573
487
|
_props.value = value;
|
|
574
488
|
}
|
|
575
|
-
|
|
576
489
|
optionLabelProp = optionLabelProp || 'children';
|
|
577
|
-
return React.createElement(_Select, _extends({}, _props, {
|
|
490
|
+
return /*#__PURE__*/React.createElement(_Select, _extends({}, _props, {
|
|
578
491
|
id: this.id,
|
|
579
492
|
onSearch: this.onSearch,
|
|
580
493
|
onChange: this.onChange,
|
|
@@ -588,33 +501,28 @@ function (_PureComponent) {
|
|
|
588
501
|
},
|
|
589
502
|
dropdownRender: function dropdownRender(menu, props) {
|
|
590
503
|
if (_this3.allList.length === 0) {
|
|
591
|
-
return React.createElement("div", {
|
|
504
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
592
505
|
style: {
|
|
593
506
|
padding: '5px 12px'
|
|
594
507
|
}
|
|
595
|
-
}, React.createElement(_Empty, {
|
|
508
|
+
}, /*#__PURE__*/React.createElement(_Empty, {
|
|
596
509
|
image: _Empty.PRESENTED_IMAGE_SIMPLE
|
|
597
510
|
}));
|
|
598
511
|
}
|
|
599
|
-
|
|
600
|
-
return React.createElement(DropDownWrap, _extends({
|
|
512
|
+
return /*#__PURE__*/React.createElement(DropDownWrap, {
|
|
601
513
|
startIndex: startIndex,
|
|
602
514
|
endIndex: endIndex,
|
|
603
515
|
allHeight: _this3.allHeight,
|
|
604
516
|
menu: menu,
|
|
605
|
-
itemHeight: _this3.ITEM_HEIGHT
|
|
606
|
-
}, {
|
|
517
|
+
itemHeight: _this3.ITEM_HEIGHT,
|
|
607
518
|
ref: function ref(ele) {
|
|
608
519
|
_this3.wrap = ele;
|
|
609
520
|
}
|
|
610
|
-
})
|
|
521
|
+
});
|
|
611
522
|
}
|
|
612
523
|
}), this.allList);
|
|
613
524
|
}
|
|
614
525
|
}]);
|
|
615
|
-
|
|
616
|
-
return SuperSelect;
|
|
617
526
|
}(PureComponent);
|
|
618
|
-
|
|
619
527
|
SuperSelect.Option = Option;
|
|
620
528
|
export default SuperSelect;
|