|
|
|
|
webpackJsonp([141],{
|
|
|
|
|
|
|
|
|
|
/***/ 1036:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
|
|
|
|
|
|
|
|
// load the styles
|
|
|
|
|
var content = __webpack_require__(1037);
|
|
|
|
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
|
|
|
// Prepare cssTransformation
|
|
|
|
|
var transform;
|
|
|
|
|
|
|
|
|
|
var options = {"hmr":false}
|
|
|
|
|
options.transform = transform
|
|
|
|
|
// add the styles to the DOM
|
|
|
|
|
var update = __webpack_require__(291)(content, options);
|
|
|
|
|
if(content.locals) module.exports = content.locals;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1037:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
exports = module.exports = __webpack_require__(290)(true);
|
|
|
|
|
// imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// module
|
|
|
|
|
exports.push([module.i, ".ant-dropdown{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";position:absolute;top:-9999px;left:-9999px;z-index:1050;display:block}.ant-dropdown:before{position:absolute;top:-7px;right:0;bottom:-7px;left:-7px;z-index:-9999;opacity:.0001;content:\" \"}.ant-dropdown-wrap{position:relative}.ant-dropdown-wrap .ant-btn>.anticon-down{display:inline-block;font-size:12px;font-size:10px\\9;-webkit-transform:scale(.83333333) rotate(0deg);-ms-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg)}:root .ant-dropdown-wrap .ant-btn>.anticon-down{font-size:12px}.ant-dropdown-wrap .anticon-down:before{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;-o-transition:transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.ant-dropdown-wrap-open .anticon-down:before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.ant-dropdown-hidden,.ant-dropdown-menu-hidden{display:none}.ant-dropdown-menu{position:relative;margin:0;padding:4px 0;text-align:left;list-style-type:none;background-color:#fff;background-clip:padding-box;border-radius:4px;outline:none;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);-webkit-transform:translateZ(0)}.ant-dropdown-menu-item-group-title{padding:5px 12px;color:rgba(0,0,0,.45);-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-dropdown-menu-submenu-popup{position:absolute;z-index:1050}.ant-dropdown-menu-submenu-popup>.ant-dropdown-menu{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.ant-dropdown-menu-submenu-popup li,.ant-dropdown-menu-submenu-popup ul{list-style:none}.ant-dropdown-menu-submenu-popup ul{margin-right:.3em;margin-left:.3em;padding:0}.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title{clear:both;margin:0;padding:5px 12px;color:rgba(0,0,0,.65);font-weight:400;font-size:14px;line-height:22px;white-space:nowrap;cursor:pointer;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-dropdown-menu-item>.anticon:first-child,.ant-dropdown-menu-item>span>.anticon:first-child,.ant-dropdown-menu-submenu-title>.anticon:first-child,.ant-dropdown-menu-submenu-title>span>.anticon:first-child{min-width:12px;margin-right:8px;font-size:12px}.ant-dropdown-menu-item>a,.ant-dropdown-menu-submenu-title>a{display:block;margin:-5px -12px;padding:5px 12px;color:rgba(0,0,0,.65);-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-dropdown-menu-item-selected,.ant-dropdown-menu-item-selected>a,.ant-dropdown-menu-submenu-title-selected,.ant-dropdown-menu-submenu-title-selected>a{color:#1890ff;background-color:#e6f7ff}.ant-dropdown-menu-item:hover,.ant-dropdown-menu-submenu-title:hover{background-color:#e6f7ff}.ant-dropdown-menu-item-disabled,.ant-dropdown-menu-submenu-title-disabled{color:rgba(0,0,0,.25);cursor:not-allowed}.ant-dropdown-menu-item-disabled:hover,.ant-dropdown-menu-submenu-title-disabled:hover{color:rgba(0,0,0,.25);background-color:#fff;cursor:not-allowed}.ant-dropdown-menu-item-divider,.ant-dropdown-menu-submenu-title-divider{height:1px;margin:4px 0;overflow:hidden;line-height:0;background-color:#e8e8e8}.ant-dropdown-menu-item .ant-dropdown-menu-submenu-arrow,.ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow{position:absolute;right:8px}.ant-dropdown-menu-item .ant-dropdown-menu-submenu-arrow-icon,.ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow-icon{color:rgba(0,0,0,.45);font-style:normal;display:inline-block;font-size:12px;font-size:10px\\9;-webkit-transform:scale(.83333333) rotate(0deg);-ms-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg)}:root .ant-dropdown-menu-item .ant-dropdown-menu-submenu-arrow-icon,:root .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow-icon{font-size:12px}.ant-
|
|
|
|
|
|
|
|
|
|
// exports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1038:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Dropdown__ = __webpack_require__(1039);
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Dropdown__["a" /* default */]);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1039:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom__ = __webpack_require__(4);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rc_trigger__ = __webpack_require__(88);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(3);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__placements__ = __webpack_require__(1040);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_lifecycles_compat__ = __webpack_require__(7);
|
|
|
|
|
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
|
|
|
|
|
|
|
|
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
|
|
|
|
|
|
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Dropdown = function (_Component) {
|
|
|
|
|
_inherits(Dropdown, _Component);
|
|
|
|
|
|
|
|
|
|
function Dropdown(props) {
|
|
|
|
|
_classCallCheck(this, Dropdown);
|
|
|
|
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
|
|
|
|
|
|
|
|
|
|
_initialiseProps.call(_this);
|
|
|
|
|
|
|
|
|
|
if ('visible' in props) {
|
|
|
|
|
_this.state = {
|
|
|
|
|
visible: props.visible
|
|
|
|
|
};
|
|
|
|
|
} else {
|
|
|
|
|
_this.state = {
|
|
|
|
|
visible: props.defaultVisible
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Dropdown.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {
|
|
|
|
|
if ('visible' in nextProps) {
|
|
|
|
|
return {
|
|
|
|
|
visible: nextProps.visible
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Dropdown.prototype.getOverlayElement = function getOverlayElement() {
|
|
|
|
|
var overlay = this.props.overlay;
|
|
|
|
|
|
|
|
|
|
var overlayElement = void 0;
|
|
|
|
|
if (typeof overlay === 'function') {
|
|
|
|
|
overlayElement = overlay();
|
|
|
|
|
} else {
|
|
|
|
|
overlayElement = overlay;
|
|
|
|
|
}
|
|
|
|
|
return overlayElement;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Dropdown.prototype.getMenuElementOrLambda = function getMenuElementOrLambda() {
|
|
|
|
|
var overlay = this.props.overlay;
|
|
|
|
|
|
|
|
|
|
if (typeof overlay === 'function') {
|
|
|
|
|
return this.getMenuElement;
|
|
|
|
|
}
|
|
|
|
|
return this.getMenuElement();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Dropdown.prototype.getPopupDomNode = function getPopupDomNode() {
|
|
|
|
|
return this.trigger.getPopupDomNode();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Dropdown.prototype.getOpenClassName = function getOpenClassName() {
|
|
|
|
|
var _props = this.props,
|
|
|
|
|
openClassName = _props.openClassName,
|
|
|
|
|
prefixCls = _props.prefixCls;
|
|
|
|
|
|
|
|
|
|
if (openClassName !== undefined) {
|
|
|
|
|
return openClassName;
|
|
|
|
|
}
|
|
|
|
|
return prefixCls + '-open';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Dropdown.prototype.renderChildren = function renderChildren() {
|
|
|
|
|
var children = this.props.children;
|
|
|
|
|
var visible = this.state.visible;
|
|
|
|
|
|
|
|
|
|
var childrenProps = children.props ? children.props : {};
|
|
|
|
|
var childClassName = __WEBPACK_IMPORTED_MODULE_4_classnames___default()(childrenProps.className, this.getOpenClassName());
|
|
|
|
|
return visible && children ? Object(__WEBPACK_IMPORTED_MODULE_0_react__["cloneElement"])(children, { className: childClassName }) : children;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Dropdown.prototype.render = function render() {
|
|
|
|
|
var _props2 = this.props,
|
|
|
|
|
prefixCls = _props2.prefixCls,
|
|
|
|
|
transitionName = _props2.transitionName,
|
|
|
|
|
animation = _props2.animation,
|
|
|
|
|
align = _props2.align,
|
|
|
|
|
placement = _props2.placement,
|
|
|
|
|
getPopupContainer = _props2.getPopupContainer,
|
|
|
|
|
showAction = _props2.showAction,
|
|
|
|
|
hideAction = _props2.hideAction,
|
|
|
|
|
overlayClassName = _props2.overlayClassName,
|
|
|
|
|
overlayStyle = _props2.overlayStyle,
|
|
|
|
|
trigger = _props2.trigger,
|
|
|
|
|
otherProps = _objectWithoutProperties(_props2, ['prefixCls', 'transitionName', 'animation', 'align', 'placement', 'getPopupContainer', 'showAction', 'hideAction', 'overlayClassName', 'overlayStyle', 'trigger']);
|
|
|
|
|
|
|
|
|
|
var triggerHideAction = hideAction;
|
|
|
|
|
if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {
|
|
|
|
|
triggerHideAction = ['click'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_3_rc_trigger__["default"],
|
|
|
|
|
_extends({}, otherProps, {
|
|
|
|
|
prefixCls: prefixCls,
|
|
|
|
|
ref: this.saveTrigger,
|
|
|
|
|
popupClassName: overlayClassName,
|
|
|
|
|
popupStyle: overlayStyle,
|
|
|
|
|
builtinPlacements: __WEBPACK_IMPORTED_MODULE_5__placements__["a" /* default */],
|
|
|
|
|
action: trigger,
|
|
|
|
|
showAction: showAction,
|
|
|
|
|
hideAction: triggerHideAction || [],
|
|
|
|
|
popupPlacement: placement,
|
|
|
|
|
popupAlign: align,
|
|
|
|
|
popupTransitionName: transitionName,
|
|
|
|
|
popupAnimation: animation,
|
|
|
|
|
popupVisible: this.state.visible,
|
|
|
|
|
afterPopupVisibleChange: this.afterVisibleChange,
|
|
|
|
|
popup: this.getMenuElementOrLambda(),
|
|
|
|
|
onPopupVisibleChange: this.onVisibleChange,
|
|
|
|
|
getPopupContainer: getPopupContainer
|
|
|
|
|
}),
|
|
|
|
|
this.renderChildren()
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return Dropdown;
|
|
|
|
|
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
|
|
|
|
|
|
|
|
|
Dropdown.propTypes = {
|
|
|
|
|
minOverlayWidthMatchTrigger: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
|
|
|
|
|
onVisibleChange: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
|
|
|
|
|
onOverlayClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
|
|
|
|
|
prefixCls: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
|
|
|
|
|
children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.any,
|
|
|
|
|
transitionName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
|
|
|
|
|
overlayClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
|
|
|
|
|
openClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
|
|
|
|
|
animation: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.any,
|
|
|
|
|
align: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
|
|
|
|
|
overlayStyle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
|
|
|
|
|
placement: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
|
|
|
|
|
overlay: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]),
|
|
|
|
|
trigger: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array,
|
|
|
|
|
alignPoint: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
|
|
|
|
|
showAction: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array,
|
|
|
|
|
hideAction: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array,
|
|
|
|
|
getPopupContainer: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
|
|
|
|
|
visible: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
|
|
|
|
|
defaultVisible: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool
|
|
|
|
|
};
|
|
|
|
|
Dropdown.defaultProps = {
|
|
|
|
|
prefixCls: 'rc-dropdown',
|
|
|
|
|
trigger: ['hover'],
|
|
|
|
|
showAction: [],
|
|
|
|
|
overlayClassName: '',
|
|
|
|
|
overlayStyle: {},
|
|
|
|
|
defaultVisible: false,
|
|
|
|
|
onVisibleChange: function onVisibleChange() {},
|
|
|
|
|
|
|
|
|
|
placement: 'bottomLeft'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var _initialiseProps = function _initialiseProps() {
|
|
|
|
|
var _this2 = this;
|
|
|
|
|
|
|
|
|
|
this.onClick = function (e) {
|
|
|
|
|
var props = _this2.props;
|
|
|
|
|
var overlayProps = _this2.getOverlayElement().props;
|
|
|
|
|
// do no call onVisibleChange, if you need click to hide, use onClick and control visible
|
|
|
|
|
if (!('visible' in props)) {
|
|
|
|
|
_this2.setState({
|
|
|
|
|
visible: false
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (props.onOverlayClick) {
|
|
|
|
|
props.onOverlayClick(e);
|
|
|
|
|
}
|
|
|
|
|
if (overlayProps.onClick) {
|
|
|
|
|
overlayProps.onClick(e);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.onVisibleChange = function (visible) {
|
|
|
|
|
var props = _this2.props;
|
|
|
|
|
if (!('visible' in props)) {
|
|
|
|
|
_this2.setState({
|
|
|
|
|
visible: visible
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
props.onVisibleChange(visible);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.getMinOverlayWidthMatchTrigger = function () {
|
|
|
|
|
var _props3 = _this2.props,
|
|
|
|
|
minOverlayWidthMatchTrigger = _props3.minOverlayWidthMatchTrigger,
|
|
|
|
|
alignPoint = _props3.alignPoint;
|
|
|
|
|
|
|
|
|
|
if ('minOverlayWidthMatchTrigger' in _this2.props) {
|
|
|
|
|
return minOverlayWidthMatchTrigger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return !alignPoint;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.getMenuElement = function () {
|
|
|
|
|
var prefixCls = _this2.props.prefixCls;
|
|
|
|
|
|
|
|
|
|
var overlayElement = _this2.getOverlayElement();
|
|
|
|
|
var extraOverlayProps = {
|
|
|
|
|
prefixCls: prefixCls + '-menu',
|
|
|
|
|
onClick: _this2.onClick
|
|
|
|
|
};
|
|
|
|
|
if (typeof overlayElement.type === 'string') {
|
|
|
|
|
delete extraOverlayProps.prefixCls;
|
|
|
|
|
}
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(overlayElement, extraOverlayProps);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.afterVisibleChange = function (visible) {
|
|
|
|
|
if (visible && _this2.getMinOverlayWidthMatchTrigger()) {
|
|
|
|
|
var overlayNode = _this2.getPopupDomNode();
|
|
|
|
|
var rootNode = __WEBPACK_IMPORTED_MODULE_2_react_dom___default.a.findDOMNode(_this2);
|
|
|
|
|
if (rootNode && overlayNode && rootNode.offsetWidth > overlayNode.offsetWidth) {
|
|
|
|
|
overlayNode.style.minWidth = rootNode.offsetWidth + 'px';
|
|
|
|
|
if (_this2.trigger && _this2.trigger._component && _this2.trigger._component.alignInstance) {
|
|
|
|
|
_this2.trigger._component.alignInstance.forceAlign();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.saveTrigger = function (node) {
|
|
|
|
|
_this2.trigger = node;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Object(__WEBPACK_IMPORTED_MODULE_6_react_lifecycles_compat__["polyfill"])(Dropdown);
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ __webpack_exports__["a"] = (Dropdown);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1040:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* unused harmony export placements */
|
|
|
|
|
var autoAdjustOverflow = {
|
|
|
|
|
adjustX: 1,
|
|
|
|
|
adjustY: 1
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var targetOffset = [0, 0];
|
|
|
|
|
|
|
|
|
|
var placements = {
|
|
|
|
|
topLeft: {
|
|
|
|
|
points: ['bl', 'tl'],
|
|
|
|
|
overflow: autoAdjustOverflow,
|
|
|
|
|
offset: [0, -4],
|
|
|
|
|
targetOffset: targetOffset
|
|
|
|
|
},
|
|
|
|
|
topCenter: {
|
|
|
|
|
points: ['bc', 'tc'],
|
|
|
|
|
overflow: autoAdjustOverflow,
|
|
|
|
|
offset: [0, -4],
|
|
|
|
|
targetOffset: targetOffset
|
|
|
|
|
},
|
|
|
|
|
topRight: {
|
|
|
|
|
points: ['br', 'tr'],
|
|
|
|
|
overflow: autoAdjustOverflow,
|
|
|
|
|
offset: [0, -4],
|
|
|
|
|
targetOffset: targetOffset
|
|
|
|
|
},
|
|
|
|
|
bottomLeft: {
|
|
|
|
|
points: ['tl', 'bl'],
|
|
|
|
|
overflow: autoAdjustOverflow,
|
|
|
|
|
offset: [0, 4],
|
|
|
|
|
targetOffset: targetOffset
|
|
|
|
|
},
|
|
|
|
|
bottomCenter: {
|
|
|
|
|
points: ['tc', 'bc'],
|
|
|
|
|
overflow: autoAdjustOverflow,
|
|
|
|
|
offset: [0, 4],
|
|
|
|
|
targetOffset: targetOffset
|
|
|
|
|
},
|
|
|
|
|
bottomRight: {
|
|
|
|
|
points: ['tr', 'br'],
|
|
|
|
|
overflow: autoAdjustOverflow,
|
|
|
|
|
offset: [0, 4],
|
|
|
|
|
targetOffset: targetOffset
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ __webpack_exports__["a"] = (placements);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1042:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
|
|
|
|
|
|
|
|
|
var _button = _interopRequireDefault(__webpack_require__(73));
|
|
|
|
|
|
|
|
|
|
var _configProvider = __webpack_require__(9);
|
|
|
|
|
|
|
|
|
|
var _dropdown = _interopRequireDefault(__webpack_require__(865));
|
|
|
|
|
|
|
|
|
|
var _icon = _interopRequireDefault(__webpack_require__(25));
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
|
|
|
|
|
for (var p in s) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
|
|
}
|
|
|
|
|
return t;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var ButtonGroup = _button["default"].Group;
|
|
|
|
|
|
|
|
|
|
var DropdownButton =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(DropdownButton, _React$Component);
|
|
|
|
|
|
|
|
|
|
function DropdownButton() {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, DropdownButton);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(DropdownButton).apply(this, arguments));
|
|
|
|
|
|
|
|
|
|
_this.renderButton = function (_ref) {
|
|
|
|
|
var getContextPopupContainer = _ref.getPopupContainer,
|
|
|
|
|
getPrefixCls = _ref.getPrefixCls;
|
|
|
|
|
|
|
|
|
|
var _a = _this.props,
|
|
|
|
|
customizePrefixCls = _a.prefixCls,
|
|
|
|
|
type = _a.type,
|
|
|
|
|
disabled = _a.disabled,
|
|
|
|
|
onClick = _a.onClick,
|
|
|
|
|
htmlType = _a.htmlType,
|
|
|
|
|
children = _a.children,
|
|
|
|
|
className = _a.className,
|
|
|
|
|
overlay = _a.overlay,
|
|
|
|
|
trigger = _a.trigger,
|
|
|
|
|
align = _a.align,
|
|
|
|
|
visible = _a.visible,
|
|
|
|
|
onVisibleChange = _a.onVisibleChange,
|
|
|
|
|
placement = _a.placement,
|
|
|
|
|
getPopupContainer = _a.getPopupContainer,
|
|
|
|
|
href = _a.href,
|
|
|
|
|
_a$icon = _a.icon,
|
|
|
|
|
icon = _a$icon === void 0 ? React.createElement(_icon["default"], {
|
|
|
|
|
type: "ellipsis"
|
|
|
|
|
}) : _a$icon,
|
|
|
|
|
title = _a.title,
|
|
|
|
|
restProps = __rest(_a, ["prefixCls", "type", "disabled", "onClick", "htmlType", "children", "className", "overlay", "trigger", "align", "visible", "onVisibleChange", "placement", "getPopupContainer", "href", "icon", "title"]);
|
|
|
|
|
|
|
|
|
|
var prefixCls = getPrefixCls('dropdown-button', customizePrefixCls);
|
|
|
|
|
var dropdownProps = {
|
|
|
|
|
align: align,
|
|
|
|
|
overlay: overlay,
|
|
|
|
|
disabled: disabled,
|
|
|
|
|
trigger: disabled ? [] : trigger,
|
|
|
|
|
onVisibleChange: onVisibleChange,
|
|
|
|
|
placement: placement,
|
|
|
|
|
getPopupContainer: getPopupContainer || getContextPopupContainer
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if ('visible' in _this.props) {
|
|
|
|
|
dropdownProps.visible = visible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return React.createElement(ButtonGroup, _extends({}, restProps, {
|
|
|
|
|
className: (0, _classnames["default"])(prefixCls, className)
|
|
|
|
|
}), React.createElement(_button["default"], {
|
|
|
|
|
type: type,
|
|
|
|
|
disabled: disabled,
|
|
|
|
|
onClick: onClick,
|
|
|
|
|
htmlType: htmlType,
|
|
|
|
|
href: href,
|
|
|
|
|
title: title
|
|
|
|
|
}, children), React.createElement(_dropdown["default"], dropdownProps, React.createElement(_button["default"], {
|
|
|
|
|
type: type
|
|
|
|
|
}, icon)));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(DropdownButton, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_configProvider.ConfigConsumer, null, this.renderButton);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return DropdownButton;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = DropdownButton;
|
|
|
|
|
DropdownButton.defaultProps = {
|
|
|
|
|
placement: 'bottomRight',
|
|
|
|
|
type: 'default'
|
|
|
|
|
};
|
|
|
|
|
//# sourceMappingURL=dropdown-button.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1060:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
|
|
|
|
|
|
|
|
// load the styles
|
|
|
|
|
var content = __webpack_require__(1061);
|
|
|
|
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
|
|
|
// Prepare cssTransformation
|
|
|
|
|
var transform;
|
|
|
|
|
|
|
|
|
|
var options = {"hmr":false}
|
|
|
|
|
options.transform = transform
|
|
|
|
|
// add the styles to the DOM
|
|
|
|
|
var update = __webpack_require__(291)(content, options);
|
|
|
|
|
if(content.locals) module.exports = content.locals;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1061:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
exports = module.exports = __webpack_require__(290)(true);
|
|
|
|
|
// imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// module
|
|
|
|
|
exports.push([module.i, ".ant-menu{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;font-size:14px;font-variant:tabular-nums;line-height:1.5;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";margin-bottom:0;padding-left:0;color:rgba(0,0,0,.65);line-height:0;list-style:none;background:#fff;outline:none;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);-webkit-transition:background .3s,width .2s;-o-transition:background .3s,width .2s;transition:background .3s,width .2s;zoom:1}.ant-menu:after,.ant-menu:before{display:table;content:\"\"}.ant-menu:after{clear:both}.ant-menu ol,.ant-menu ul{margin:0;padding:0;list-style:none}.ant-menu-hidden{display:none}.ant-menu-item-group-title{padding:8px 16px;color:rgba(0,0,0,.45);font-size:14px;line-height:1.5;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-menu-submenu,.ant-menu-submenu-inline{-webkit-transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1);-o-transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1);transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-selected{color:#1890ff}.ant-menu-item:active,.ant-menu-submenu-title:active{background:#e6f7ff}.ant-menu-submenu .ant-menu-sub{cursor:auto;-webkit-transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1);-o-transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1);transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-item>a{display:block;color:rgba(0,0,0,.65)}.ant-menu-item>a:hover{color:#1890ff}.ant-menu-item>a:before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:\"\"}.ant-menu-item>.ant-badge>a{color:rgba(0,0,0,.65)}.ant-menu-item>.ant-badge>a:hover{color:#1890ff}.ant-menu-item-divider{height:1px;overflow:hidden;line-height:0;background-color:#e8e8e8}.ant-menu-item-active,.ant-menu-item:hover,.ant-menu-submenu-active,.ant-menu-submenu-title:hover,.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open{color:#1890ff}.ant-menu-horizontal .ant-menu-item,.ant-menu-horizontal .ant-menu-submenu{margin-top:-1px}.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-submenu .ant-menu-submenu-title:hover{background-color:transparent}.ant-menu-item-selected,.ant-menu-item-selected>a,.ant-menu-item-selected>a:hover{color:#1890ff}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#e6f7ff}.ant-menu-inline,.ant-menu-vertical,.ant-menu-vertical-left{border-right:1px solid #e8e8e8}.ant-menu-vertical-right{border-left:1px solid #e8e8e8}.ant-menu-vertical-left.ant-menu-sub,.ant-menu-vertical-right.ant-menu-sub,.ant-menu-vertical.ant-menu-sub{min-width:160px;padding:0;border-right:0;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.ant-menu-vertical-left.ant-menu-sub .ant-menu-item,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item,.ant-menu-vertical.ant-menu-sub .ant-menu-item{left:0;margin-left:0;border-right:0}.ant-menu-vertical-left.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical.ant-menu-sub .ant-menu-item:after{border-right:0}.ant-menu-vertical-left.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-left.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical.ant-menu-sub>.ant-menu-item,.ant-menu-vertical.ant-menu-sub>.ant-menu-submenu{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.ant-menu-horizontal.ant-menu-sub{min-width:114px}.ant-menu-item,.ant-menu-submenu-titl
|
|
|
|
|
|
|
|
|
|
// exports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1140:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
module.exports = __webpack_require__(1351)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1201:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
|
|
|
|
|
|
|
|
|
|
var _omit = _interopRequireDefault(__webpack_require__(43));
|
|
|
|
|
|
|
|
|
|
var _dropdown = _interopRequireDefault(__webpack_require__(865));
|
|
|
|
|
|
|
|
|
|
var _icon = _interopRequireDefault(__webpack_require__(25));
|
|
|
|
|
|
|
|
|
|
var _configProvider = __webpack_require__(9);
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
|
|
|
|
|
for (var p in s) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
|
|
}
|
|
|
|
|
return t;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var BreadcrumbItem =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(BreadcrumbItem, _React$Component);
|
|
|
|
|
|
|
|
|
|
function BreadcrumbItem() {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, BreadcrumbItem);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(BreadcrumbItem).apply(this, arguments));
|
|
|
|
|
|
|
|
|
|
_this.renderBreadcrumbItem = function (_ref) {
|
|
|
|
|
var getPrefixCls = _ref.getPrefixCls;
|
|
|
|
|
|
|
|
|
|
var _a = _this.props,
|
|
|
|
|
customizePrefixCls = _a.prefixCls,
|
|
|
|
|
separator = _a.separator,
|
|
|
|
|
children = _a.children,
|
|
|
|
|
restProps = __rest(_a, ["prefixCls", "separator", "children"]);
|
|
|
|
|
|
|
|
|
|
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
|
|
|
var link;
|
|
|
|
|
|
|
|
|
|
if ('href' in _this.props) {
|
|
|
|
|
link = React.createElement("a", _extends({
|
|
|
|
|
className: "".concat(prefixCls, "-link")
|
|
|
|
|
}, (0, _omit["default"])(restProps, ['overlay'])), children);
|
|
|
|
|
} else {
|
|
|
|
|
link = React.createElement("span", _extends({
|
|
|
|
|
className: "".concat(prefixCls, "-link")
|
|
|
|
|
}, (0, _omit["default"])(restProps, ['overlay'])), children);
|
|
|
|
|
} // wrap to dropDown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
link = _this.renderBreadcrumbNode(link, prefixCls);
|
|
|
|
|
|
|
|
|
|
if (children) {
|
|
|
|
|
return React.createElement("span", null, link, separator && separator !== '' && React.createElement("span", {
|
|
|
|
|
className: "".concat(prefixCls, "-separator")
|
|
|
|
|
}, separator));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
};
|
|
|
|
|
/**
|
|
|
|
|
* if overlay is have
|
|
|
|
|
* Wrap a DropDown
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_this.renderBreadcrumbNode = function (breadcrumbItem, prefixCls) {
|
|
|
|
|
var overlay = _this.props.overlay;
|
|
|
|
|
|
|
|
|
|
if (overlay) {
|
|
|
|
|
return React.createElement(_dropdown["default"], {
|
|
|
|
|
overlay: overlay,
|
|
|
|
|
placement: "bottomCenter"
|
|
|
|
|
}, React.createElement("span", {
|
|
|
|
|
className: "".concat(prefixCls, "-overlay-link")
|
|
|
|
|
}, breadcrumbItem, React.createElement(_icon["default"], {
|
|
|
|
|
type: "down"
|
|
|
|
|
})));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return breadcrumbItem;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(BreadcrumbItem, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_configProvider.ConfigConsumer, null, this.renderBreadcrumbItem);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return BreadcrumbItem;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = BreadcrumbItem;
|
|
|
|
|
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
|
|
|
|
|
BreadcrumbItem.defaultProps = {
|
|
|
|
|
separator: '/'
|
|
|
|
|
};
|
|
|
|
|
BreadcrumbItem.propTypes = {
|
|
|
|
|
prefixCls: PropTypes.string,
|
|
|
|
|
separator: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
|
|
|
href: PropTypes.string
|
|
|
|
|
};
|
|
|
|
|
//# sourceMappingURL=BreadcrumbItem.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1294:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__webpack_require__(27);
|
|
|
|
|
|
|
|
|
|
__webpack_require__(1309);
|
|
|
|
|
|
|
|
|
|
__webpack_require__(930);
|
|
|
|
|
|
|
|
|
|
__webpack_require__(924);
|
|
|
|
|
//# sourceMappingURL=css.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1295:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var _Breadcrumb = _interopRequireDefault(__webpack_require__(1311));
|
|
|
|
|
|
|
|
|
|
var _BreadcrumbItem = _interopRequireDefault(__webpack_require__(1201));
|
|
|
|
|
|
|
|
|
|
var _BreadcrumbSeparator = _interopRequireDefault(__webpack_require__(1312));
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
_Breadcrumb["default"].Item = _BreadcrumbItem["default"];
|
|
|
|
|
_Breadcrumb["default"].Separator = _BreadcrumbSeparator["default"];
|
|
|
|
|
var _default = _Breadcrumb["default"];
|
|
|
|
|
exports["default"] = _default;
|
|
|
|
|
//# sourceMappingURL=index.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1309:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
|
|
|
|
|
|
|
|
// load the styles
|
|
|
|
|
var content = __webpack_require__(1310);
|
|
|
|
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
|
|
|
// Prepare cssTransformation
|
|
|
|
|
var transform;
|
|
|
|
|
|
|
|
|
|
var options = {"hmr":false}
|
|
|
|
|
options.transform = transform
|
|
|
|
|
// add the styles to the DOM
|
|
|
|
|
var update = __webpack_require__(291)(content, options);
|
|
|
|
|
if(content.locals) module.exports = content.locals;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1310:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
exports = module.exports = __webpack_require__(290)(true);
|
|
|
|
|
// imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// module
|
|
|
|
|
exports.push([module.i, ".ant-breadcrumb{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";color:rgba(0,0,0,.45);font-size:14px}.ant-breadcrumb .anticon{font-size:14px}.ant-breadcrumb a{color:rgba(0,0,0,.45);-webkit-transition:color .3s;-o-transition:color .3s;transition:color .3s}.ant-breadcrumb a:hover{color:#40a9ff}.ant-breadcrumb>span:last-child,.ant-breadcrumb>span:last-child a{color:rgba(0,0,0,.65)}.ant-breadcrumb>span:last-child .ant-breadcrumb-separator{display:none}.ant-breadcrumb-separator{margin:0 8px;color:rgba(0,0,0,.45)}.ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-overlay-link>.anticon{margin-left:4px}", "", {"version":3,"sources":["/Users/alec/educoder/public/react/node_modules/_antd@3.26.4@antd/lib/breadcrumb/style/index.css"],"names":[],"mappings":"AAIA,gBACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,6BAA8B,AACtC,sBAA2B,AAC3B,cAAgB,CACjB,AACD,yBACE,cAAgB,CACjB,AACD,kBACE,sBAA2B,AAC3B,6BAA+B,AAC/B,wBAA0B,AAC1B,oBAAuB,CACxB,AACD,wBACE,aAAe,CAChB,AAID,kEACE,qBAA2B,CAC5B,AACD,0DACE,YAAc,CACf,AACD,0BACE,aAAc,AACd,qBAA2B,CAC5B,AAID,yEACE,eAAiB,CAClB","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-breadcrumb {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n -webkit-font-feature-settings: 'tnum';\n font-feature-settings: 'tnum';\n color: rgba(0, 0, 0, 0.45);\n font-size: 14px;\n}\n.ant-breadcrumb .anticon {\n font-size: 14px;\n}\n.ant-breadcrumb a {\n color: rgba(0, 0, 0, 0.45);\n -webkit-transition: color 0.3s;\n -o-transition: color 0.3s;\n transition: color 0.3s;\n}\n.ant-breadcrumb a:hover {\n color: #40a9ff;\n}\n.ant-breadcrumb > span:last-child {\n color: rgba(0, 0, 0, 0.65);\n}\n.ant-breadcrumb > span:last-child a {\n color: rgba(0, 0, 0, 0.65);\n}\n.ant-breadcrumb > span:last-child .ant-breadcrumb-separator {\n display: none;\n}\n.ant-breadcrumb-separator {\n margin: 0 8px;\n color: rgba(0, 0, 0, 0.45);\n}\n.ant-breadcrumb-link > .anticon + span {\n margin-left: 4px;\n}\n.ant-breadcrumb-overlay-link > .anticon {\n margin-left: 4px;\n}\n"],"sourceRoot":""}]);
|
|
|
|
|
|
|
|
|
|
// exports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1311:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
|
|
|
|
|
|
|
|
|
|
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
|
|
|
|
|
|
|
|
|
var _toArray = _interopRequireDefault(__webpack_require__(314));
|
|
|
|
|
|
|
|
|
|
var _omit = _interopRequireDefault(__webpack_require__(43));
|
|
|
|
|
|
|
|
|
|
var _BreadcrumbItem = _interopRequireDefault(__webpack_require__(1201));
|
|
|
|
|
|
|
|
|
|
var _menu = _interopRequireDefault(__webpack_require__(862));
|
|
|
|
|
|
|
|
|
|
var _configProvider = __webpack_require__(9);
|
|
|
|
|
|
|
|
|
|
var _warning = _interopRequireDefault(__webpack_require__(40));
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
|
|
|
|
|
|
|
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
|
|
|
|
|
|
|
|
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
|
|
|
|
|
|
|
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
|
|
|
|
|
for (var p in s) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
|
|
}
|
|
|
|
|
return t;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function getBreadcrumbName(route, params) {
|
|
|
|
|
if (!route.breadcrumbName) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var paramsKeys = Object.keys(params).join('|');
|
|
|
|
|
var name = route.breadcrumbName.replace(new RegExp(":(".concat(paramsKeys, ")"), 'g'), function (replacement, key) {
|
|
|
|
|
return params[key] || replacement;
|
|
|
|
|
});
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function defaultItemRender(route, params, routes, paths) {
|
|
|
|
|
var isLastItem = routes.indexOf(route) === routes.length - 1;
|
|
|
|
|
var name = getBreadcrumbName(route, params);
|
|
|
|
|
return isLastItem ? React.createElement("span", null, name) : React.createElement("a", {
|
|
|
|
|
href: "#/".concat(paths.join('/'))
|
|
|
|
|
}, name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function filterFragment(children) {
|
|
|
|
|
return (0, _toArray["default"])(children).map(function (element) {
|
|
|
|
|
if (React.isValidElement(element) && element.type === React.Fragment) {
|
|
|
|
|
var props = element.props;
|
|
|
|
|
return props.children;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return element;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var Breadcrumb =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(Breadcrumb, _React$Component);
|
|
|
|
|
|
|
|
|
|
function Breadcrumb() {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, Breadcrumb);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(Breadcrumb).apply(this, arguments));
|
|
|
|
|
|
|
|
|
|
_this.getPath = function (path, params) {
|
|
|
|
|
path = (path || '').replace(/^\//, '');
|
|
|
|
|
Object.keys(params).forEach(function (key) {
|
|
|
|
|
path = path.replace(":".concat(key), params[key]);
|
|
|
|
|
});
|
|
|
|
|
return path;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.addChildPath = function (paths) {
|
|
|
|
|
var childPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
|
|
|
var params = arguments.length > 2 ? arguments[2] : undefined;
|
|
|
|
|
|
|
|
|
|
var originalPaths = _toConsumableArray(paths);
|
|
|
|
|
|
|
|
|
|
var path = _this.getPath(childPath, params);
|
|
|
|
|
|
|
|
|
|
if (path) {
|
|
|
|
|
originalPaths.push(path);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return originalPaths;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.genForRoutes = function (_ref) {
|
|
|
|
|
var _ref$routes = _ref.routes,
|
|
|
|
|
routes = _ref$routes === void 0 ? [] : _ref$routes,
|
|
|
|
|
_ref$params = _ref.params,
|
|
|
|
|
params = _ref$params === void 0 ? {} : _ref$params,
|
|
|
|
|
separator = _ref.separator,
|
|
|
|
|
_ref$itemRender = _ref.itemRender,
|
|
|
|
|
itemRender = _ref$itemRender === void 0 ? defaultItemRender : _ref$itemRender;
|
|
|
|
|
var paths = [];
|
|
|
|
|
return routes.map(function (route) {
|
|
|
|
|
var path = _this.getPath(route.path, params);
|
|
|
|
|
|
|
|
|
|
if (path) {
|
|
|
|
|
paths.push(path);
|
|
|
|
|
} // generated overlay by route.children
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var overlay = null;
|
|
|
|
|
|
|
|
|
|
if (route.children && route.children.length) {
|
|
|
|
|
overlay = React.createElement(_menu["default"], null, route.children.map(function (child) {
|
|
|
|
|
return React.createElement(_menu["default"].Item, {
|
|
|
|
|
key: child.breadcrumbName || child.path
|
|
|
|
|
}, itemRender(child, params, routes, _this.addChildPath(paths, child.path, params)));
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return React.createElement(_BreadcrumbItem["default"], {
|
|
|
|
|
overlay: overlay,
|
|
|
|
|
separator: separator,
|
|
|
|
|
key: route.breadcrumbName || path
|
|
|
|
|
}, itemRender(route, params, routes, paths));
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.renderBreadcrumb = function (_ref2) {
|
|
|
|
|
var getPrefixCls = _ref2.getPrefixCls;
|
|
|
|
|
var crumbs;
|
|
|
|
|
|
|
|
|
|
var _a = _this.props,
|
|
|
|
|
customizePrefixCls = _a.prefixCls,
|
|
|
|
|
separator = _a.separator,
|
|
|
|
|
style = _a.style,
|
|
|
|
|
className = _a.className,
|
|
|
|
|
routes = _a.routes,
|
|
|
|
|
children = _a.children,
|
|
|
|
|
restProps = __rest(_a, ["prefixCls", "separator", "style", "className", "routes", "children"]);
|
|
|
|
|
|
|
|
|
|
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
|
|
|
|
|
|
|
|
if (routes && routes.length > 0) {
|
|
|
|
|
// generated by route
|
|
|
|
|
crumbs = _this.genForRoutes(_this.props);
|
|
|
|
|
} else if (children) {
|
|
|
|
|
crumbs = React.Children.map(filterFragment(children), function (element, index) {
|
|
|
|
|
if (!element) {
|
|
|
|
|
return element;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
(0, _warning["default"])(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'Breadcrumb', "Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children");
|
|
|
|
|
return React.cloneElement(element, {
|
|
|
|
|
separator: separator,
|
|
|
|
|
key: index
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return React.createElement("div", _extends({
|
|
|
|
|
className: (0, _classnames["default"])(className, prefixCls),
|
|
|
|
|
style: style
|
|
|
|
|
}, (0, _omit["default"])(restProps, ['itemRender', 'params'])), crumbs);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(Breadcrumb, [{
|
|
|
|
|
key: "componentDidMount",
|
|
|
|
|
value: function componentDidMount() {
|
|
|
|
|
var props = this.props;
|
|
|
|
|
(0, _warning["default"])(!('linkRender' in props || 'nameRender' in props), 'Breadcrumb', '`linkRender` and `nameRender` are removed, please use `itemRender` instead, ' + 'see: https://u.ant.design/item-render.');
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_configProvider.ConfigConsumer, null, this.renderBreadcrumb);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return Breadcrumb;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = Breadcrumb;
|
|
|
|
|
Breadcrumb.defaultProps = {
|
|
|
|
|
separator: '/'
|
|
|
|
|
};
|
|
|
|
|
Breadcrumb.propTypes = {
|
|
|
|
|
prefixCls: PropTypes.string,
|
|
|
|
|
separator: PropTypes.node,
|
|
|
|
|
routes: PropTypes.array
|
|
|
|
|
};
|
|
|
|
|
//# sourceMappingURL=Breadcrumb.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1312:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var _configProvider = __webpack_require__(9);
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var BreadcrumbSeparator =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(BreadcrumbSeparator, _React$Component);
|
|
|
|
|
|
|
|
|
|
function BreadcrumbSeparator() {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, BreadcrumbSeparator);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(BreadcrumbSeparator).apply(this, arguments));
|
|
|
|
|
|
|
|
|
|
_this.renderSeparator = function (_ref) {
|
|
|
|
|
var getPrefixCls = _ref.getPrefixCls;
|
|
|
|
|
var children = _this.props.children;
|
|
|
|
|
var prefixCls = getPrefixCls('breadcrumb');
|
|
|
|
|
return React.createElement("span", {
|
|
|
|
|
className: "".concat(prefixCls, "-separator")
|
|
|
|
|
}, children || '/');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(BreadcrumbSeparator, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_configProvider.ConfigConsumer, null, this.renderSeparator);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return BreadcrumbSeparator;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = BreadcrumbSeparator;
|
|
|
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
|
|
|
//# sourceMappingURL=BreadcrumbSeparator.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1351:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
|
|
|
|
var _react = __webpack_require__(0);
|
|
|
|
|
|
|
|
|
|
var _react2 = _interopRequireDefault(_react);
|
|
|
|
|
|
|
|
|
|
var _propTypes = __webpack_require__(1);
|
|
|
|
|
|
|
|
|
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
|
|
|
|
|
|
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
|
|
|
|
|
|
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
|
|
|
|
|
|
|
|
var InfiniteScroll = function (_Component) {
|
|
|
|
|
_inherits(InfiniteScroll, _Component);
|
|
|
|
|
|
|
|
|
|
function InfiniteScroll(props) {
|
|
|
|
|
_classCallCheck(this, InfiniteScroll);
|
|
|
|
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props));
|
|
|
|
|
|
|
|
|
|
_this.scrollListener = _this.scrollListener.bind(_this);
|
|
|
|
|
_this.eventListenerOptions = _this.eventListenerOptions.bind(_this);
|
|
|
|
|
_this.mousewheelListener = _this.mousewheelListener.bind(_this);
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(InfiniteScroll, [{
|
|
|
|
|
key: 'componentDidMount',
|
|
|
|
|
value: function componentDidMount() {
|
|
|
|
|
this.pageLoaded = this.props.pageStart;
|
|
|
|
|
this.options = this.eventListenerOptions();
|
|
|
|
|
this.attachScrollListener();
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'componentDidUpdate',
|
|
|
|
|
value: function componentDidUpdate() {
|
|
|
|
|
if (this.props.isReverse && this.loadMore) {
|
|
|
|
|
var parentElement = this.getParentElement(this.scrollComponent);
|
|
|
|
|
parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop;
|
|
|
|
|
this.loadMore = false;
|
|
|
|
|
}
|
|
|
|
|
this.attachScrollListener();
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'componentWillUnmount',
|
|
|
|
|
value: function componentWillUnmount() {
|
|
|
|
|
this.detachScrollListener();
|
|
|
|
|
this.detachMousewheelListener();
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'isPassiveSupported',
|
|
|
|
|
value: function isPassiveSupported() {
|
|
|
|
|
var passive = false;
|
|
|
|
|
|
|
|
|
|
var testOptions = {
|
|
|
|
|
get passive() {
|
|
|
|
|
passive = true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
document.addEventListener('test', null, testOptions);
|
|
|
|
|
document.removeEventListener('test', null, testOptions);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
// ignore
|
|
|
|
|
}
|
|
|
|
|
return passive;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'eventListenerOptions',
|
|
|
|
|
value: function eventListenerOptions() {
|
|
|
|
|
var options = this.props.useCapture;
|
|
|
|
|
|
|
|
|
|
if (this.isPassiveSupported()) {
|
|
|
|
|
options = {
|
|
|
|
|
useCapture: this.props.useCapture,
|
|
|
|
|
passive: true
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return options;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set a defaut loader for all your `InfiniteScroll` components
|
|
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
key: 'setDefaultLoader',
|
|
|
|
|
value: function setDefaultLoader(loader) {
|
|
|
|
|
this.defaultLoader = loader;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'detachMousewheelListener',
|
|
|
|
|
value: function detachMousewheelListener() {
|
|
|
|
|
var scrollEl = window;
|
|
|
|
|
if (this.props.useWindow === false) {
|
|
|
|
|
scrollEl = this.scrollComponent.parentNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'detachScrollListener',
|
|
|
|
|
value: function detachScrollListener() {
|
|
|
|
|
var scrollEl = window;
|
|
|
|
|
if (this.props.useWindow === false) {
|
|
|
|
|
scrollEl = this.getParentElement(this.scrollComponent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
|
|
|
|
scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'getParentElement',
|
|
|
|
|
value: function getParentElement(el) {
|
|
|
|
|
var scrollParent = this.props.getScrollParent && this.props.getScrollParent();
|
|
|
|
|
if (scrollParent != null) {
|
|
|
|
|
return scrollParent;
|
|
|
|
|
}
|
|
|
|
|
return el && el.parentNode;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'filterProps',
|
|
|
|
|
value: function filterProps(props) {
|
|
|
|
|
return props;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'attachScrollListener',
|
|
|
|
|
value: function attachScrollListener() {
|
|
|
|
|
var parentElement = this.getParentElement(this.scrollComponent);
|
|
|
|
|
|
|
|
|
|
if (!this.props.hasMore || !parentElement) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var scrollEl = window;
|
|
|
|
|
if (this.props.useWindow === false) {
|
|
|
|
|
scrollEl = parentElement;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture);
|
|
|
|
|
scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
|
|
|
|
scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture);
|
|
|
|
|
|
|
|
|
|
if (this.props.initialLoad) {
|
|
|
|
|
this.scrollListener();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'mousewheelListener',
|
|
|
|
|
value: function mousewheelListener(e) {
|
|
|
|
|
// Prevents Chrome hangups
|
|
|
|
|
// See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257
|
|
|
|
|
if (e.deltaY === 1 && !this.isPassiveSupported()) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'scrollListener',
|
|
|
|
|
value: function scrollListener() {
|
|
|
|
|
var el = this.scrollComponent;
|
|
|
|
|
var scrollEl = window;
|
|
|
|
|
var parentNode = this.getParentElement(el);
|
|
|
|
|
|
|
|
|
|
var offset = void 0;
|
|
|
|
|
if (this.props.useWindow) {
|
|
|
|
|
var doc = document.documentElement || document.body.parentNode || document.body;
|
|
|
|
|
var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop;
|
|
|
|
|
if (this.props.isReverse) {
|
|
|
|
|
offset = scrollTop;
|
|
|
|
|
} else {
|
|
|
|
|
offset = this.calculateOffset(el, scrollTop);
|
|
|
|
|
}
|
|
|
|
|
} else if (this.props.isReverse) {
|
|
|
|
|
offset = parentNode.scrollTop;
|
|
|
|
|
} else {
|
|
|
|
|
offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Here we make sure the element is visible as well as checking the offset
|
|
|
|
|
if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) {
|
|
|
|
|
this.detachScrollListener();
|
|
|
|
|
this.beforeScrollHeight = parentNode.scrollHeight;
|
|
|
|
|
this.beforeScrollTop = parentNode.scrollTop;
|
|
|
|
|
// Call loadMore after detachScrollListener to allow for non-async loadMore functions
|
|
|
|
|
if (typeof this.props.loadMore === 'function') {
|
|
|
|
|
this.props.loadMore(this.pageLoaded += 1);
|
|
|
|
|
this.loadMore = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'calculateOffset',
|
|
|
|
|
value: function calculateOffset(el, scrollTop) {
|
|
|
|
|
if (!el) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'calculateTopPosition',
|
|
|
|
|
value: function calculateTopPosition(el) {
|
|
|
|
|
if (!el) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
return el.offsetTop + this.calculateTopPosition(el.offsetParent);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'render',
|
|
|
|
|
value: function render() {
|
|
|
|
|
var _this2 = this;
|
|
|
|
|
|
|
|
|
|
var renderProps = this.filterProps(this.props);
|
|
|
|
|
|
|
|
|
|
var children = renderProps.children,
|
|
|
|
|
element = renderProps.element,
|
|
|
|
|
hasMore = renderProps.hasMore,
|
|
|
|
|
initialLoad = renderProps.initialLoad,
|
|
|
|
|
isReverse = renderProps.isReverse,
|
|
|
|
|
loader = renderProps.loader,
|
|
|
|
|
loadMore = renderProps.loadMore,
|
|
|
|
|
pageStart = renderProps.pageStart,
|
|
|
|
|
ref = renderProps.ref,
|
|
|
|
|
threshold = renderProps.threshold,
|
|
|
|
|
useCapture = renderProps.useCapture,
|
|
|
|
|
useWindow = renderProps.useWindow,
|
|
|
|
|
getScrollParent = renderProps.getScrollParent,
|
|
|
|
|
props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']);
|
|
|
|
|
|
|
|
|
|
props.ref = function (node) {
|
|
|
|
|
_this2.scrollComponent = node;
|
|
|
|
|
if (ref) {
|
|
|
|
|
ref(node);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var childrenArray = [children];
|
|
|
|
|
if (hasMore) {
|
|
|
|
|
if (loader) {
|
|
|
|
|
isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader);
|
|
|
|
|
} else if (this.defaultLoader) {
|
|
|
|
|
isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return _react2.default.createElement(element, props, childrenArray);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return InfiniteScroll;
|
|
|
|
|
}(_react.Component);
|
|
|
|
|
|
|
|
|
|
InfiniteScroll.propTypes = {
|
|
|
|
|
children: _propTypes2.default.node.isRequired,
|
|
|
|
|
element: _propTypes2.default.node,
|
|
|
|
|
hasMore: _propTypes2.default.bool,
|
|
|
|
|
initialLoad: _propTypes2.default.bool,
|
|
|
|
|
isReverse: _propTypes2.default.bool,
|
|
|
|
|
loader: _propTypes2.default.node,
|
|
|
|
|
loadMore: _propTypes2.default.func.isRequired,
|
|
|
|
|
pageStart: _propTypes2.default.number,
|
|
|
|
|
ref: _propTypes2.default.func,
|
|
|
|
|
getScrollParent: _propTypes2.default.func,
|
|
|
|
|
threshold: _propTypes2.default.number,
|
|
|
|
|
useCapture: _propTypes2.default.bool,
|
|
|
|
|
useWindow: _propTypes2.default.bool
|
|
|
|
|
};
|
|
|
|
|
InfiniteScroll.defaultProps = {
|
|
|
|
|
element: 'div',
|
|
|
|
|
hasMore: false,
|
|
|
|
|
initialLoad: true,
|
|
|
|
|
pageStart: 0,
|
|
|
|
|
ref: null,
|
|
|
|
|
threshold: 250,
|
|
|
|
|
useWindow: true,
|
|
|
|
|
isReverse: false,
|
|
|
|
|
useCapture: false,
|
|
|
|
|
loader: null,
|
|
|
|
|
getScrollParent: null
|
|
|
|
|
};
|
|
|
|
|
exports.default = InfiniteScroll;
|
|
|
|
|
module.exports = exports['default'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 1766:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
|
|
|
|
|
|
|
|
// load the styles
|
|
|
|
|
var content = __webpack_require__(4567);
|
|
|
|
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
|
|
|
// Prepare cssTransformation
|
|
|
|
|
var transform;
|
|
|
|
|
|
|
|
|
|
var options = {"hmr":false}
|
|
|
|
|
options.transform = transform
|
|
|
|
|
// add the styles to the DOM
|
|
|
|
|
var update = __webpack_require__(291)(content, options);
|
|
|
|
|
if(content.locals) module.exports = content.locals;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 2846:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router_dom__ = __webpack_require__(45);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment__ = __webpack_require__(85);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_moment__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_educoder__ = __webpack_require__(5);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__tpm_TPMIndexHOC__ = __webpack_require__(317);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__comcss_competition_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RegisListviewdata__ = __webpack_require__(3403);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// 团队竞赛报名无报名子组件团队 竞赛报名-已创建战队
|
|
|
|
|
var Registrationitem=function(_React$Component){_inherits(Registrationitem,_React$Component);function Registrationitem(props){_classCallCheck(this,Registrationitem);return _possibleConstructorReturn(this,(Registrationitem.__proto__||Object.getPrototypeOf(Registrationitem)).call(this,props));}_createClass(Registrationitem,[{key:'render',value:function render(){var item=this.props.item;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'yslborderbottom'},item!==undefined?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'regitem2'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'perregitemimg1 '},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'personregitemimg',src:Object(__WEBPACK_IMPORTED_MODULE_4_educoder__["M" /* getImageUrl */])("images/"+item.creator.image_url)})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'',style:{marginTop:"19px",marginLeft:"54px",display:"flex",flexDirection:"initial"}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'',style:{color:"#05101A",fontSize:"16px",width:"160px",textAlign:"center"}},item.creator.name),item.manage_permission===true?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'',style:{color:"#459BE5",fontSize:"16px",textAlign:"center",marginLeft:"25px"}},'\u5DF2\u62A5\u540D'):""),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'',style:{marginLeft:"632px",width:"151px",marginTop:"19px",marginRight:"35px"}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{style:{color:"#999999",fontSize:"16px",textAlign:"center"}},item.created_at))):"");}}]);return Registrationitem;}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);/* harmony default export */ __webpack_exports__["a"] = (Registrationitem);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 3403:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router_dom__ = __webpack_require__(45);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment__ = __webpack_require__(85);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_moment__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_educoder__ = __webpack_require__(5);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__tpm_TPMIndexHOC__ = __webpack_require__(317);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__comcss_competition_css__);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// 团队竞赛报名无报名子组件团队 竞赛报名-已创建战队
|
|
|
|
|
var RegisListviewdata=function(_React$Component){_inherits(RegisListviewdata,_React$Component);function RegisListviewdata(props){_classCallCheck(this,RegisListviewdata);var _this=_possibleConstructorReturn(this,(RegisListviewdata.__proto__||Object.getPrototypeOf(RegisListviewdata)).call(this,props));_this.getotiku=function(url){window.open(url,'_blank');};_this.state={item:undefined};return _this;}_createClass(RegisListviewdata,[{key:'componentDidMount',value:function componentDidMount(){////console.log("RegisListviewdata");
|
|
|
|
|
////console.log(this.props.item)
|
|
|
|
|
this.setState({item:this.props.item});}},{key:'render',value:function render(){var _this2=this;var item=this.props.item;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',null,item!==undefined?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:"yslborderbottom"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'regitem22'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'regitemimg1 '},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'regitemimg2',src:Object(__WEBPACK_IMPORTED_MODULE_4_educoder__["M" /* getImageUrl */])("images/"+item.creator.image_url)}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a',{className:'maxnamewidth78',title:item.creator.name,style:{color:"#999999",fontSize:"14px",width:"78px",textAlign:"center"}},item.creator.name)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{style:{marginTop:"29px",marginLeft:"37px",width:"160px",textAlign:"center"},className:'textsize maxnamewidth160'},this.props.admin?this.props.admin===true?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a',{className:'maxnamewidth160',title:item.name,style:{fontSize:"16px",width:"160px",textAlign:"center",cursor:"pointer"},onClick:function onClick(){return _this2.getotiku('/competitions/'+_this2.props.match.params.identifier+'/competition_teams/'+item.id);}},item.name):__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'maxnamewidth160',style:{color:"#05101A",fontSize:"16px",width:"160px",textAlign:"center"}},item.name):__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'maxnamewidth160',style:{color:"#05101A",fontSize:"16px",width:"160px",textAlign:"center"}},item.name)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{style:{marginLeft:"37px",display:"flex",flexDirection:"initial",width:"487px"}},item&&item.team_members.map(function(item,index){return index===0?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'regitemimgs',src:Object(__WEBPACK_IMPORTED_MODULE_4_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===1?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_4_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===2?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_4_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===3?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_4_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===4?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_4_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===5?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_4_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img',{className:'regitemimgs22',src:Object(__WEBPACK_IMPORTED_MODULE_4_educoder__["M" /* getImageUrl */])('images/educoder/competitions/pexjiazai.png')})):"";})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{style:{marginLeft:"41px",width:"134px",marginTop:"29px",textAlign:"center"},className:'maxnamewidth134'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a',{className:'maxnamewidth134',title:item.school_name,style:{color:"#05101A",fontSize:"16px",textAlign:"center"}},item.school_name)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{style:{marginLeft:"37px",width:"151px",marginTop:"29px"}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{sty
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4566:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_pagination_style_css__ = __webpack_require__(848);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_pagination_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_pagination_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_pagination__ = __webpack_require__(849);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_pagination___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_pagination__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_spin_style_css__ = __webpack_require__(71);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_spin_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_spin_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_spin__ = __webpack_require__(72);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_spin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_spin__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_breadcrumb_style_css__ = __webpack_require__(1294);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_breadcrumb_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_breadcrumb_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_breadcrumb__ = __webpack_require__(1295);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_breadcrumb___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_breadcrumb__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_router_dom__ = __webpack_require__(45);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment__ = __webpack_require__(85);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_moment__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_educoder__ = __webpack_require__(5);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__tpm_TPMIndexHOC__ = __webpack_require__(317);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__comcss_competition_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Registrationitem__ = __webpack_require__(2846);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__RegisNodata__ = __webpack_require__(4568);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__CompetitionMaxImg__ = __webpack_require__(4569);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__RegistrationSearch__ = __webpack_require__(4570);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__RegisListview__ = __webpack_require__(4571);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__RegisListviewdata__ = __webpack_require__(3403);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__competmodal_PersonModal__ = __webpack_require__(4572);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__competmodal_MessagePersonModal__ = __webpack_require__(4573);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__competmodal_PersonalModalteam__ = __webpack_require__(4574);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__personal_PersonalCompetititem__ = __webpack_require__(4575);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__competmodal_ExittheteamModel__ = __webpack_require__(4576);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// 团队竞赛报名无报名
|
|
|
|
|
var Registration=function(_React$Component){_inherits(Registration,_React$Component);/***
|
|
|
|
|
*"personal": false, // 是否为个人赛
|
|
|
|
|
*"enroll_ended": false, // 报名是否截止
|
|
|
|
|
*"enrolled: false, // 是否已经报名
|
|
|
|
|
*"teacher_staff": { // 为空表示不支持老师报名
|
|
|
|
|
*"member_staff": { // 为空表示不支持学生报名
|
|
|
|
|
* personal// 是否是个人赛
|
|
|
|
|
* type 是按设计图来的
|
|
|
|
|
* **/function Registration(props){_classCallCheck(this,Registration);var _this=_possibleConstructorReturn(this,(Registration.__proto__||Object.getPrototypeOf(Registration)).call(this,props));_this.componentDidUpdate=function(prevProps){if(prevProps.user!=_this.props.user){// console.log("componentDidUpdate");
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
////console.log("Registration");
|
|
|
|
|
////console.log("componentDidUpdate");
|
|
|
|
|
////console.log(this.props.user.admin);
|
|
|
|
|
var _this$state=_this.state,keyword=_this$state.keyword,page=_this$state.page,per_page=_this$state.per_page;_this.Getdata(keyword,page,per_page,_this.props.user.admin);//取报名配置
|
|
|
|
|
_this.GetenrollmentAPI();//取模式
|
|
|
|
|
_this.Getdataheader();_this.setState({admin:_this.props.user.admin});}};_this.Getdataheader=function(){var url='/competitions/'+_this.props.match.params.identifier+'/common_header.json';__WEBPACK_IMPORTED_MODULE_8_axios___default.a.get(url).then(function(result){if(result){if(result.data){_this.setState({mode:result.data.mode,region_schools:result.data.region_schools});}}}).catch(function(error){});};_this.GetenrollmentAPI=function(){// console.log("调用了GetenrollmentAPI");
|
|
|
|
|
var url='/competitions/'+_this.props.match.params.identifier+'/competition_staff.json';__WEBPACK_IMPORTED_MODULE_8_axios___default.a.get(url).then(function(result){if(result){if(result.data){//// //////console.log("获取报名配置API");
|
|
|
|
|
//// //////console.log(result);
|
|
|
|
|
_this.setState({GetenrollmentAPI:result.data,personal:result.data.personal,enroll_ended:result.data.enroll_ended,enrolled:result.data.enrolled,teacher_staff:result.data.teacher_staff===undefined||result.data.teacher_staff===null?null:result.data.teacher_staff,member_staff:result.data.member_staff===undefined||result.data.member_staff===null?null:result.data.member_staff});try{//获取学生是否被限制多次报名
|
|
|
|
|
if(result.data.member_staff){_this.setState({mutiple_limited:result.data.member_staff.mutiple_limited});}}catch(e){}try{//获取老师是否被限制多次报名
|
|
|
|
|
if(result.data.teacher_staff){_this.setState({teamutiple_limited:result.data.teacher_staff.mutiple_limited});}}catch(e){}//是否是个人赛做处理
|
|
|
|
|
if(result.data.personal===true){if(result.data.enroll_ended===true){_this.setState({pint:0});}else if(result.data.enrolled===true){_this.setState({pint:2});}else if(result.data.enrolled===false){_this.setState({pint:1});}}}}}).catch(function(error){console.log("GetenrollmentAPI");console.log(error);});};_this.Getdata=function(keyword,page,per_page,admin){//搜索关键字 keyword
|
|
|
|
|
//页数 page
|
|
|
|
|
//分页 per_page
|
|
|
|
|
var datas={keyword:keyword,page:page,per_page:per_page};var url='/competitions/'+_this.props.match.params.identifier+'/competition_teams.json';__WEBPACK_IMPORTED_MODULE_8_axios___default.a.get(url,{params:datas}).then(function(result){if(result){if(result.data){//// //////console.log(result);\
|
|
|
|
|
if(result.data.personal===false){//不是个人赛
|
|
|
|
|
if(result.data.my_teams.length===0){// 没有创建数据的
|
|
|
|
|
if(admin===true){//管理员
|
|
|
|
|
try{_this.setState({type:4,count:result.data.count,data:result.data.my_teams,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}catch(e){_this.setState({type:4,count:result.data.count,data:result.data.my_teams,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}}else{//普通账号
|
|
|
|
|
_this.setState({type:1,count:result.data.count,data:result.data.my_teams,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}}else{//有数据的
|
|
|
|
|
if(admin===true){_this.setState({type:5,data:result.data.my_teams,count:result.data.count,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}else{//普通账号true 为创建了竞赛
|
|
|
|
|
_this.setState({type:2,data:result.data.my_teams,count:result.data.count,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}}}else{if(_this.props.user.admin===true){try{if(result.data.competition_teams.length===0){_this.setState({type:6,typeysl:1,data:result.data.competition_teams,count:result.data.count,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}else{_this.setState({type:6,typeysl:0,data:result.data.competition_teams,count:result.data.count,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}}catch(e){_this.setState({type:6,typeysl:1,data:result.data.competition_teams,count:result.data.count,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}}else{try{if(result.data.my_teams.length===0){_this.setState({type:6,typeysl:1,data:result.data.my_teams,count:result.data.count,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}else{_this.setState({type:6,typeysl:0,data:result.data.my_teams,count:result.data.count,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}}catch(e){_this.setState({type:6,typeysl:1,data:result.data.my_teams,count:result.data.count,competition_teams:result.data.competition_teams,personal:result.data.personal,competition_name:result.data.competition_name,members_count:result.data.members_count});}}}}}_this.setState({loadingstate:false});}).catch(function(error){if(admin===true){//管理员
|
|
|
|
|
_this.setState({type:4,count:0,competition_teams:[],data:[],loadingstate:false});}else{//普通账号
|
|
|
|
|
_this.setState({type:1,count:0,competition_teams:[],data:[],loadingstate:false});}});};_this.paginationonChangestwo=function(pageNumber){_this.setState({pages:pageNumber,loadingstate:true});var _this$state2=_this.state,keyword=_this$state2.keyword,per_page=_this$state2.per_page;_this.Getdata(keyword,pageNumber,per_page,_this.props.user.admin);};_this.Jointheteam=function(){if(_this.props.checkIfLogin()===false){_this.props.showLoginDialog();return;}var region_schools=_this.state.region_schools;//判断是否是否是同一个学校,数组元素为0就不用判断
|
|
|
|
|
try{if(region_schools.length>0){var i=0;for(var r=0;r<region_schools.length;r++){if(region_schools[r]===_this.props.user.user_school){// 终止循环
|
|
|
|
|
break;}i=i+1;}if(i===region_schools.length){//如果i 等于region_schools.length,说明本次循环中没有相同的学校,本人不支持报名
|
|
|
|
|
try{_this.props.showNotification('\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C!');}catch(e){}_this.Getdataheader();return;}}}catch(e){}if(_this.props.user.is_teacher===true){try{if(_this.state.teamutiple_limited===true){if(_this.state.enrolled===true){//已经报名
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"你已经报名,不能重复报名"});return;}}}catch(e){}}else{try{if(_this.state.mutiple_limited===true){if(_this.state.enrolled===true){//已经报名
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"你已经报名,不能重复报名"});return;}}}catch(e){}}if(_this.state.enroll_ended===true){//报名截止
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"报名已截止,无需报名"});return;}if(_this.props.user.is_teacher===true){//老师
|
|
|
|
|
if(_this.state.teacher_staff===null){//禁止老师
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"已禁止老师报名"});return;}_this.setState({tmodalsTypes:true});}else{//学生
|
|
|
|
|
if(_this.state.member_staff===null){//禁止学生
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"已禁止学生报名"});return;}_this.setState({tmodalsTypes:true});}// this.setState({
|
|
|
|
|
// tmodalsTypes: true
|
|
|
|
|
// })
|
|
|
|
|
};_this.Createateam=function(){if(_this.props.checkIfLogin()===false){_this.props.showLoginDialog();return;}var region_schools=_this.state.region_schools;//判断是否是否是同一个学校,数组元素为0就不用判断
|
|
|
|
|
try{if(region_schools.length>0){var i=0;for(var r=0;r<region_schools.length;r++){if(region_schools[r]===_this.props.user.user_school){// 终止循环
|
|
|
|
|
break;}i=i+1;}if(i===region_schools.length){//如果i 等于region_schools.length,说明本次循环中没有相同的学校,本人不支持报名
|
|
|
|
|
try{_this.props.showNotification('\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C!');}catch(e){}_this.Getdataheader();return;}}}catch(e){}if(_this.props.user.is_teacher===true){try{if(_this.state.teamutiple_limited===true){if(_this.state.enrolled===true){//已经报名
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"你已经报名,不能重复报名"});return;}}}catch(e){}}else{try{if(_this.state.mutiple_limited===true){if(_this.state.enrolled===true){//已经报名
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"你已经报名,不能重复报名"});return;}}}catch(e){}}if(_this.state.enroll_ended===true){//报名截止
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"报名已截止,无需报名"});return;}if(_this.props.user.is_teacher===true){//老师
|
|
|
|
|
if(_this.state.teacher_staff===null){//禁止老师
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"已禁止老师报名"});return;}_this.setState({tmodalsType:true,Newtit:true});}else{//学生
|
|
|
|
|
if(_this.state.member_staff===null){//禁止学生
|
|
|
|
|
_this.setState({messagePerbool:true,intpermessages:"已禁止学生报名"});return;}_this.setState({tmodalsType:true,Newtit:true});}};_this.Createateamedit=function(data){_this.setState({tmodalsType:true,Newtit:false,itemiddata:data});};_this.Tmoconfirm=function(bool){//boolfalse 取消 true 确认
|
|
|
|
|
_this.setState({tmodalsTypes:false});if(bool){//确认
|
|
|
|
|
_this.Refreshteam();}else{//取消
|
|
|
|
|
}};_this.Tmoconfirm1=function(bool){//boolfalse 取消 true 确认
|
|
|
|
|
_this.setState({tmodalsType:false});if(bool){//确认
|
|
|
|
|
_this.Refreshteam();}else{//取消
|
|
|
|
|
}};_this.messagePerboolbuton=function(){_this.setState({messagePerbool:false});};_this.Exittheteamshow=function(itemid,bool){if(bool===true){_this.setState({messageexitol:true,itemid:itemid,exitintpermessages:"是否确认删除战队"});}else{_this.setState({messageexitol:true,itemid:itemid,exitintpermessages:"是否确认退出战队"});}};_this.Refreshteam=function(){var _this$state3=_this.state,keyword=_this$state3.keyword,page=_this$state3.page,per_page=_this$state3.per_page;_this.Getdata(keyword,page,per_page,_this.props.user.admin);_this.GetenrollmentAPI();};_this.Exittheteam=function(bool){// //////console.log(this.state.itemid);
|
|
|
|
|
if(bool){_this.setState({messageexitol:true});var url='/competitions/'+_this.props.match.params.identifier+'/competition_teams/'+_this.state.itemid+'/leave.json';__WEBPACK_IMPORTED_MODULE_8_axios___default.a.post(url).then(function(response){if(response){if(response.data){//////console.log("退出战队");
|
|
|
|
|
//////console.log(response);
|
|
|
|
|
_this.Refreshteam();_this.setState({messageexitol:false});}}}).catch(function(error){//////console.log(error)
|
|
|
|
|
});}else{_this.setState({messageexitol:false});}};_this.RegistrationSearchvalue=function(value){////console.log("RegistrationSearchvalue");
|
|
|
|
|
////console.log(this.props.user.admin);
|
|
|
|
|
_this.setState({pages:1,limit:20});_this.Getdata(value,1,20,_this.props.user.admin);};_this.Personalregistration=function(){var _this$state4=_this.state,teacher_staff=_this$state4.teacher_staff,member_staff=_this$state4.member_staff,data=_this$state4.data,enroll_ended=_this$state4.enroll_ended,enrolled=_this$state4.enrolled;if(_this.props.checkIfLogin()===false){_this.props.showLoginDialog();return;}if(enroll_ended===true){//已截止
|
|
|
|
|
_this.props.showNotification('\u62A5\u540D\u5DF2\u622A\u6B62');return;}if(enrolled===true){_this.props.showNotification('\u4F60\u5DF2\u7ECF\u62A5\u540D,\u4E0D\u80FD\u91CD\u590D\u62A5\u540D\uFF01');return;}var url='/competitions/'+_this.props.match.params.identifier+'/competition_teams.json';__WEBPACK_IMPORTED_MODULE_8_axios___default.a.post(url).then(function(response){if(response){if(response.data){_this.props.showNotification('\u62A5\u540D\u6210\u529F,\u9884\u795D\u60A8\u593A\u5F97\u6842\u51A0!');_this.Refreshteam();}}}).catch(function(error){});};_this.state={loadingstate:false,pages:1,limit:20,type:7,tmodalsType:false,tmodalsTypes:false,Newtit:true,keyword:"",page:1,per_page:20,data:[],competition_teams:[],count:0,GetenrollmentAPI:undefined,personal:false,enroll_ended:false,enrolled:false,teacher_staff:null,member_staff:null,messagePer:"提示",messagePerbool:false,intpermessages:"确认",messageexit:"提示",messageexitol:false,exitintpermessages:"是否确认退出战队?",itemid:undefined,itemiddata:[],pint:0,competition_name:undefined,mutiple_limited:false,teamutiple_limited:false,members_count:0,mode:0,region_schools:[],admin:false,typeysl:0};return _this;}_createClass(Registration,[{key:'componentDidMount',value:function componentDidMount(){// console.log(this.props);
|
|
|
|
|
// //////console.log("componentDidMount Registration");
|
|
|
|
|
// //// //////console.log("调用子组件 ");
|
|
|
|
|
// //////console.log(this.props.isAdmin());
|
|
|
|
|
// //// //////console.log(this.props.isAdmin())
|
|
|
|
|
try{var _state=this.state,keyword=_state.keyword,page=_state.page,per_page=_state.per_page;this.Getdata(keyword,page,per_page,this.props.user.admin);// 获取列表数据
|
|
|
|
|
this.GetenrollmentAPI();//获取我的报名配置
|
|
|
|
|
this.setState({admin:this.props.user.admin});}catch(e){}// const {keyword, page, per_page} = this.state;
|
|
|
|
|
// this.Getdata(keyword, page, per_page, this.props.isAdmin());
|
|
|
|
|
// this.GetenrollmentAPI();
|
|
|
|
|
//取模式
|
|
|
|
|
this.Getdataheader();}// 获取数据头部
|
|
|
|
|
//获取报名配置API
|
|
|
|
|
// Getdatatype5 = (keyword, page, per_page, admin) => {
|
|
|
|
|
// //搜索关键字 keyword
|
|
|
|
|
// //页数 page
|
|
|
|
|
// //分页 per_page
|
|
|
|
|
// const datas = {
|
|
|
|
|
// keyword: keyword,
|
|
|
|
|
// page: page,
|
|
|
|
|
// per_page: per_page,
|
|
|
|
|
// };
|
|
|
|
|
// let url = `/competitions/${this.props.match.params.identifier}/competition_teams.json`;
|
|
|
|
|
// axios.get((url), {params: datas}).then((result) => {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// loadingstate: false,
|
|
|
|
|
// })
|
|
|
|
|
// if (result) {
|
|
|
|
|
// if (result.data) {
|
|
|
|
|
// //// //////console.log(result);
|
|
|
|
|
// if (result.data.personal === false) {
|
|
|
|
|
// //不是个人赛
|
|
|
|
|
// ////console.log("Getdatatype5");
|
|
|
|
|
// ////console.log(result.data.my_teams.length);
|
|
|
|
|
// if (result.data.my_teams.length === 0) {
|
|
|
|
|
// // 没有创建数据的
|
|
|
|
|
// //管理员
|
|
|
|
|
// ////console.log("a");
|
|
|
|
|
// ////console.log(this.state.competition_teams);
|
|
|
|
|
// ////console.log(result.data.competition_teams);
|
|
|
|
|
// this.setState({
|
|
|
|
|
// type: 4,
|
|
|
|
|
// count: result.data.count,
|
|
|
|
|
// competition_teams: result.data.competition_teams,
|
|
|
|
|
// data: result.data.my_teams,
|
|
|
|
|
// personal: result.data.personal,
|
|
|
|
|
// competition_name: result.data.competition_name,
|
|
|
|
|
// members_count:result.data.members_count
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
// } else {
|
|
|
|
|
// //有数据的
|
|
|
|
|
// ////console.log("b");
|
|
|
|
|
//
|
|
|
|
|
// if (result.data.my_teams[0].manage_permission === true) {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// type: 5,
|
|
|
|
|
// data: result.data.my_teams,
|
|
|
|
|
// count: result.data.count,
|
|
|
|
|
// competition_teams: result.data.competition_teams,
|
|
|
|
|
// personal: result.data.personal,
|
|
|
|
|
// competition_name: result.data.competition_name,
|
|
|
|
|
// members_count:result.data.members_count
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
// } else {
|
|
|
|
|
// ////console.log("c");
|
|
|
|
|
//
|
|
|
|
|
// this.setState({
|
|
|
|
|
// type: 4,
|
|
|
|
|
// data: result.data.my_teams,
|
|
|
|
|
// count: result.data.count,
|
|
|
|
|
// competition_teams: result.data.competition_teams,
|
|
|
|
|
// personal: result.data.personal,
|
|
|
|
|
// competition_name: result.data.competition_name,
|
|
|
|
|
// members_count:result.data.members_count
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// //团队赛
|
|
|
|
|
// //////console.log("d");
|
|
|
|
|
//
|
|
|
|
|
// this.setState({
|
|
|
|
|
// type: 6,
|
|
|
|
|
// data: result.data.my_teams,
|
|
|
|
|
// count: result.data.count,
|
|
|
|
|
// competition_teams: result.data.competition_teams,
|
|
|
|
|
// personal: result.data.personal,
|
|
|
|
|
// competition_name: result.data.competition_name,
|
|
|
|
|
// members_count:result.data.members_count
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }).catch((error) => {
|
|
|
|
|
// ////console.log("k");
|
|
|
|
|
//
|
|
|
|
|
// ////console.log(error);
|
|
|
|
|
// ////console.log("报错了");
|
|
|
|
|
// if (admin === true) {
|
|
|
|
|
// //管理员
|
|
|
|
|
// this.setState({
|
|
|
|
|
// count: 0,
|
|
|
|
|
// competition_teams: [],
|
|
|
|
|
// data: [],
|
|
|
|
|
// loadingstate: false,
|
|
|
|
|
// })
|
|
|
|
|
// } else {
|
|
|
|
|
// //普通账号
|
|
|
|
|
// this.setState({
|
|
|
|
|
// count: 0,
|
|
|
|
|
// competition_teams: [],
|
|
|
|
|
// data: [],
|
|
|
|
|
// loadingstate: false,
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
//团队竞赛翻页
|
|
|
|
|
/**
|
|
|
|
|
* 加入战队
|
|
|
|
|
* *//**
|
|
|
|
|
* 创建战队
|
|
|
|
|
**///编辑战队
|
|
|
|
|
//创建战队确认
|
|
|
|
|
//自定义弹框按钮
|
|
|
|
|
//显示退出战队弹框
|
|
|
|
|
//刷新战队
|
|
|
|
|
//退出战队
|
|
|
|
|
//搜索战队
|
|
|
|
|
//个人竞赛
|
|
|
|
|
// /competitions/:identifier/competition_teams.json
|
|
|
|
|
},{key:'render',value:function render(){var _this2=this;var _state2=this.state,page=_state2.page,admin=_state2.admin,typeysl=_state2.typeysl,mode=_state2.mode,pages=_state2.pages,limit=_state2.limit,type=_state2.type,tmodalsType=_state2.tmodalsType,tmodalsTypes=_state2.tmodalsTypes,data=_state2.data,count=_state2.count,competition_teams=_state2.competition_teams,Newtit=_state2.Newtit,itemiddata=_state2.itemiddata,messagePerbool=_state2.messagePerbool,messageexitol=_state2.messageexitol,GetenrollmentAPI=_state2.GetenrollmentAPI,loadingstate=_state2.loadingstate,pint=_state2.pint,competition_name=_state2.competition_name,mutiple_limited=_state2.mutiple_limited,teamutiple_limited=_state2.teamutiple_limited,members_count=_state2.members_count;return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'newMain clearfix newMainybot'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:"educontent mb20 persmstyle",style:{width:"1200px",marginTop:"26px"}},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t\t html, body{\n\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t'),messagePerbool===true?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_20__competmodal_MessagePersonModal__["a" /* default */],Object.assign({messagePer:this.state.messagePer},this.props,this.state,{messagePerboolbuton:function messagePerboolbuton(){return _this2.messagePerboolbuton();},GetenrollmentAPI:GetenrollmentAPI})):"",tmodalsType===true?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_19__competmodal_PersonModal__["a" /* default */],Object.assign({modalsType:tmodalsType},this.props,this.state,{Newtit:Newtit,mutiple_limited:mutiple_limited,teamutiple_limited:teamutiple_limited,itemiddata:itemiddata,GetenrollmentAPI:GetenrollmentAPI,Tmoconfirm1:function Tmoconfirm1(bool){return _this2.Tmoconfirm1(bool);},GetenrollmentAPIopens:function GetenrollmentAPIopens(){return _this2.GetenrollmentAPI();}})):"",tmodalsTypes===true?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_21__competmodal_PersonalModalteam__["a" /* default */],Object.assign({tmodalsTypes:tmodalsTypes},this.props,this.state,{GetenrollmentAPI:GetenrollmentAPI,Tmoconfirm:function Tmoconfirm(bool){return _this2.Tmoconfirm(bool);}})):"",messageexitol===true?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_23__competmodal_ExittheteamModel__["a" /* default */],Object.assign({},this.props,this.state,{GetenrollmentAPI:GetenrollmentAPI,Exittheteam:function Exittheteam(bool){return _this2.Exittheteam(bool);}})):"",__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{style:{marginBottom:'12px'}},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_breadcrumb___default.a,{separator:'>'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_breadcrumb___default.a.Item,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_router_dom__["b" /* Link */],{to:"/competitions"},'\u5728\u7EBF\u7ADE\u8D5B')),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_breadcrumb___default.a.Item,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_router_dom__["b" /* Link */],{to:'/competitions/'+this.props.match.params.identifier},competition_name===undefined||competition_name===null||competition_name===""?"全国高校计算机大赛":competition_name)),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_breadcrumb___default.a.Item,null,'\u62A5\u540D'))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__CompetitionMaxImg__["a" /* default */],Object.assign({type:type,Jointheteam:function Jointheteam(){return _this2.Jointheteam
|
|
|
|
|
// // if (result.data.my_teams[0].manage_permission === true) {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// type: 5,
|
|
|
|
|
// data: result.data.my_teams,
|
|
|
|
|
// count: result.data.count,
|
|
|
|
|
// competition_teams: result.data.competition_teams,
|
|
|
|
|
// personal: result.data.personal,
|
|
|
|
|
// competition_name: result.data.competition_name,
|
|
|
|
|
// members_count: result.data.members_count
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
// // } else {
|
|
|
|
|
// // this.setState({
|
|
|
|
|
// // type: 4,
|
|
|
|
|
// // data: result.data.my_teams,
|
|
|
|
|
// // count: result.data.count,
|
|
|
|
|
// // competition_teams: result.data.competition_teams,
|
|
|
|
|
// // personal: result.data.personal,
|
|
|
|
|
// // competition_name: result.data.competition_name,
|
|
|
|
|
// // members_count: result.data.members_count
|
|
|
|
|
// //
|
|
|
|
|
// //
|
|
|
|
|
// // })
|
|
|
|
|
// if (result.data.my_teams[0].manage_permission === true) {
|
|
|
|
|
//普通账号true 为创建了竞赛
|
|
|
|
|
// this.setState({
|
|
|
|
|
// type: 2,
|
|
|
|
|
// data: result.data.my_teams,
|
|
|
|
|
// count: result.data.count,
|
|
|
|
|
// personal: result.data.personal,
|
|
|
|
|
// competition_name: result.data.competition_name,
|
|
|
|
|
// members_count: result.data.members_count
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
// } else {
|
|
|
|
|
// //普通账号true 加入了竞赛
|
|
|
|
|
// this.setState({
|
|
|
|
|
// type: 2,
|
|
|
|
|
// data: result.data.my_teams,
|
|
|
|
|
// count: result.data.count,
|
|
|
|
|
// personal: result.data.personal,
|
|
|
|
|
// competition_name: result.data.competition_name,
|
|
|
|
|
// members_count: result.data.members_count
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4567:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
exports = module.exports = __webpack_require__(290)(true);
|
|
|
|
|
// imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// module
|
|
|
|
|
exports.push([module.i, ".borders{border:.5px solid}.borders2{border:1px solid #d9d9d9}.newMainybot{padding-bottom:0!important}.registrationbackcenter{display:-ms-flexbox;display:flex;display:-webkit-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.registrationbackp1{color:#fff;font-size:42px;margin-top:80px;line-height:42px;font-weight:700}.registrationbackp11{color:#fff;font-size:48px;margin-top:71px;line-height:48px;font-weight:700;margin-left:251px}.registrationbackp2{color:#fff;font-size:18px;margin-top:16px;line-height:20px}.registrationbackp22{margin-left:251px;color:#fff;font-size:36px;margin-top:25px;line-height:36px}.registrationbackp3{color:#fff;font-size:18px;line-height:20px;margin-top:7px}.registrationbackp4{line-height:26px}.registrationbackp4,.registrationbackp5{color:#fff;font-size:26px;margin-top:25px}.registrationbackp2button{margin-top:36px}.registrationbackp2button,.registrationbackp2button2{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.registrationbackp2button2{margin-top:40px}.registrationbackp2button3{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-top:44px;margin-left:251px}.registbut1{background:#0bdee6}.personreg1,.registbut1{margin-right:46px;text-align:center;border-radius:10px;height:54px;width:156px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer}.personreg1{background:#c3c1c1}.registbut11{height:48px;width:156px;border-radius:4px;border:1px;border-style:solid;border-color:#fff}.registbut11,.registbut111{margin-right:46px;text-align:center;font-size:16px;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer}.registbut111{height:41px;width:146px;border-radius:4px;border:2px;border-style:solid;border-color:#fff}.registbut1 p{width:100%;height:100%;color:#fff;line-height:54px;font-size:20px;font-weight:700;cursor:pointer}.registbut11 p,.registbut22 p{width:100%;height:100%;line-height:48px}.registbut2 p{line-height:54px;width:100%;height:100%;color:#fff;font-size:20px;font-weight:700;cursor:pointer}.personreg1 p{color:#fff;font-size:20px;cursor:not-allowed}.registbut111 p,.registbut222 p{width:100%;height:100%;line-height:38px}.registbut2{text-align:center;color:#05101a;font-size:20px;background:#f8ec25;height:54px;width:156px;border-radius:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer}.registbut22{height:48px;width:156px;border-radius:4px;border:1px;border-style:solid;border-color:#fff}.registbut22,.registbut222{text-align:center;color:#fff;font-size:16px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer}.registbut222{height:41px;width:146px;border-radius:4px;border:2px;border-style:solid;border-color:#fff}.bootom{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bootomimg{height:80px;width:125px;margin-top:107px}.bootomtext{color:#999;font-size:16px;margin-top:33px}.regitem{margin-top:44px}.myregitem11,.regitem{display:-ms-flexbox;display:flex;-ms-flex-direction:initial;flex-direction:row}.myregitem11{margin-top:20px}.regitem22{display:-ms-flexbox;display:flex;-ms-flex-direction:initial;flex-direction:row;margin-top:27px;margin-bottom:19px}.yslborderbottom{border-bottom:1px solid #ededed}.registrationback{display:-ms-flexbox;display:flex;display:-webkit-flex;-ms-flex-align:center;align-items:center}.registrationback,.registrationback1{height:368px;width:1200px;-ms-flex-direction:column;flex-direction:column}.registrationback1,.regitem2{display:-ms-flexbox;display:flex}.regitem2{-ms-flex-direction:initial;flex-direction:row;padding-bottom:18px;margin-top:19px}.regitemimg1{margin-left:17px}.perregitemimg1,.regitemimg1{display:-m
|
|
|
|
|
|
|
|
|
|
// exports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4568:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__comcss_competition_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_educoder__ = __webpack_require__(5);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// 团队竞赛报名无报名子组件
|
|
|
|
|
var RegisNodata=function(_React$Component){_inherits(RegisNodata,_React$Component);function RegisNodata(props){_classCallCheck(this,RegisNodata);return _possibleConstructorReturn(this,(RegisNodata.__proto__||Object.getPrototypeOf(RegisNodata)).call(this,props));}_createClass(RegisNodata,[{key:'render',value:function render(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'bootom'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'bootomimg',style:{height:"80px",width:"125px",marginTop:"107px",background:'url('+Object(__WEBPACK_IMPORTED_MODULE_2_educoder__["M" /* getImageUrl */])('images/educoder/competitions/Noentry.jpg')+')',backgroundPosition:"center",backgroundSize:"110% 100%"}}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'bootomtext'},'\u6682\u65E0\u6218\u961F\u53C2\u4E0E\u62A5\u540D\u54E6\uFF0C\u8D76\u7D27\u6765\u6210\u4E3A\u7B2C\u4E00\u4E2A\u6311\u6218\u7684\u5427~'));}}]);return RegisNodata;}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);/* harmony default export */ __webpack_exports__["a"] = (RegisNodata);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4569:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__comcss_competition_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_educoder__ = __webpack_require__(5);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// 团队竞赛报名大图
|
|
|
|
|
var CompetitionMaxImg=function(_React$Component){_inherits(CompetitionMaxImg,_React$Component);function CompetitionMaxImg(props){_classCallCheck(this,CompetitionMaxImg);var _this=_possibleConstructorReturn(this,(CompetitionMaxImg.__proto__||Object.getPrototypeOf(CompetitionMaxImg)).call(this,props));_this.componentDidUpdate=function(prevProps){if(prevProps.GetenrollmentAPI!=_this.props.GetenrollmentAPI){_this.setState({GetenrollmentAPI:_this.props.GetenrollmentAPI});}};_this.state={GetenrollmentAPI:undefined};return _this;}_createClass(CompetitionMaxImg,[{key:'componentDidMount',value:function componentDidMount(){}},{key:'render',value:function render(){var _this2=this;var _props=this.props,type=_props.type,pint=_props.pint;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('style',null,'\n\t\t\t\t\t\n\t\t\t\t\t\t'),type===1||type===2?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'registrationback',style:{"background":'url('+Object(__WEBPACK_IMPORTED_MODULE_2_educoder__["M" /* getImageUrl */])('images/educoder/competitions/tipregistit.jpg')+')'}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'registrationbackp1'},'\u5728\u7EBF\u7ADE\u8D5B\u5E73\u53F0'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'registrationbackp2'},'\u5728\u7EBF\u7ADE\u8D5B\u5E73\u53F0\u662F\u4E00\u4E2A\u9762\u5411\u8BA1\u7B97\u673A\u7C7B\u7684\u4E92\u8054\u7F51IT\u6559\u80B2\u548C\u5B9E\u6218\u5E73\u53F0\uFF0C'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'registrationbackp3'},'\u63D0\u4F9B\u4F01\u4E1A\u7EA7\u5DE5\u7A0B\u5B9E\u8BAD\uFF0C\u4EE5\u5B9E\u73B0\u5DE5\u7A0B\u5316\u4E13\u4E1A\u6559\u5B66\u7684\u81EA\u52A8\u5316\u548C\u667A\u80FD\u5316\u3002'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'registrationbackp2button'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'registbut1'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{onClick:function onClick(){return _this2.props.Jointheteam();}},'\u52A0\u5165\u6218\u961F')),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'registbut2'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{onClick:function onClick(){return _this2.props.Createateam();}},'\u521B\u5EFA\u6218\u961F')))):type===3?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'registrationback',style:{"background":'url('+Object(__WEBPACK_IMPORTED_MODULE_2_educoder__["M" /* getImageUrl */])('images/educoder/competitions/tipregistit.jpg')+')'}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'registrationbackp1'},'\u5728\u7EBF\u7ADE\u8D5B\u5E73\u53F0'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'registrationbackp2'},'\u5728\u7EBF\u7ADE\u8D5B\u5E73\u53F0\u662F\u4E00\u4E2A\u9762\u5411\u8BA1\u7B97\u673A\u7C7B\u7684\u4E92\u8054\u7F51IT\u6559\u80B2\u548C\u5B9E\u6218\u5E73\u53F0\uFF0C'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'registrationbackp3'},'\u63D0\u4F9B\u4F01\u4E1A\u7EA7\u5DE5\u7A0B\u5B9E\u8BAD\uFF0C\u4EE5\u5B9E\u73B0\u5DE5\u7A0B\u5316\u4E13\u4E1A\u6559\u5B66\u7684\u81EA\u52A8\u5316\u548C\u667A\u80FD\u5316\u3002'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'registrationbackp2button'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'registbut1'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{onClick:function onClick(){return _this2.props.Jointheteam();}},'\u52A0\u5165\u6218\u961F')),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'registbut2'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{onClick:function onClick(){return _this2.props.Createateam();}},'\u521B\u5EFA\u6218\u961F')))):type===4||type===5?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{classNam
|
|
|
|
|
// /*<div className="registrationback"*/
|
|
|
|
|
// /* style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}>*/
|
|
|
|
|
// /* <p className="registrationbackp1">Educoder竞赛平台</p>*/
|
|
|
|
|
// /* <p className="registrationbackp4">高校智能课堂与综合实训平台</p>*/
|
|
|
|
|
// /* <div className="registrationbackp2button2">*/
|
|
|
|
|
// /* <div className="registbut11">*/
|
|
|
|
|
// /* <p onClick={() => this.props.Jointheteam()}>加入战队</p>*/
|
|
|
|
|
// /* </div>*/
|
|
|
|
|
// /* <div className="registbut22">*/
|
|
|
|
|
// /* <p onClick={() => this.props.Createateam()}>创建战队</p>*/
|
|
|
|
|
// /* </div>*/
|
|
|
|
|
//
|
|
|
|
|
// /* </div>*/
|
|
|
|
|
// /*</div>*/
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// // type === 4 || type === 5
|
|
|
|
|
// // <div className="registrationback1"
|
|
|
|
|
// // style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}>
|
|
|
|
|
// // <p className="registrationbackp11">Educoder竞赛平台</p>
|
|
|
|
|
// // <p className="registrationbackp22">高校智能课堂与综合实训平台</p>
|
|
|
|
|
// // <div className="registrationbackp2button3">
|
|
|
|
|
// // <div className="registbut111">
|
|
|
|
|
// // <p onClick={() => this.props.Jointheteam()}>加入战队</p>
|
|
|
|
|
// // </div>
|
|
|
|
|
// // <div className="registbut222">
|
|
|
|
|
// // <p onClick={() => this.props.Createateam()}>创建战队</p>
|
|
|
|
|
// // </div>
|
|
|
|
|
// //
|
|
|
|
|
// // </div>
|
|
|
|
|
// // </div>
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4570:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_input_style_css__ = __webpack_require__(67);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_input_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_input__ = __webpack_require__(68);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_input__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router_dom__ = __webpack_require__(45);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_moment__ = __webpack_require__(85);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_moment__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__comcss_competition_css__);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var Search=__WEBPACK_IMPORTED_MODULE_1_antd_lib_input___default.a.Search;// 团队竞赛报名无报名子组件团队 在线竞赛 > 全国高校计算机大赛-项目挑战>
|
|
|
|
|
var RegistrationSearch=function(_React$Component){_inherits(RegistrationSearch,_React$Component);function RegistrationSearch(props){_classCallCheck(this,RegistrationSearch);var _this=_possibleConstructorReturn(this,(RegistrationSearch.__proto__||Object.getPrototypeOf(RegistrationSearch)).call(this,props));_this.setdatafunsval=function(e){_this.setState({keywords:e.target.value});};_this.setdatafuns=function(value){//console.log("setdatafuns点击了搜索");
|
|
|
|
|
//console.log(value);
|
|
|
|
|
_this.setState({keywords:value});_this.props.RegistrationSearchvalue(value);};_this.myonPressEnter=function(e){//console.log("点击了回车setdatafunsval点击了搜索");
|
|
|
|
|
//console.log(e.target.value);
|
|
|
|
|
_this.props.RegistrationSearchvalue(e.target.value);};_this.state={keywords:""};return _this;}_createClass(RegistrationSearch,[{key:'render',value:function render(){var _this2=this;return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{className:'searchhead'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(Search,{className:'packinputs',value:this.state.keywords,enterButton:__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',null,'\u641C\u7D22'),onInput:function onInput(e){return _this2.setdatafunsval(e);},onSearch:function onSearch(value){return _this2.setdatafuns(value);},onPressEnter:function onPressEnter(e){return _this2.myonPressEnter(e);}}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('p',{style:{width:"583px",color:"#07140E",fontSize:'16px',marginTop:" 7px",marginLeft:"300px",textAlign:"right",lineHeight:" 24px"}},'\u6218\u961F\u603B\u6570\uFF1A',__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{style:{color:"#459BE5",fontSize:"16px"}},this.props.count),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{style:{marginLeft:"5px",marginRight:"15px"}},'\u4E2A'),' \u53C2\u8D5B\u603B\u4EBA\u6570\uFF1A',__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{style:{color:"#459BE5"}},this.props.members_count),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{style:{marginLeft:"5px"}},'\u4EBA')));}}]);return RegistrationSearch;}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);/* harmony default export */ __webpack_exports__["a"] = (RegistrationSearch);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4571:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router_dom__ = __webpack_require__(45);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment__ = __webpack_require__(85);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_moment__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__comcss_competition_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_educoder__ = __webpack_require__(5);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// 团队竞赛报名无报名子组件团队 在线竞赛 > 全国高校计算机大赛-项目挑战>
|
|
|
|
|
var RegisListview=function(_React$Component){_inherits(RegisListview,_React$Component);function RegisListview(props){_classCallCheck(this,RegisListview);return _possibleConstructorReturn(this,(RegisListview.__proto__||Object.getPrototypeOf(RegisListview)).call(this,props));}_createClass(RegisListview,[{key:'render',value:function render(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'reglistviewdivs'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'reglistviewdivss ',style:{width:"100%",display:"flex",justifyContent:" space-around",alignItems:"center",background:'url('+Object(__WEBPACK_IMPORTED_MODULE_5_educoder__["M" /* getImageUrl */])('images/educoder/competitions/Rectanglex.png')+')',height:"50px",backgroundPosition:"center",backgroundSize:"110% 100%"}},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:' ',style:{fontSize:"16px",color:"#05101A",width:"79px",textAlign:"center"}},'\u521B\u5EFA\u8005'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:' ',style:{fontSize:"16px",color:"#05101A",width:"160px",textAlign:"center"}},'\u6218\u961F\u540D\u79F0'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:' ',style:{fontSize:"16px",color:"#05101A",width:"487px",textAlign:"center"}},'\u6218\u961F\u6210\u5458'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:' ',style:{fontSize:"16px",color:"#05101A",width:"134px",textAlign:"center"}},'\u5B66\u6821'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:' ',style:{fontSize:"16px",color:"#05101A",width:"151px",textAlign:"center"}},'\u65F6\u95F4')));}}]);return RegisListview;}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);/* harmony default export */ __webpack_exports__["a"] = (RegisListview);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4572:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__ = __webpack_require__(30);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__ = __webpack_require__(31);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_dropdown_style_css__ = __webpack_require__(924);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_dropdown_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_dropdown_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_dropdown__ = __webpack_require__(920);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_dropdown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_dropdown__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_spin_style_css__ = __webpack_require__(71);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_spin_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_spin_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_spin__ = __webpack_require__(72);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_spin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_spin__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_empty_style_css__ = __webpack_require__(179);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_empty_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_empty_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_empty__ = __webpack_require__(345);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_empty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_empty__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_input_style_css__ = __webpack_require__(67);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_antd_lib_input_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_input__ = __webpack_require__(68);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_antd_lib_input__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_educoder__ = __webpack_require__(5);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13__comcss_competition_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__Registrationitem__ = __webpack_require__(2846);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_react_infinite_scroller__ = __webpack_require__(1140);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_react_infinite_scroller___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_react_infinite_scroller__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__modules_courses_coursesPublic_NoneData__ = __webpack_require__(304);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// import PersonModaltion from "./PersonModaltion";
|
|
|
|
|
var Search=__WEBPACK_IMPORTED_MODULE_9_antd_lib_input___default.a.Search;//创建战队
|
|
|
|
|
var myabool=true;var myabool2=true;var PersonModal=function(_Component){_inherits(PersonModal,_Component);//导师是搜索 和学生搜索都会添加到下面框中
|
|
|
|
|
/**
|
|
|
|
|
* mydatas最下面列表显示的参数
|
|
|
|
|
* booltech 控制老师是否重复添加的参数
|
|
|
|
|
* myuser 创建者的信息
|
|
|
|
|
* teacher_idss 老师数组
|
|
|
|
|
* member_ids 学生数组
|
|
|
|
|
* polls_nametest 战队名字
|
|
|
|
|
* **/function PersonModal(props){_classCallCheck(this,PersonModal);var _this=_possibleConstructorReturn(this,(PersonModal.__proto__||Object.getPrototypeOf(PersonModal)).call(this,props));_this.componentDidUpdate=function(prevProps){// if (prevProps.user != this.props.user) {
|
|
|
|
|
// ////console.log("Registration.js componentDidUpdate");
|
|
|
|
|
// ////console.log(this.props);
|
|
|
|
|
// // ////console.log(prevProps);
|
|
|
|
|
// //identity职场称
|
|
|
|
|
// //user_school学校
|
|
|
|
|
// //real_name姓名
|
|
|
|
|
// //type 类型
|
|
|
|
|
// var data = [];
|
|
|
|
|
// var datas = {
|
|
|
|
|
// enrollable: false,
|
|
|
|
|
// id: undefined,
|
|
|
|
|
// name: this.props.user.real_name,
|
|
|
|
|
// school_name: this.props.user.user_school,
|
|
|
|
|
// student_id: null,
|
|
|
|
|
// identity: this.props.user.user_identity,
|
|
|
|
|
// type: "导师",
|
|
|
|
|
// };
|
|
|
|
|
// data.push(datas);
|
|
|
|
|
// this.setState({
|
|
|
|
|
// myuser: this.props.user,
|
|
|
|
|
// mydatas: data,
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
if(prevProps.GetenrollmentAPI!=_this.props.GetenrollmentAPI){////console.log("Registration.js GetenrollmentAPIcomponentDidUpdate");
|
|
|
|
|
////console.log(this.props);
|
|
|
|
|
_this.setState({GetenrollmentAPI:_this.props.GetenrollmentAPI});}};_this.Createateam=function(){try{if(_this.state.polls_nametest.length===0){_this.props.showNotification('\u8BF7\u8F93\u5165\u60A8\u7684\u6218\u961F\u540D\u79F0\uFF0C\u6700\u591A\u4E0D\u8D85\u8FC760\u4E2A\u5B57\u7B26');return;}}catch(e){}var _this$state=_this.state,polls_nametest=_this$state.polls_nametest,mydatas=_this$state.mydatas,GetenrollmentAPI=_this$state.GetenrollmentAPI;var myteaherdata=[];var myshtudentdata=[];var i=0;var s=0;for(var a=0;a<mydatas.length;a++){if(mydatas[a].type==="导师"){i++;// var objectt = {
|
|
|
|
|
// enrollable: mydatas[a].enrollable,
|
|
|
|
|
// id: mydatas[a].id,
|
|
|
|
|
// identity: mydatas[a].identity,
|
|
|
|
|
// name: mydatas[a].name,
|
|
|
|
|
// school_name: mydatas[a].school_name,
|
|
|
|
|
// }
|
|
|
|
|
myteaherdata.push(mydatas[a].id);}else if(mydatas[a].type==="队员"){s++;// var objectts = {
|
|
|
|
|
// enrollable: mydatas[a].enrollable,
|
|
|
|
|
// id: mydatas[a].id,
|
|
|
|
|
// name: mydatas[a].name,
|
|
|
|
|
// school_name: mydatas[a].school_name,
|
|
|
|
|
// student_id: mydatas[a].student_id,
|
|
|
|
|
// }
|
|
|
|
|
myshtudentdata.push(mydatas[a].id);}}// try {
|
|
|
|
|
// if (i === 0) {
|
|
|
|
|
// this.props.showNotification(`请添加导师`);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// } catch (e) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// try {
|
|
|
|
|
// if (s === 0) {
|
|
|
|
|
// this.props.showNotification(`请添加队员`);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// } catch (e) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//确认的时候 去确认老师人数是否符合
|
|
|
|
|
try{if(GetenrollmentAPI){if(GetenrollmentAPI.teacher_staff){if(GetenrollmentAPI.teacher_staff.minimum>i){_this.setState({Thecurrentnumberbool:true,Thecurrentnumber:i,booltech:false,boolstud:false});return;}else if(GetenrollmentAPI.teacher_staff.maximum<i){_this.setState({Thecurrentnumberbool:true,Thecurrentnumber:i,booltech:false,boolstud:false});return;}_this.setState({Thecurrentnumberbool:false,Thecurrentnumber:i,booltech:false,boolstud:false});}}}catch(e){}//确认的时候 去确认学生人数是否符合
|
|
|
|
|
try{if(GetenrollmentAPI){if(GetenrollmentAPI.member_staff){if(GetenrollmentAPI.member_staff.minimum>s){_this.setState({Thecurrentnumberboolstu:true,Thecurrentnumberstu:s,booltech:false,boolstud:false});return;}else if(GetenrollmentAPI.member_staff.maximum<s){_this.setState({Thecurrentnumberboolstu:true,Thecurrentnumberstu:s,booltech:false,boolstud:false});return;}_this.setState({Thecurrentnumberboolstu:false,Thecurrentnumberstu:s,booltech:false,boolstud:false});}}}catch(e){}// Thecurrentnumber
|
|
|
|
|
if(_this.props.Newtit===true){//创建新的战队
|
|
|
|
|
var url='/competitions/'+_this.props.match.params.identifier+'/competition_teams.json';__WEBPACK_IMPORTED_MODULE_12_axios___default.a.post(url,{name:polls_nametest,teacher_ids:myteaherdata,member_ids:myshtudentdata}).then(function(result){// ////console.log("获取到创建战队的数据");
|
|
|
|
|
// ////console.log(result);
|
|
|
|
|
if(result){if(result.data){try{if(result.data.status===0){_this.props.showNotification('\u62A5\u540D\u6210\u529F\uFF0C\u9884\u795D\u60A8\u593A\u5F97\u6842\u51A0');}}catch(e){}_this.props.Tmoconfirm1(true);}}}).catch(function(error){// ////console.log(error)
|
|
|
|
|
});}else{//编辑战队
|
|
|
|
|
var _url='/competitions/'+_this.props.match.params.identifier+'/competition_teams/'+_this.props.itemiddata.id+'.json';__WEBPACK_IMPORTED_MODULE_12_axios___default.a.put(_url,{name:polls_nametest,teacher_ids:myteaherdata,member_ids:myshtudentdata}).then(function(result){// ////console.log("获取到编辑战队的数据");
|
|
|
|
|
// ////console.log(result);
|
|
|
|
|
if(result){if(result.data){_this.props.Tmoconfirm1(true);}}}).catch(function(error){// ////console.log(error)
|
|
|
|
|
});}};_this.Getteacherdata=function(keywordteachers,team_idteachers,teacher_ids){_this.setState({person1:true,person2:false});//老师姓名 keyword
|
|
|
|
|
//当前战队ID team_id
|
|
|
|
|
//当前老师ID数组 teacher_ids
|
|
|
|
|
// ////console.log("搜索的老师");
|
|
|
|
|
var datas={keyword:keywordteachers,team_id:null,teacher_ids:null};var url='/competitions/'+_this.props.match.params.identifier+'/teachers.json';__WEBPACK_IMPORTED_MODULE_12_axios___default.a.get(url,{params:datas}).then(function(result){if(result){if(result.data){// ////console.log(result);
|
|
|
|
|
_this.setState({teacher_ids:result.data.teachers});}}}).catch(function(error){// ////console.log(error);
|
|
|
|
|
});};_this.Getstudentsdata=function(keywordstudents,team_idstudents,student_ids){_this.setState({person1:false,person2:true});//学生姓名 keyword
|
|
|
|
|
//当前战队ID team_id
|
|
|
|
|
//当前队员ID数组 student_ids
|
|
|
|
|
// ////console.log("搜索的学生");
|
|
|
|
|
var datas={keyword:keywordstudents,team_id:null,student_ids:null};var url='/competitions/'+_this.props.match.params.identifier+'/students.json';__WEBPACK_IMPORTED_MODULE_12_axios___default.a.get(url,{params:datas}).then(function(result){if(result){if(result.data){// ////console.log(result);
|
|
|
|
|
_this.setState({member_ids:result.data.teachers});}}}).catch(function(error){// ////console.log(error);
|
|
|
|
|
});};_this.teacheronChange=function(e){// ////console.log(e.target.value);
|
|
|
|
|
// ////console.log("老师输入框事件|||||||||||123123123");
|
|
|
|
|
_this.setState({keywordteachers:e.target.value,booltech:false,Thecurrentnumberbool:false,Thecurrentnumberboolstu:false});// try {
|
|
|
|
|
// if (e.target.value.length > 0) {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// person1: true,
|
|
|
|
|
// person2: false,
|
|
|
|
|
// keywordteachers: e.target.value
|
|
|
|
|
// })
|
|
|
|
|
// } else {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// person1: false,
|
|
|
|
|
// person2: false,
|
|
|
|
|
// keywordteachers: e.target.value
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// } catch (e) {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// person1: true,
|
|
|
|
|
// person2: false,
|
|
|
|
|
// keywordteachers: e.target.value
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// try {
|
|
|
|
|
// const {team_idteachers, teacher_ids} = this.state;
|
|
|
|
|
// this.Getteacherdata(e.target.value, team_idteachers, teacher_ids);
|
|
|
|
|
// } catch (e) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
};_this.studentsonChange=function(e){// ////console.log("学生输入框事件");
|
|
|
|
|
// ////console.log(e);
|
|
|
|
|
_this.setState({keywordstudents:e.target.value,boolstud:false,Thecurrentnumberbool:false,Thecurrentnumberboolstu:false});// try {
|
|
|
|
|
// if (e.target.value.length > 0) {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// person2: true,
|
|
|
|
|
// person1: false,
|
|
|
|
|
// keywordstudents: e.target.value
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// person2: false,
|
|
|
|
|
// person1: false,
|
|
|
|
|
// keywordstudents: e.target.value
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// } catch (e) {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// person2: true,
|
|
|
|
|
// person1: false,
|
|
|
|
|
// keywordstudents: e.target.value
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// try {
|
|
|
|
|
// const {team_idstudents, student_ids} = this.state;
|
|
|
|
|
// this.Getstudentsdata(e.target.value, team_idstudents, student_ids);
|
|
|
|
|
// } catch (e) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
};_this.getdatacpersondiv1Items=function(object){try{if(_this.props.teamutiple_limited===true){if(object.enrollable===false){myabool=false;return;}}}catch(e){myabool=true;}myabool=true;var datas={enrollable:object.enrollable,id:object.id,name:object.name,school_name:object.school_name,student_id:null,identity:object.identity,type:"导师"};var fordabool=false;var forda=_this.state.mydatas;// ////console.log("点击获取老师数据");
|
|
|
|
|
// ////console.log(object);
|
|
|
|
|
// ////console.log(forda);
|
|
|
|
|
for(var i=0;i<forda.length;i++){if(forda[i].id){if(forda[i].id===object.id){fordabool=true;break;}}}if(fordabool){_this.setState({person1:false,keywordteachers:object.name,booltech:true});}else{forda.push(datas);_this.setState({person1:false,keywordteachers:object.name,mydatas:forda,booltech:false});}};_this.getdatacpersondiv1Items2=function(object){//
|
|
|
|
|
try{if(_this.props.GetenrollmentAPI.member_staff.mutiple_limited===true){if(object.enrollable===false){myabool2=false;return;}}}catch(e){myabool2=true;}myabool2=true;var datas={enrollable:object.enrollable,id:object.id,name:object.name,school_name:object.school_name,student_id:object.student_id,identity:"学生",type:"队员"};var fordabool=false;var forda=_this.state.mydatas;// ////console.log("点击获取学生数据2");
|
|
|
|
|
// ////console.log(object);
|
|
|
|
|
// ////console.log(forda);
|
|
|
|
|
for(var i=0;i<forda.length;i++){if(forda[i].id){// // ////console.log(true);
|
|
|
|
|
// // ////console.log(forda[i].id);
|
|
|
|
|
// // ////console.log(object.id);
|
|
|
|
|
if(forda[i].id===object.id){fordabool=true;break;}}}if(fordabool){_this.setState({person2:false,keywordstudents:object.name,boolstud:true});}else{forda.push(datas);_this.setState({person2:false,keywordstudents:object.name,mydatas:forda,boolstud:false});}};_this.changeTopicName=function(e){// // ////console.log("调用了changeTopicName");
|
|
|
|
|
var num=parseInt(e.target.value.length);if(num>60){return;}_this.setState({addonAfter:num<0?0:num});_this.setState({polls_nametest:e.target.value});};_this.onSearch=function(value){// ////console.log("搜索的数据" + value);
|
|
|
|
|
};_this.handleInfiniteOnLoad=function(){// this.setState({
|
|
|
|
|
// loading: true,
|
|
|
|
|
// })
|
|
|
|
|
// const test3 = this.state.test;
|
|
|
|
|
// this.state.test2.forEach(function (item) {
|
|
|
|
|
// test3.push(item)
|
|
|
|
|
// });
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// test: test3,
|
|
|
|
|
// hasMore: true,
|
|
|
|
|
// loading: false,
|
|
|
|
|
// });
|
|
|
|
|
// }, 1000)
|
|
|
|
|
};_this.handleInfiniteOnLoad1=function(){// // ////console.log("调用了方法1111");
|
|
|
|
|
// this.setState({
|
|
|
|
|
// loading1: true,
|
|
|
|
|
// })
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// // ////console.log("调用了方法11112");
|
|
|
|
|
// this.setState({
|
|
|
|
|
// loading1: false,
|
|
|
|
|
// hasMore: true,
|
|
|
|
|
// });
|
|
|
|
|
// }, 1000)
|
|
|
|
|
};_this.handleInfiniteOnLoad2=function(){// // ////console.log("调用了方法1111");
|
|
|
|
|
// this.setState({
|
|
|
|
|
// loading2: true,
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// // ////console.log("调用了方法11113");
|
|
|
|
|
// this.setState({
|
|
|
|
|
// hasMore: true,
|
|
|
|
|
// loading2: false,
|
|
|
|
|
// });
|
|
|
|
|
// }, 1000)
|
|
|
|
|
};_this.inputOnBlur=function(e){console.log("inputOnBlur");console.log(e);if(myabool===true){_this.setState({person1:false,person2:false});}};_this.inputOnBlur2=function(e){// ////console.log("inputOnBlur");
|
|
|
|
|
// ////console.log(e);
|
|
|
|
|
if(myabool2===true){_this.setState({person1:false,person2:false});}};_this.startSearch=function(e){// ////console.log("startSearch");
|
|
|
|
|
// ////console.log(e);
|
|
|
|
|
_this.setState({person1:true,person2:false});var _this$state2=_this.state,keywordteachers=_this$state2.keywordteachers,team_idteachers=_this$state2.team_idteachers,teacher_ids=_this$state2.teacher_ids;_this.Getteacherdata(keywordteachers,team_idteachers,teacher_ids);};_this.startSearch2=function(e){// ////console.log("startSearch2");
|
|
|
|
|
// ////console.log(e);
|
|
|
|
|
_this.setState({person1:false,person2:true});var _this$state3=_this.state,keywordstudents=_this$state3.keywordstudents,team_idstudents=_this$state3.team_idstudents,student_ids=_this$state3.student_ids;_this.Getstudentsdata(keywordstudents,team_idstudents,student_ids);};_this.inputOnFocus=function(e){// ////console.log("inputOnFocus");
|
|
|
|
|
// ////console.log(e);
|
|
|
|
|
try{if(_this.state.keywordteachers&&_this.state.keywordteachers.length>0){_this.setState({person1:true,person2:false});}else{_this.setState({person1:false,person2:false});}}catch(e){_this.setState({person1:true,person2:false});}};_this.inputOnFocus2=function(e){// ////console.log("inputOnFocus2");
|
|
|
|
|
// ////console.log(e);
|
|
|
|
|
try{if(_this.state.keywordstudents&&_this.state.keywordstudents.length>0){_this.setState({person2:true,person1:false});}else{_this.setState({person2:false,person1:false});}}catch(e){_this.setState({person2:true,person1:false});}};_this.inputOnFocus3=function(e){// ////console.log("inputOnFocus3");
|
|
|
|
|
// ////console.log(e);
|
|
|
|
|
_this.setState({person2:false,person1:false});};_this.deletedata=function(item){var _this$state4=_this.state,mydatas=_this$state4.mydatas,GetenrollmentAPI=_this$state4.GetenrollmentAPI;if(item){var pos=mydatas.indexOf(item);// ////console.log("deletedata");
|
|
|
|
|
// ////console.log(pos);
|
|
|
|
|
var removedItem=mydatas.splice(pos,1);// ////console.log("deletedata22222");
|
|
|
|
|
// ////console.log(removedItem)
|
|
|
|
|
//removedItem 是被删除的元素
|
|
|
|
|
// ////console.log(mydatas)
|
|
|
|
|
_this.setState({mydatas:mydatas});}var myteaherdata=[];var myshtudentdata=[];var i=0;var s=0;try{for(var a=0;a<mydatas.length;a++){if(mydatas[a].type==="导师"){i=i+1;// var objectt = {
|
|
|
|
|
// enrollable: mydatas[a].enrollable,
|
|
|
|
|
// id: mydatas[a].id,
|
|
|
|
|
// identity: mydatas[a].identity,
|
|
|
|
|
// name: mydatas[a].name,
|
|
|
|
|
// school_name: mydatas[a].school_name,
|
|
|
|
|
// }
|
|
|
|
|
myteaherdata.push(mydatas[a].id);}else if(mydatas[a].type==="队员"){s=s+1;// var objectts = {
|
|
|
|
|
// enrollable: mydatas[a].enrollable,
|
|
|
|
|
// id: mydatas[a].id,
|
|
|
|
|
// name: mydatas[a].name,
|
|
|
|
|
// school_name: mydatas[a].school_name,
|
|
|
|
|
// student_id: mydatas[a].student_id,
|
|
|
|
|
// }
|
|
|
|
|
myshtudentdata.push(mydatas[a].id);}}}catch(e){}// console.log("deletedata");
|
|
|
|
|
// console.log(i);
|
|
|
|
|
//删除老师的时候判断是否符合人数
|
|
|
|
|
try{if(GetenrollmentAPI){if(GetenrollmentAPI.teacher_staff){if(GetenrollmentAPI.teacher_staff.minimum>i){_this.setState({Thecurrentnumberbool:true,Thecurrentnumber:i,booltech:false,boolstud:false});return;}else if(GetenrollmentAPI.teacher_staff.maximum<i){_this.setState({Thecurrentnumberbool:true,Thecurrentnumber:i,booltech:false,boolstud:false});return;}_this.setState({Thecurrentnumberbool:false,Thecurrentnumber:i});}}}catch(e){}// debugger
|
|
|
|
|
//删除学生的时候判断是否符合人数
|
|
|
|
|
try{if(GetenrollmentAPI){if(GetenrollmentAPI.member_staff){if(GetenrollmentAPI.member_staff.minimum>s){_this.setState({Thecurrentnumberboolstu:true,Thecurrentnumberstu:s,booltech:false,boolstud:false});return;}else if(GetenrollmentAPI.member_staff.maximum<s){_this.setState({Thecurrentnumberboolstu:true,Thecurrentnumberstu:s,booltech:false,boolstud:false});return;}_this.setState({Thecurrentnumberboolstu:false,Thecurrentnumberstu:s});}}}catch(e){}};_this.state={addonAfter:0,loading:false,loading1:false,loading2:false,hasMore:true,person1:false,person2:false,Numberofteammentors:"0-3",Thecurrentnumber:"0",keywordteachers:"",team_idstudents:undefined,team_idteachers:undefined,teacher_ids:undefined,keywordstudents:"",Aggregatedata:[],name:"",teacher_idss:[],member_ids:[],myuser:undefined,mydatas:[],booltech:false,boolstud:false,polls_nametest:"",myteaherdata:[],myshtudentdata:[],Thecurrentnumberbool:false,Thecurrentnumberboolstu:false,Thecurrentnumberstu:""};return _this;}_createClass(PersonModal,[{key:'componentDidMount',value:function componentDidMount(){var data=[];var polls_nametests="";var datas={enrollable:false,id:this.props.user.user_id,name:this.props.user.real_name,school_name:this.props.user.user_school,student_id:null,identity:this.props.user.user_identity,type:this.props.user.is_teacher===true?"导师":"队员"};data.push(datas);// console.log("itemiddata");
|
|
|
|
|
// console.log("编辑战队")
|
|
|
|
|
// console.log(this.props.itemiddata);
|
|
|
|
|
try{if(this.props.Newtit===false){for(var i=0;i<this.props.itemiddata.team_members.length;i++){if(i===0){///因为第一个位置是创建者 所以要过滤掉
|
|
|
|
|
}else{var datasy={enrollable:false,id:this.props.itemiddata.team_members[i].user_id,name:this.props.itemiddata.team_members[i].name,school_name:this.props.itemiddata.team_members[i].school_name,student_id:null,identity:this.props.itemiddata.team_members[i].identity,type:this.props.itemiddata.team_members[i].role==="teacher"?"导师":"队员"};data.push(datasy);}}if(this.props.itemiddata){polls_nametests=this.props.itemiddata.name;}}}catch(e){}this.setState({myuser:this.props.user,mydatas:data,polls_nametest:polls_nametests});this.setState({GetenrollmentAPI:this.props.GetenrollmentAPI});try{this.setState({addonAfter:polls_nametests.length});}catch(e){}}//创建战队
|
|
|
|
|
//老师输入框事件
|
|
|
|
|
//学生输入框事件
|
|
|
|
|
//点击获取老师数据
|
|
|
|
|
//点击获取学生数据2
|
|
|
|
|
//输入框事件
|
|
|
|
|
//onSearchsou
|
|
|
|
|
},{key:'render',value:function render(){var _this2=this;// console.log('Registration.js');
|
|
|
|
|
// console.log(this.props.mutiple_limited);
|
|
|
|
|
var _state=this.state,addonAfter=_state.addonAfter,Numberofteammentors=_state.Numberofteammentors,Thecurrentnumber=_state.Thecurrentnumber,person1=_state.person1,person2=_state.person2,keywordteachers=_state.keywordteachers,team_idteachers=_state.team_idteachers,teacher_ids=_state.teacher_ids,keywordstudents=_state.keywordstudents,team_idstudents=_state.team_idstudents,student_ids=_state.student_ids,member_ids=_state.member_ids,mydatas=_state.mydatas,booltech=_state.booltech,boolstud=_state.boolstud,GetenrollmentAPI=_state.GetenrollmentAPI,Thecurrentnumberbool=_state.Thecurrentnumberbool,Thecurrentnumberboolstu=_state.Thecurrentnumberboolstu,Thecurrentnumberstu=_state.Thecurrentnumberstu;var _props=this.props,teacher_staff=_props.teacher_staff,member_staff=_props.member_staff;//Modal
|
|
|
|
|
//keyboard是否支持键盘 esc 关闭
|
|
|
|
|
//closable 是否显示右上角的关闭按钮
|
|
|
|
|
//底部内容,当不需要默认底部按钮时,可以设为 footer={null}
|
|
|
|
|
//destroyOnClose 关闭时销毁 Modal 里的子元素
|
|
|
|
|
//centered 垂直居中展示 Modal
|
|
|
|
|
//visible 弹出框是否显示
|
|
|
|
|
var listItems=mydatas.map(function(item,index){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:'reglistviewdivss2 ',style:{width:"100%",display:"flex",justifyContent:" space-around",alignItems:"center",height:"40px"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('style',null,'\n\t\t\t a:hover\n\t\t\t{\n color: #05101A;\n\t\t\t}\n\t\t\t'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:item.name,className:' reglistviewdivss4p maxnamewidth90',style:{textAlign:"center"}},item.name===undefined||item.name===null||item.name===""?"--":item.name),index===0?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' reglistviewdivss4p',style:{textAlign:"center"}},'\u521B\u5EFA\u8005'):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:item.type,className:' reglistviewdivss4p maxnamewidth90',style:{textAlign:"center"}},item.type===undefined||item.type===null||item.type===""?"--":item.type),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:item.school_name,className:' reglistviewdivss5p maxnamewidth110',style:{textAlign:"center"}},item.school_name===undefined||item.school_name===null||item.school_name===""?"--":item.school_name),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:item.identity,className:' reglistviewdivss2p maxnamewidth90',style:{textAlign:"center"}},item.identity===undefined||item.identity===null||item.identity===""?"--":item.identity),index===0?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' reglistviewdivss333p',style:{textAlign:"center"}}):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' reglistviewdivss333p',style:{textAlign:"center"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('i',{className:'iconfont icon-guanbi font-12',onClick:function onClick(){return _this2.deletedata(item);}})));});var cpersondiv1Items=[];// console.log("this.props.teamutiple_limited ");
|
|
|
|
|
// console.log(this.props.teamutiple_limited );
|
|
|
|
|
if(teacher_ids){cpersondiv1Items=teacher_ids.map(function(item,index){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:"yslanswerList"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('li',{className:_this2.props.teamutiple_limited===undefined||_this2.props.teamutiple_limited===null?"reglistviewdivss2 ":_this2.props.teamutiple_limited===true&&item.enrollable===false?"reglistviewdivss2c":"reglistviewdivss2 ",key:index,style:{width:"100%",display:"flex",justifyContent:" space-around",alignItems:"center",height:"40px"},onMouseDown:function onMouseDown(){return _this2.getdatacpersondiv1Items(item);}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('style',null,'\n\t\t\t a:hover\n\t\t\t{\n color: #05101A;\n\t\t\t}\n\t\t\t'),item.name===undefined||item.name===null||item.name===""?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{className:' cpersondiv1Items',style:{textAlign:"center",width:"90px"}},'--'):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:item.name,className:' cpersondiv1Items maxnamewidth90',style:{textAlign:"center",width:"90px"}},item.name),item.identity===undefined||item.identity===null||item.identity===""?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items maxnamewidth85',style:{textAlign:"center",width:"85px"}},'--'):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:item.identity,className:' cpersondiv1Items maxnamewidth85',style:{textAlign:"center",width:"85px"}},item.identity),item.school_name===undefined||item.school_name===null||item.school_name===""?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items',style:{textAlign:"center",width:"110px"}},'--'):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:item.school_name,className:' cpersondiv1Items maxnamewidth110',style:{textAlign:"center",width:"110px"}},item.school_name),_this2.props.teamutiple_limited===undefined||_this2.props.teamutiple_limited===null?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items',style:{textAlign:"center",width:"87px"}},""):_this2.props.teamutiple_limited===true?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items',style:{textAlign:"center",color:"#FF6800",width:"87px"}},item.enrollable===false?"已加入其他战队":""):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items',style:{textAlign:"center",width:"87px"}},"")));});}var cpersondiv1=__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:" backgroundspersondiv cpersondiv1 borders2"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_spin___default.a,{spinning:false},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:cpersondiv1Items.length===0?"demo-infinite-container33 yslanswerList":"demo-infinite-container2 yslanswerList"},cpersondiv1Items.length===0?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_empty___default.a,{image:__WEBPACK_IMPORTED_MODULE_7_antd_lib_empty___default.a.PRESENTED_IMAGE_SIMPLE}):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15_react_infinite_scroller___default.a,{initialLoad:false,pageStart:0,loadMore:function loadMore(){return _this2.handleInfiniteOnLoad1();}// hasMore={!this.state.loading1 && this.state.hasMore}
|
|
|
|
|
,hasMore:false,useWindow:false},cpersondiv1Items))));var persondiv2Items=[];if(member_ids){persondiv2Items=member_ids.map(function(item,index){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:"yslanswerList"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('li',{className:_this2.props.mutiple_limited===undefined||_this2.props.mutiple_limited===null?"reglistviewdivss2 ":_this2.props.mutiple_limited===true&&item.enrollable===false?"reglistviewdivss2c":"reglistviewdivss2 ",key:index,style:{width:"100%",display:"flex",justifyContent:" space-around",alignItems:"center",height:"40px"},onMouseDown:function onMouseDown(){return _this2.getdatacpersondiv1Items2(item);}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t a:hover\n\t\t\t\t\t\t{\n color: #05101A;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t'),item.name===undefined||item.name===null||item.name===""?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{className:' cpersondiv1Items',style:{textAlign:"center",width:"90px"}},'--'):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:item.name,className:' cpersondiv1Items maxnamewidth90',style:{textAlign:"center",width:"90px"}},item.name),item.student_id===undefined||item.student_id===null||item.student_id===""?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items maxnamewidth85',style:{textAlign:"center",width:"85px"}},'--'):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:"学号:"+item.student_id,className:' cpersondiv1Items maxnamewidth85',style:{textAlign:"center",width:"85px"}},"学号:"+item.student_id),item.school_name===undefined||item.school_name===null||item.school_name===""?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items',style:{textAlign:"center",width:"110px"}},'--'):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{title:item.school_name,className:' cpersondiv1Items maxnamewidth110',style:{textAlign:"center",width:"110px"}},item.school_name),_this2.props.mutiple_limited===undefined||_this2.props.mutiple_limited===null?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items',style:{textAlign:"center",width:"87px"}},""):_this2.props.mutiple_limited===true?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items',style:{textAlign:"center",color:"#FF6800",width:"87px"}},item.enrollable===false?"已加入其他战队":""):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{className:' cpersondiv1Items',style:{textAlign:"center",width:"87px"}},"")));});}var persondiv2=__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:" backgroundspersondiv cpersondiv1 borders2"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_spin___default.a,{spinning:false},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:persondiv2Items.length===0?"demo-infinite-container33 ":"demo-infinite-container2 "},persondiv2Items.length===0?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_empty___default.a,{image:__WEBPACK_IMPORTED_MODULE_7_antd_lib_empty___default.a.PRESENTED_IMAGE_SIMPLE}):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15_react_infinite_scroller___default.a,{initialLoad:false,pageStart:0,loadMore:function loadMore(){return _this2.handleInfiniteOnLoad2();}// hasMore={!this.state.loading2 && this.state.hasMore}
|
|
|
|
|
,hasMore:false,useWindow:false},persondiv2Items))));//console.log("PersonModal");
|
|
|
|
|
//console.log(this.props);
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default.a,{keyboard:false,closable:false,footer:null,destroyOnClose:true,title:this.props.Newtit===true?"创建战队":"编辑战队",centered:true,visible:this.props.modalsType===undefined?false:this.props.modalsType,width:'620px'},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:'permaindiv'},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.yslzxueshiskmc .ant-input{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder-right: none !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t width: 428px !important;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.yslzxueshiskmc .ant-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t max-width: 487px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .yslzxueshisy span .ant-input-group-addon{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t width: 65px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t background-color: #fafafa!important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .yslzxueshisy .ant-input-wrapper span{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t width: 58px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.yslzxueshiskmc .ant-input-group-addon{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t width: 65px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t background-color: #fafafa!important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .yslzxueshiskmc .ant-input-group-wrapper{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t width: 408px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .yslzxueshiskmcs .ant-input-group-wrapper{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t width: 408px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{style:{display:"flex",flexDirection:"initial"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{style:{width:"59px",marginTop:"9px",fontSize:"16px"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('span',{style:{color:"#f5222d",fontSize:"16px"}},'*'),'\u961F\u540D:'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_input___default.a,{className:'yslzxueshiskmc',onInput:this.changeTopicName,onFocus:this.inputOnFocus3,value:this.state.polls_nametest,placeholder:'\u8BF7\u8F93\u5165\u60A8\u7684\u6218\u961F\u540D\u79F0\uFF0C\u6700\u591A\u4E0D\u8D85\u8FC760\u4E2A\u5B57\u7B26',addonAfter:String(addonAfter)+"/60",maxLength:60})),teacher_staff===undefined||teacher_staff===null?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{style:{marginLeft:"53px",minHeight:"14px",height:"14px"}}):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{style:{display:"flex",flexDirection:"initial",marginTop:"14px"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{style:{width:"59px",marginTop:"9px",fontSize:"16px"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('span',{style:{color:"#f5222d",fontSize:"16px"}},'*'),'\u5BFC\u5E08:'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t\t\t.yslzxueshiskmcd .ant-input{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 487px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_dropdown___default.a,{overlay:cpersond
|
|
|
|
|
,hasMore:false,useWindow:false},listItems)))),GetenrollmentAPI&&GetenrollmentAPI.teacher_staff?Thecurrentnumberbool===true?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{style:{marginLeft:"53px",color:"#D0021B",fontSize:"12px",marginTop:"9px"}},'\u5BFC\u5E08\u9700\u4E3A',GetenrollmentAPI.teacher_staff.minimum,'-',GetenrollmentAPI.teacher_staff.maximum,'\u4EBA,\u73B0\u4E3A',Thecurrentnumber,'\u4EBA'):"":"",GetenrollmentAPI&&GetenrollmentAPI.member_staff?Thecurrentnumberboolstu===true?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{style:{marginLeft:"53px",color:"#D0021B",fontSize:"12px",marginTop:"9px"}},'\u6218\u961F\u6210\u5458\u9700\u4E3A',GetenrollmentAPI.member_staff.minimum,'-',GetenrollmentAPI.member_staff.maximum,'\u4EBA,\u73B0\u4E3A',Thecurrentnumberstu,'\u4EBA'):"":"",__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{style:{marginTop:"24px",marginLeft:"53px",display:"flex",alignItems:"center",paddingBottom:"20px"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{style:{display:"flex",justifyContent:"center",width:"100%"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:'personbut1'},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{onClick:function onClick(){return _this2.props.Tmoconfirm1(false);}},' \u53D6\u6D88')),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:'personbut2'},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',{onClick:function onClick(){return _this2.Createateam();}},'\u786E\u5B9A'))))));}}]);return PersonModal;}(__WEBPACK_IMPORTED_MODULE_10_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (PersonModal);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4573:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__ = __webpack_require__(30);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__ = __webpack_require__(31);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__ = __webpack_require__(67);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input__ = __webpack_require__(68);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_educoder__ = __webpack_require__(5);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__comcss_competition_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Registrationitem__ = __webpack_require__(2846);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_infinite_scroller__ = __webpack_require__(1140);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_infinite_scroller___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react_infinite_scroller__);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// import PersonModaltion from "./PersonModaltion";
|
|
|
|
|
var Search=__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a.Search;var MessagePersonModal=function(_React$Component){_inherits(MessagePersonModal,_React$Component);function MessagePersonModal(props){_classCallCheck(this,MessagePersonModal);var _this=_possibleConstructorReturn(this,(MessagePersonModal.__proto__||Object.getPrototypeOf(MessagePersonModal)).call(this,props));_this.state={};return _this;}_createClass(MessagePersonModal,[{key:'render',value:function render(){var _this2=this;var _state=this.state,addonAfter=_state.addonAfter,test=_state.test,test3=_state.test3,Numberofteammentors=_state.Numberofteammentors,Thecurrentnumber=_state.Thecurrentnumber,person1=_state.person1,person2=_state.person2;//Modal
|
|
|
|
|
//keyboard是否支持键盘 esc 关闭
|
|
|
|
|
//closable 是否显示右上角的关闭按钮
|
|
|
|
|
//底部内容,当不需要默认底部按钮时,可以设为 footer={null}
|
|
|
|
|
//destroyOnClose 关闭时销毁 Modal 里的子元素
|
|
|
|
|
//centered 垂直居中展示 Modal
|
|
|
|
|
//visible 弹出框是否显示
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default.a,{keyboard:false,closable:false,footer:null,destroyOnClose:true,title:this.props.messagePer,centered:true,visible:this.props.messagePerbool===undefined?false:this.props.messagePerbool,width:'480px'},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{style:{width:"100%",textAlign:"center"},className:'task-popup-text-center font-16 '},this.props.intpermessages),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{style:{textAlign:"center",marginTop:"30px"},className:'task-popup-text-center task-btn task-btn-orange',onClick:function onClick(){return _this2.props.messagePerboolbuton();}},'\u786E\u8BA4')));}}]);return MessagePersonModal;}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);/* harmony default export */ __webpack_exports__["a"] = (MessagePersonModal);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4574:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__ = __webpack_require__(30);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__ = __webpack_require__(31);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__ = __webpack_require__(67);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input__ = __webpack_require__(68);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_educoder__ = __webpack_require__(5);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__comcss_competition_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Registrationitem__ = __webpack_require__(2846);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_infinite_scroller__ = __webpack_require__(1140);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_infinite_scroller___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react_infinite_scroller__);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// import PersonModaltion from "./PersonModaltion";
|
|
|
|
|
var Search=__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a.Search;//立即申请试用
|
|
|
|
|
var PersonalModalteam=function(_Component){_inherits(PersonalModalteam,_Component);function PersonalModalteam(props){_classCallCheck(this,PersonalModalteam);var _this=_possibleConstructorReturn(this,(PersonalModalteam.__proto__||Object.getPrototypeOf(PersonalModalteam)).call(this,props));_this.Tmoconfirmto=function(){try{if(_this.state.yslzxueshiskmcdm1){if(_this.state.yslzxueshiskmcdm1.length===0){_this.props.showNotification('\u8BF7\u8F93\u5165\u60A8\u7684\u9080\u8BF7\u7801');return;}}}catch(e){}var url='/competitions/'+_this.props.match.params.identifier+'/competition_teams/join.json';__WEBPACK_IMPORTED_MODULE_6_axios___default.a.post(url,{invite_code:_this.state.yslzxueshiskmcdm1}).then(function(result){if(result){if(result.data){try{if(result.data.status===0){_this.props.showNotification('\u62A5\u540D\u6210\u529F\uFF0C\u9884\u795D\u60A8\u593A\u5F97\u6842\u51A0');}}catch(e){}_this.props.Tmoconfirm(true);}}}).catch(function(error){});};_this.studentsonChange=function(e){_this.setState({yslzxueshiskmcdm1:e.target.value});};_this.state={yslzxueshiskmcdm1:""};return _this;}_createClass(PersonalModalteam,[{key:'render',value:function render(){var _this2=this;var _state=this.state,addonAfter=_state.addonAfter,test=_state.test,test3=_state.test3,Numberofteammentors=_state.Numberofteammentors,Thecurrentnumber=_state.Thecurrentnumber,person1=_state.person1,person2=_state.person2;//Modal
|
|
|
|
|
//keyboard是否支持键盘 esc 关闭
|
|
|
|
|
//closable 是否显示右上角的关闭按钮
|
|
|
|
|
//底部内容,当不需要默认底部按钮时,可以设为 footer={null}
|
|
|
|
|
//destroyOnClose 关闭时销毁 Modal 里的子元素
|
|
|
|
|
//centered 垂直居中展示 Modal
|
|
|
|
|
//visible 弹出框是否显示
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default.a,{keyboard:false,closable:false,footer:null,destroyOnClose:true,title:'\u52A0\u5165\u6218\u961F',centered:true,visible:this.props.tmodalsTypes===undefined?false:this.props.tmodalsTypes,width:'600px'},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:'personaldiv'},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{style:{display:"flex",flexDirection:"initial",marginTop:"10px"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('p',{style:{width:"67px",fontSize:"16px",color:'#05101A',height:"40px",lineHeight:"40px"}},'\u9080\u8BF7\u7801\uFF1A'),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t\t\t.yslzxueshiskmcdm1 {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 329px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t'),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{className:"yslzxueshiskmcdm1",value:this.state.yslzxueshiskmcdm1,onChange:function onChange(e){return _this2.studentsonChange(e);},placeholder:'\u8BF7\u8F93\u5165\u60A8\u7684\u9080\u8BF7\u7801'})),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{style:{marginTop:"48px",display:"flex",alignItems:"center",paddingBottom:"12px"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{style:{display:"flex",justifyContent:"center",width:"100%"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:'personaldivbutt1'},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('p',{onClick:function onClick(){return _this2.props.Tmoconfirm(false);}},'\u53D6\u6D88')),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:'personaldivbutt2'},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('p',{onClick:function onClick(){return _this2.Tmoconfirmto();}},'\u786E\u5B9A'))))));}}]);return PersonalModalteam;}(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (PersonalModalteam);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4575:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_tooltip_style_css__ = __webpack_require__(165);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_tooltip_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_tooltip_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_tooltip__ = __webpack_require__(164);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_tooltip___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_tooltip__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_message_style_css__ = __webpack_require__(177);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_message_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_message_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_message__ = __webpack_require__(178);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_message___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_message__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_router_dom__ = __webpack_require__(45);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_moment__ = __webpack_require__(85);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_moment__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_educoder__ = __webpack_require__(5);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__tpm_TPMIndexHOC__ = __webpack_require__(317);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__comcss_competition_css__);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// 点击按钮复制功能
|
|
|
|
|
function jsCopy(s){var e=document.getElementById(s);e.select();document.execCommand("Copy");codesuccess();// const range=document.createRange();
|
|
|
|
|
// window.getSelection().removeAllRanges();
|
|
|
|
|
// range.selectNode(e.target);
|
|
|
|
|
// window.getSelection().addRange(range);
|
|
|
|
|
// const successful =document.execCommand('copy');
|
|
|
|
|
// if(successful){
|
|
|
|
|
// codesuccess()
|
|
|
|
|
// }
|
|
|
|
|
}function codesuccess(){__WEBPACK_IMPORTED_MODULE_3_antd_lib_message___default.a.success('复制成功');};// 团队竞赛报名无报名子组件团队 竞赛报名-已创建战队
|
|
|
|
|
var PersonalCompetititem=function(_React$Component){_inherits(PersonalCompetititem,_React$Component);function PersonalCompetititem(props){_classCallCheck(this,PersonalCompetititem);var _this=_possibleConstructorReturn(this,(PersonalCompetititem.__proto__||Object.getPrototypeOf(PersonalCompetititem)).call(this,props));_this.componentDidUpdate=function(prevProps){//
|
|
|
|
|
// if (prevProps.data != this.props.data) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
};return _this;}_createClass(PersonalCompetititem,[{key:'componentDidMount',value:function componentDidMount(){// // ////console.log(this.props.data)
|
|
|
|
|
}},{key:'render',value:function render(){var _this2=this;var _props=this.props,key=_props.key,item=_props.item,type=_props.type,mode=_props.mode;// ////console.log("PersonalCompetititem");
|
|
|
|
|
// ////console.log(data);
|
|
|
|
|
// ////console.log(data[0]);
|
|
|
|
|
// ////console.log(data&&data[0].creator.image_url);
|
|
|
|
|
// const listItems = mydatas.map((item, index) =>
|
|
|
|
|
//
|
|
|
|
|
// );
|
|
|
|
|
// console.log("PersonalCompetititem");
|
|
|
|
|
// console.log(data);
|
|
|
|
|
// console.log("PersonalCompetititem");
|
|
|
|
|
// console.log(type);
|
|
|
|
|
// console.log("sdasjdhahsdas");
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',null,item!==undefined||item!==null?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:"yslborderbottom"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:this.props.index===undefined||this.props.index===null?"myregitem11":this.props.index===0?"regitem":"myregitem11",style:{marginBottom:"19px"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:'regitemimg1 '},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimg2',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.creator.image_url)}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('a',{className:'maxnamewidth78',title:item.creator.name,style:{color:"#999999",fontSize:"14px",width:"78px",textAlign:"center"}},item.creator.name)),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:' maxnamewidth160',style:{marginTop:"29px",marginLeft:"37px",width:"160px",textAlign:"center"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('a',{className:'maxnamewidth160',title:item.name,style:{color:"#05101A",fontSize:"16px",width:"160px",textAlign:"center"}},item.name)),this.props.type===5||this.props.type===2?this.props.mode===3?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{style:{marginLeft:"37px",display:"flex",flexDirection:"initial",width:"340px"}},item&&item.team_members.map(function(item,index){return index===0?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===1?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===2?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===3?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs222',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])('images/educoder/competitions/pexjiazai.png')})):"";})):__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:' ',style:{marginLeft:"37px",display:"flex",flexDirection:"initial",width:"487px"}},item&&item.team_members.map(function(item,index){return index===0?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===1?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===2?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===3?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===4?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBPACK_IMPORTED_MODULE_8_educoder__["M" /* getImageUrl */])("images/"+item.image_url)}):index===5?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('img',{className:'regitemimgs2',src:Object(__WEBP
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4576:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__ = __webpack_require__(30);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__ = __webpack_require__(31);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__ = __webpack_require__(67);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input__ = __webpack_require__(68);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_educoder__ = __webpack_require__(5);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios__ = __webpack_require__(12);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_axios__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__comcss_competition_css__ = __webpack_require__(1766);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__comcss_competition_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__comcss_competition_css__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Registrationitem__ = __webpack_require__(2846);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_infinite_scroller__ = __webpack_require__(1140);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_infinite_scroller___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react_infinite_scroller__);
|
|
|
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// import PersonModaltion from "./PersonModaltion";
|
|
|
|
|
var Search=__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a.Search;//退出战队
|
|
|
|
|
var ExittheteamModel=function(_React$Component){_inherits(ExittheteamModel,_React$Component);function ExittheteamModel(props){_classCallCheck(this,ExittheteamModel);var _this=_possibleConstructorReturn(this,(ExittheteamModel.__proto__||Object.getPrototypeOf(ExittheteamModel)).call(this,props));_this.state={};return _this;}_createClass(ExittheteamModel,[{key:'render',value:function render(){var _this2=this;var _state=this.state,addonAfter=_state.addonAfter,test=_state.test,test3=_state.test3,Numberofteammentors=_state.Numberofteammentors,Thecurrentnumber=_state.Thecurrentnumber,person1=_state.person1,person2=_state.person2;//Modal
|
|
|
|
|
//keyboard是否支持键盘 esc 关闭
|
|
|
|
|
//closable 是否显示右上角的关闭按钮
|
|
|
|
|
//底部内容,当不需要默认底部按钮时,可以设为 footer={null}
|
|
|
|
|
//destroyOnClose 关闭时销毁 Modal 里的子元素
|
|
|
|
|
//centered 垂直居中展示 Modal
|
|
|
|
|
//visible 弹出框是否显示
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default.a,{keyboard:false,closable:false,footer:null,destroyOnClose:true,title:this.props.messageexit,centered:true,visible:this.props.messageexitol===undefined?false:this.props.messageexitol,width:'480px'},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:'task-popup-content'},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:'task-popup-text-center font-14'},this.props.exitintpermessages)),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:'task-popup-submit clearfix'},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('a',{className:'pop_close task-btn mb10 mr40 colorFFF',onClick:function onClick(){return _this2.props.Exittheteam(false);}},'\u53D6\u6D88'),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('a',{className:'task-btn task-btn-orange fr',onClick:function onClick(){return _this2.props.Exittheteam(true);}},'\u786E\u5B9A')));}}]);return ExittheteamModel;}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);/* harmony default export */ __webpack_exports__["a"] = (ExittheteamModel);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 837:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony default export */ __webpack_exports__["a"] = ({
|
|
|
|
|
ZERO: 48,
|
|
|
|
|
NINE: 57,
|
|
|
|
|
|
|
|
|
|
NUMPAD_ZERO: 96,
|
|
|
|
|
NUMPAD_NINE: 105,
|
|
|
|
|
|
|
|
|
|
BACKSPACE: 8,
|
|
|
|
|
DELETE: 46,
|
|
|
|
|
ENTER: 13,
|
|
|
|
|
|
|
|
|
|
ARROW_UP: 38,
|
|
|
|
|
ARROW_DOWN: 40
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 838:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var _createReactContext = _interopRequireDefault(__webpack_require__(294));
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
var MenuContext = (0, _createReactContext["default"])({
|
|
|
|
|
inlineCollapsed: false
|
|
|
|
|
});
|
|
|
|
|
var _default = MenuContext;
|
|
|
|
|
exports["default"] = _default;
|
|
|
|
|
//# sourceMappingURL=MenuContext.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 848:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__webpack_require__(27);
|
|
|
|
|
|
|
|
|
|
__webpack_require__(901);
|
|
|
|
|
|
|
|
|
|
__webpack_require__(298);
|
|
|
|
|
//# sourceMappingURL=css.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 849:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var _Pagination = _interopRequireDefault(__webpack_require__(911));
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
var _default = _Pagination["default"];
|
|
|
|
|
exports["default"] = _default;
|
|
|
|
|
//# sourceMappingURL=index.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 857:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = exports.SiderContext = void 0;
|
|
|
|
|
|
|
|
|
|
var _createReactContext = _interopRequireDefault(__webpack_require__(294));
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var _reactLifecyclesCompat = __webpack_require__(7);
|
|
|
|
|
|
|
|
|
|
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
|
|
|
|
|
|
|
|
|
var _omit = _interopRequireDefault(__webpack_require__(43));
|
|
|
|
|
|
|
|
|
|
var _layout = __webpack_require__(933);
|
|
|
|
|
|
|
|
|
|
var _configProvider = __webpack_require__(9);
|
|
|
|
|
|
|
|
|
|
var _icon = _interopRequireDefault(__webpack_require__(25));
|
|
|
|
|
|
|
|
|
|
var _isNumeric = _interopRequireDefault(__webpack_require__(939));
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
|
|
|
|
|
for (var p in s) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
|
|
}
|
|
|
|
|
return t;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// matchMedia polyfill for
|
|
|
|
|
// https://github.com/WickyNilliams/enquire.js/issues/82
|
|
|
|
|
// TODO: Will be removed in antd 4.0 because we will no longer support ie9
|
|
|
|
|
if (typeof window !== 'undefined') {
|
|
|
|
|
var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) {
|
|
|
|
|
return {
|
|
|
|
|
media: mediaQuery,
|
|
|
|
|
matches: false,
|
|
|
|
|
addListener: function addListener() {},
|
|
|
|
|
removeListener: function removeListener() {}
|
|
|
|
|
};
|
|
|
|
|
}; // ref: https://github.com/ant-design/ant-design/issues/18774
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!window.matchMedia) window.matchMedia = matchMediaPolyfill;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var dimensionMaxMap = {
|
|
|
|
|
xs: '479.98px',
|
|
|
|
|
sm: '575.98px',
|
|
|
|
|
md: '767.98px',
|
|
|
|
|
lg: '991.98px',
|
|
|
|
|
xl: '1199.98px',
|
|
|
|
|
xxl: '1599.98px'
|
|
|
|
|
};
|
|
|
|
|
var SiderContext = (0, _createReactContext["default"])({});
|
|
|
|
|
exports.SiderContext = SiderContext;
|
|
|
|
|
|
|
|
|
|
var generateId = function () {
|
|
|
|
|
var i = 0;
|
|
|
|
|
return function () {
|
|
|
|
|
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
|
|
|
i += 1;
|
|
|
|
|
return "".concat(prefix).concat(i);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
|
|
|
|
|
var InternalSider =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(InternalSider, _React$Component);
|
|
|
|
|
|
|
|
|
|
function InternalSider(props) {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, InternalSider);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(InternalSider).call(this, props));
|
|
|
|
|
|
|
|
|
|
_this.responsiveHandler = function (mql) {
|
|
|
|
|
_this.setState({
|
|
|
|
|
below: mql.matches
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var onBreakpoint = _this.props.onBreakpoint;
|
|
|
|
|
|
|
|
|
|
if (onBreakpoint) {
|
|
|
|
|
onBreakpoint(mql.matches);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_this.state.collapsed !== mql.matches) {
|
|
|
|
|
_this.setCollapsed(mql.matches, 'responsive');
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.setCollapsed = function (collapsed, type) {
|
|
|
|
|
if (!('collapsed' in _this.props)) {
|
|
|
|
|
_this.setState({
|
|
|
|
|
collapsed: collapsed
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var onCollapse = _this.props.onCollapse;
|
|
|
|
|
|
|
|
|
|
if (onCollapse) {
|
|
|
|
|
onCollapse(collapsed, type);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.toggle = function () {
|
|
|
|
|
var collapsed = !_this.state.collapsed;
|
|
|
|
|
|
|
|
|
|
_this.setCollapsed(collapsed, 'clickTrigger');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.belowShowChange = function () {
|
|
|
|
|
_this.setState(function (_ref) {
|
|
|
|
|
var belowShow = _ref.belowShow;
|
|
|
|
|
return {
|
|
|
|
|
belowShow: !belowShow
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.renderSider = function (_ref2) {
|
|
|
|
|
var _classNames;
|
|
|
|
|
|
|
|
|
|
var getPrefixCls = _ref2.getPrefixCls;
|
|
|
|
|
|
|
|
|
|
var _a = _this.props,
|
|
|
|
|
customizePrefixCls = _a.prefixCls,
|
|
|
|
|
className = _a.className,
|
|
|
|
|
theme = _a.theme,
|
|
|
|
|
collapsible = _a.collapsible,
|
|
|
|
|
reverseArrow = _a.reverseArrow,
|
|
|
|
|
trigger = _a.trigger,
|
|
|
|
|
style = _a.style,
|
|
|
|
|
width = _a.width,
|
|
|
|
|
collapsedWidth = _a.collapsedWidth,
|
|
|
|
|
zeroWidthTriggerStyle = _a.zeroWidthTriggerStyle,
|
|
|
|
|
others = __rest(_a, ["prefixCls", "className", "theme", "collapsible", "reverseArrow", "trigger", "style", "width", "collapsedWidth", "zeroWidthTriggerStyle"]);
|
|
|
|
|
|
|
|
|
|
var prefixCls = getPrefixCls('layout-sider', customizePrefixCls);
|
|
|
|
|
var divProps = (0, _omit["default"])(others, ['collapsed', 'defaultCollapsed', 'onCollapse', 'breakpoint', 'onBreakpoint', 'siderHook', 'zeroWidthTriggerStyle']);
|
|
|
|
|
var rawWidth = _this.state.collapsed ? collapsedWidth : width; // use "px" as fallback unit for width
|
|
|
|
|
|
|
|
|
|
var siderWidth = (0, _isNumeric["default"])(rawWidth) ? "".concat(rawWidth, "px") : String(rawWidth); // special trigger when collapsedWidth == 0
|
|
|
|
|
|
|
|
|
|
var zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? React.createElement("span", {
|
|
|
|
|
onClick: _this.toggle,
|
|
|
|
|
className: "".concat(prefixCls, "-zero-width-trigger ").concat(prefixCls, "-zero-width-trigger-").concat(reverseArrow ? 'right' : 'left'),
|
|
|
|
|
style: zeroWidthTriggerStyle
|
|
|
|
|
}, React.createElement(_icon["default"], {
|
|
|
|
|
type: "bars"
|
|
|
|
|
})) : null;
|
|
|
|
|
var iconObj = {
|
|
|
|
|
expanded: reverseArrow ? React.createElement(_icon["default"], {
|
|
|
|
|
type: "right"
|
|
|
|
|
}) : React.createElement(_icon["default"], {
|
|
|
|
|
type: "left"
|
|
|
|
|
}),
|
|
|
|
|
collapsed: reverseArrow ? React.createElement(_icon["default"], {
|
|
|
|
|
type: "left"
|
|
|
|
|
}) : React.createElement(_icon["default"], {
|
|
|
|
|
type: "right"
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
var status = _this.state.collapsed ? 'collapsed' : 'expanded';
|
|
|
|
|
var defaultTrigger = iconObj[status];
|
|
|
|
|
var triggerDom = trigger !== null ? zeroWidthTrigger || React.createElement("div", {
|
|
|
|
|
className: "".concat(prefixCls, "-trigger"),
|
|
|
|
|
onClick: _this.toggle,
|
|
|
|
|
style: {
|
|
|
|
|
width: siderWidth
|
|
|
|
|
}
|
|
|
|
|
}, trigger || defaultTrigger) : null;
|
|
|
|
|
|
|
|
|
|
var divStyle = _extends(_extends({}, style), {
|
|
|
|
|
flex: "0 0 ".concat(siderWidth),
|
|
|
|
|
maxWidth: siderWidth,
|
|
|
|
|
minWidth: siderWidth,
|
|
|
|
|
width: siderWidth
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var siderCls = (0, _classnames["default"])(className, prefixCls, "".concat(prefixCls, "-").concat(theme), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-collapsed"), !!_this.state.collapsed), _defineProperty(_classNames, "".concat(prefixCls, "-has-trigger"), collapsible && trigger !== null && !zeroWidthTrigger), _defineProperty(_classNames, "".concat(prefixCls, "-below"), !!_this.state.below), _defineProperty(_classNames, "".concat(prefixCls, "-zero-width"), parseFloat(siderWidth) === 0), _classNames));
|
|
|
|
|
return React.createElement("aside", _extends({
|
|
|
|
|
className: siderCls
|
|
|
|
|
}, divProps, {
|
|
|
|
|
style: divStyle
|
|
|
|
|
}), React.createElement("div", {
|
|
|
|
|
className: "".concat(prefixCls, "-children")
|
|
|
|
|
}, _this.props.children), collapsible || _this.state.below && zeroWidthTrigger ? triggerDom : null);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.uniqueId = generateId('ant-sider-');
|
|
|
|
|
var matchMedia;
|
|
|
|
|
|
|
|
|
|
if (typeof window !== 'undefined') {
|
|
|
|
|
matchMedia = window.matchMedia;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (matchMedia && props.breakpoint && props.breakpoint in dimensionMaxMap) {
|
|
|
|
|
_this.mql = matchMedia("(max-width: ".concat(dimensionMaxMap[props.breakpoint], ")"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var collapsed;
|
|
|
|
|
|
|
|
|
|
if ('collapsed' in props) {
|
|
|
|
|
collapsed = props.collapsed;
|
|
|
|
|
} else {
|
|
|
|
|
collapsed = props.defaultCollapsed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_this.state = {
|
|
|
|
|
collapsed: collapsed,
|
|
|
|
|
below: false
|
|
|
|
|
};
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(InternalSider, [{
|
|
|
|
|
key: "componentDidMount",
|
|
|
|
|
value: function componentDidMount() {
|
|
|
|
|
if (this.mql) {
|
|
|
|
|
this.mql.addListener(this.responsiveHandler);
|
|
|
|
|
this.responsiveHandler(this.mql);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.props.siderHook) {
|
|
|
|
|
this.props.siderHook.addSider(this.uniqueId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "componentWillUnmount",
|
|
|
|
|
value: function componentWillUnmount() {
|
|
|
|
|
if (this.mql) {
|
|
|
|
|
this.mql.removeListener(this.responsiveHandler);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.props.siderHook) {
|
|
|
|
|
this.props.siderHook.removeSider(this.uniqueId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
var collapsed = this.state.collapsed;
|
|
|
|
|
var collapsedWidth = this.props.collapsedWidth;
|
|
|
|
|
return React.createElement(SiderContext.Provider, {
|
|
|
|
|
value: {
|
|
|
|
|
siderCollapsed: collapsed,
|
|
|
|
|
collapsedWidth: collapsedWidth
|
|
|
|
|
}
|
|
|
|
|
}, React.createElement(_configProvider.ConfigConsumer, null, this.renderSider));
|
|
|
|
|
}
|
|
|
|
|
}], [{
|
|
|
|
|
key: "getDerivedStateFromProps",
|
|
|
|
|
value: function getDerivedStateFromProps(nextProps) {
|
|
|
|
|
if ('collapsed' in nextProps) {
|
|
|
|
|
return {
|
|
|
|
|
collapsed: nextProps.collapsed
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return InternalSider;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
InternalSider.defaultProps = {
|
|
|
|
|
collapsible: false,
|
|
|
|
|
defaultCollapsed: false,
|
|
|
|
|
reverseArrow: false,
|
|
|
|
|
width: 200,
|
|
|
|
|
collapsedWidth: 80,
|
|
|
|
|
style: {},
|
|
|
|
|
theme: 'dark'
|
|
|
|
|
};
|
|
|
|
|
(0, _reactLifecyclesCompat.polyfill)(InternalSider); // eslint-disable-next-line react/prefer-stateless-function
|
|
|
|
|
|
|
|
|
|
var Sider =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component2) {
|
|
|
|
|
_inherits(Sider, _React$Component2);
|
|
|
|
|
|
|
|
|
|
function Sider() {
|
|
|
|
|
_classCallCheck(this, Sider);
|
|
|
|
|
|
|
|
|
|
return _possibleConstructorReturn(this, _getPrototypeOf(Sider).apply(this, arguments));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(Sider, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
var _this2 = this;
|
|
|
|
|
|
|
|
|
|
return React.createElement(_layout.LayoutContext.Consumer, null, function (context) {
|
|
|
|
|
return React.createElement(InternalSider, _extends({}, context, _this2.props));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return Sider;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = Sider;
|
|
|
|
|
//# sourceMappingURL=Sider.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 860:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Pagination__ = __webpack_require__(903);
|
|
|
|
|
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__Pagination__["a"]; });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 862:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var _rcMenu = _interopRequireWildcard(__webpack_require__(167));
|
|
|
|
|
|
|
|
|
|
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
|
|
|
|
|
|
|
|
|
var _omit = _interopRequireDefault(__webpack_require__(43));
|
|
|
|
|
|
|
|
|
|
var _reactLifecyclesCompat = __webpack_require__(7);
|
|
|
|
|
|
|
|
|
|
var _SubMenu = _interopRequireDefault(__webpack_require__(954));
|
|
|
|
|
|
|
|
|
|
var _MenuItem = _interopRequireDefault(__webpack_require__(955));
|
|
|
|
|
|
|
|
|
|
var _configProvider = __webpack_require__(9);
|
|
|
|
|
|
|
|
|
|
var _warning = _interopRequireDefault(__webpack_require__(40));
|
|
|
|
|
|
|
|
|
|
var _Sider = __webpack_require__(857);
|
|
|
|
|
|
|
|
|
|
var _raf = _interopRequireDefault(__webpack_require__(175));
|
|
|
|
|
|
|
|
|
|
var _motion = _interopRequireDefault(__webpack_require__(929));
|
|
|
|
|
|
|
|
|
|
var _MenuContext = _interopRequireDefault(__webpack_require__(838));
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var InternalMenu =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(InternalMenu, _React$Component);
|
|
|
|
|
|
|
|
|
|
function InternalMenu(props) {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, InternalMenu);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(InternalMenu).call(this, props)); // Restore vertical mode when menu is collapsed responsively when mounted
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/13104
|
|
|
|
|
// TODO: not a perfect solution, looking a new way to avoid setting switchingModeFromInline in this situation
|
|
|
|
|
|
|
|
|
|
_this.handleMouseEnter = function (e) {
|
|
|
|
|
_this.restoreModeVerticalFromInline();
|
|
|
|
|
|
|
|
|
|
var onMouseEnter = _this.props.onMouseEnter;
|
|
|
|
|
|
|
|
|
|
if (onMouseEnter) {
|
|
|
|
|
onMouseEnter(e);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.handleTransitionEnd = function (e) {
|
|
|
|
|
// when inlineCollapsed menu width animation finished
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/12864
|
|
|
|
|
var widthCollapsed = e.propertyName === 'width' && e.target === e.currentTarget; // Fix SVGElement e.target.className.indexOf is not a function
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/15699
|
|
|
|
|
|
|
|
|
|
var className = e.target.className; // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during an animation.
|
|
|
|
|
|
|
|
|
|
var classNameValue = Object.prototype.toString.call(className) === '[object SVGAnimatedString]' ? className.animVal : className; // Fix for <Menu style={{ width: '100%' }} />, the width transition won't trigger when menu is collapsed
|
|
|
|
|
// https://github.com/ant-design/ant-design-pro/issues/2783
|
|
|
|
|
|
|
|
|
|
var iconScaled = e.propertyName === 'font-size' && classNameValue.indexOf('anticon') >= 0;
|
|
|
|
|
|
|
|
|
|
if (widthCollapsed || iconScaled) {
|
|
|
|
|
_this.restoreModeVerticalFromInline();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.handleClick = function (e) {
|
|
|
|
|
_this.handleOpenChange([]);
|
|
|
|
|
|
|
|
|
|
var onClick = _this.props.onClick;
|
|
|
|
|
|
|
|
|
|
if (onClick) {
|
|
|
|
|
onClick(e);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.handleOpenChange = function (openKeys) {
|
|
|
|
|
_this.setOpenKeys(openKeys);
|
|
|
|
|
|
|
|
|
|
var onOpenChange = _this.props.onOpenChange;
|
|
|
|
|
|
|
|
|
|
if (onOpenChange) {
|
|
|
|
|
onOpenChange(openKeys);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.renderMenu = function (_ref) {
|
|
|
|
|
var getPopupContainer = _ref.getPopupContainer,
|
|
|
|
|
getPrefixCls = _ref.getPrefixCls;
|
|
|
|
|
var _this$props = _this.props,
|
|
|
|
|
customizePrefixCls = _this$props.prefixCls,
|
|
|
|
|
className = _this$props.className,
|
|
|
|
|
theme = _this$props.theme,
|
|
|
|
|
collapsedWidth = _this$props.collapsedWidth;
|
|
|
|
|
var passProps = (0, _omit["default"])(_this.props, ['collapsedWidth', 'siderCollapsed']);
|
|
|
|
|
|
|
|
|
|
var menuMode = _this.getRealMenuMode();
|
|
|
|
|
|
|
|
|
|
var menuOpenMotion = _this.getOpenMotionProps(menuMode);
|
|
|
|
|
|
|
|
|
|
var prefixCls = getPrefixCls('menu', customizePrefixCls);
|
|
|
|
|
var menuClassName = (0, _classnames["default"])(className, "".concat(prefixCls, "-").concat(theme), _defineProperty({}, "".concat(prefixCls, "-inline-collapsed"), _this.getInlineCollapsed()));
|
|
|
|
|
|
|
|
|
|
var menuProps = _extends({
|
|
|
|
|
openKeys: _this.state.openKeys,
|
|
|
|
|
onOpenChange: _this.handleOpenChange,
|
|
|
|
|
className: menuClassName,
|
|
|
|
|
mode: menuMode
|
|
|
|
|
}, menuOpenMotion);
|
|
|
|
|
|
|
|
|
|
if (menuMode !== 'inline') {
|
|
|
|
|
// closing vertical popup submenu after click it
|
|
|
|
|
menuProps.onClick = _this.handleClick;
|
|
|
|
|
} // https://github.com/ant-design/ant-design/issues/8587
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var hideMenu = _this.getInlineCollapsed() && (collapsedWidth === 0 || collapsedWidth === '0' || collapsedWidth === '0px');
|
|
|
|
|
|
|
|
|
|
if (hideMenu) {
|
|
|
|
|
menuProps.openKeys = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return React.createElement(_rcMenu["default"], _extends({
|
|
|
|
|
getPopupContainer: getPopupContainer
|
|
|
|
|
}, passProps, menuProps, {
|
|
|
|
|
prefixCls: prefixCls,
|
|
|
|
|
onTransitionEnd: _this.handleTransitionEnd,
|
|
|
|
|
onMouseEnter: _this.handleMouseEnter
|
|
|
|
|
}));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
(0, _warning["default"])(!('onOpen' in props || 'onClose' in props), 'Menu', '`onOpen` and `onClose` are removed, please use `onOpenChange` instead, ' + 'see: https://u.ant.design/menu-on-open-change.');
|
|
|
|
|
(0, _warning["default"])(!('inlineCollapsed' in props && props.mode !== 'inline'), 'Menu', '`inlineCollapsed` should only be used when `mode` is inline.');
|
|
|
|
|
(0, _warning["default"])(!(props.siderCollapsed !== undefined && 'inlineCollapsed' in props), 'Menu', '`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.');
|
|
|
|
|
var openKeys;
|
|
|
|
|
|
|
|
|
|
if ('openKeys' in props) {
|
|
|
|
|
openKeys = props.openKeys;
|
|
|
|
|
} else if ('defaultOpenKeys' in props) {
|
|
|
|
|
openKeys = props.defaultOpenKeys;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_this.state = {
|
|
|
|
|
openKeys: openKeys || [],
|
|
|
|
|
switchingModeFromInline: false,
|
|
|
|
|
inlineOpenKeys: [],
|
|
|
|
|
prevProps: props
|
|
|
|
|
};
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(InternalMenu, [{
|
|
|
|
|
key: "componentWillUnmount",
|
|
|
|
|
value: function componentWillUnmount() {
|
|
|
|
|
_raf["default"].cancel(this.mountRafId);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "setOpenKeys",
|
|
|
|
|
value: function setOpenKeys(openKeys) {
|
|
|
|
|
if (!('openKeys' in this.props)) {
|
|
|
|
|
this.setState({
|
|
|
|
|
openKeys: openKeys
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "getRealMenuMode",
|
|
|
|
|
value: function getRealMenuMode() {
|
|
|
|
|
var inlineCollapsed = this.getInlineCollapsed();
|
|
|
|
|
|
|
|
|
|
if (this.state.switchingModeFromInline && inlineCollapsed) {
|
|
|
|
|
return 'inline';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var mode = this.props.mode;
|
|
|
|
|
return inlineCollapsed ? 'vertical' : mode;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "getInlineCollapsed",
|
|
|
|
|
value: function getInlineCollapsed() {
|
|
|
|
|
var inlineCollapsed = this.props.inlineCollapsed;
|
|
|
|
|
|
|
|
|
|
if (this.props.siderCollapsed !== undefined) {
|
|
|
|
|
return this.props.siderCollapsed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return inlineCollapsed;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "getOpenMotionProps",
|
|
|
|
|
value: function getOpenMotionProps(menuMode) {
|
|
|
|
|
var _this$props2 = this.props,
|
|
|
|
|
openTransitionName = _this$props2.openTransitionName,
|
|
|
|
|
openAnimation = _this$props2.openAnimation,
|
|
|
|
|
motion = _this$props2.motion; // Provides by user
|
|
|
|
|
|
|
|
|
|
if (motion) {
|
|
|
|
|
return {
|
|
|
|
|
motion: motion
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (openAnimation) {
|
|
|
|
|
(0, _warning["default"])(typeof openAnimation === 'string', 'Menu', '`openAnimation` do not support object. Please use `motion` instead.');
|
|
|
|
|
return {
|
|
|
|
|
openAnimation: openAnimation
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (openTransitionName) {
|
|
|
|
|
return {
|
|
|
|
|
openTransitionName: openTransitionName
|
|
|
|
|
};
|
|
|
|
|
} // Default logic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (menuMode === 'horizontal') {
|
|
|
|
|
return {
|
|
|
|
|
motion: {
|
|
|
|
|
motionName: 'slide-up'
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (menuMode === 'inline') {
|
|
|
|
|
return {
|
|
|
|
|
motion: _motion["default"]
|
|
|
|
|
};
|
|
|
|
|
} // When mode switch from inline
|
|
|
|
|
// submenu should hide without animation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
motion: {
|
|
|
|
|
motionName: this.state.switchingModeFromInline ? '' : 'zoom-big'
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "restoreModeVerticalFromInline",
|
|
|
|
|
value: function restoreModeVerticalFromInline() {
|
|
|
|
|
var switchingModeFromInline = this.state.switchingModeFromInline;
|
|
|
|
|
|
|
|
|
|
if (switchingModeFromInline) {
|
|
|
|
|
this.setState({
|
|
|
|
|
switchingModeFromInline: false
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_MenuContext["default"].Provider, {
|
|
|
|
|
value: {
|
|
|
|
|
inlineCollapsed: this.getInlineCollapsed() || false,
|
|
|
|
|
antdMenuTheme: this.props.theme
|
|
|
|
|
}
|
|
|
|
|
}, React.createElement(_configProvider.ConfigConsumer, null, this.renderMenu));
|
|
|
|
|
}
|
|
|
|
|
}], [{
|
|
|
|
|
key: "getDerivedStateFromProps",
|
|
|
|
|
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
|
|
|
var prevProps = prevState.prevProps;
|
|
|
|
|
var newState = {
|
|
|
|
|
prevProps: nextProps
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (prevProps.mode === 'inline' && nextProps.mode !== 'inline') {
|
|
|
|
|
newState.switchingModeFromInline = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ('openKeys' in nextProps) {
|
|
|
|
|
newState.openKeys = nextProps.openKeys;
|
|
|
|
|
} else {
|
|
|
|
|
// [Legacy] Old code will return after `openKeys` changed.
|
|
|
|
|
// Not sure the reason, we should keep this logic still.
|
|
|
|
|
if (nextProps.inlineCollapsed && !prevProps.inlineCollapsed || nextProps.siderCollapsed && !prevProps.siderCollapsed) {
|
|
|
|
|
newState.switchingModeFromInline = true;
|
|
|
|
|
newState.inlineOpenKeys = prevState.openKeys;
|
|
|
|
|
newState.openKeys = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!nextProps.inlineCollapsed && prevProps.inlineCollapsed || !nextProps.siderCollapsed && prevProps.siderCollapsed) {
|
|
|
|
|
newState.openKeys = prevState.inlineOpenKeys;
|
|
|
|
|
newState.inlineOpenKeys = [];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return newState;
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return InternalMenu;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
InternalMenu.defaultProps = {
|
|
|
|
|
className: '',
|
|
|
|
|
theme: 'light',
|
|
|
|
|
focusable: false
|
|
|
|
|
};
|
|
|
|
|
(0, _reactLifecyclesCompat.polyfill)(InternalMenu); // We should keep this as ref-able
|
|
|
|
|
|
|
|
|
|
var Menu =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component2) {
|
|
|
|
|
_inherits(Menu, _React$Component2);
|
|
|
|
|
|
|
|
|
|
function Menu() {
|
|
|
|
|
_classCallCheck(this, Menu);
|
|
|
|
|
|
|
|
|
|
return _possibleConstructorReturn(this, _getPrototypeOf(Menu).apply(this, arguments));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(Menu, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
var _this2 = this;
|
|
|
|
|
|
|
|
|
|
return React.createElement(_Sider.SiderContext.Consumer, null, function (context) {
|
|
|
|
|
return React.createElement(InternalMenu, _extends({}, _this2.props, context));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return Menu;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = Menu;
|
|
|
|
|
Menu.Divider = _rcMenu.Divider;
|
|
|
|
|
Menu.Item = _MenuItem["default"];
|
|
|
|
|
Menu.SubMenu = _SubMenu["default"];
|
|
|
|
|
Menu.ItemGroup = _rcMenu.ItemGroup;
|
|
|
|
|
//# sourceMappingURL=index.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 865:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var _rcDropdown = _interopRequireDefault(__webpack_require__(1038));
|
|
|
|
|
|
|
|
|
|
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
|
|
|
|
|
|
|
|
|
var _configProvider = __webpack_require__(9);
|
|
|
|
|
|
|
|
|
|
var _warning = _interopRequireDefault(__webpack_require__(40));
|
|
|
|
|
|
|
|
|
|
var _icon = _interopRequireDefault(__webpack_require__(25));
|
|
|
|
|
|
|
|
|
|
var _type = __webpack_require__(69);
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var Placements = (0, _type.tuple)('topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight');
|
|
|
|
|
|
|
|
|
|
var Dropdown =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(Dropdown, _React$Component);
|
|
|
|
|
|
|
|
|
|
function Dropdown() {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, Dropdown);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(Dropdown).apply(this, arguments));
|
|
|
|
|
|
|
|
|
|
_this.renderOverlay = function (prefixCls) {
|
|
|
|
|
// rc-dropdown already can process the function of overlay, but we have check logic here.
|
|
|
|
|
// So we need render the element to check and pass back to rc-dropdown.
|
|
|
|
|
var overlay = _this.props.overlay;
|
|
|
|
|
var overlayNode;
|
|
|
|
|
|
|
|
|
|
if (typeof overlay === 'function') {
|
|
|
|
|
overlayNode = overlay();
|
|
|
|
|
} else {
|
|
|
|
|
overlayNode = overlay;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
overlayNode = React.Children.only(overlayNode);
|
|
|
|
|
var overlayProps = overlayNode.props; // Warning if use other mode
|
|
|
|
|
|
|
|
|
|
(0, _warning["default"])(!overlayProps.mode || overlayProps.mode === 'vertical', 'Dropdown', "mode=\"".concat(overlayProps.mode, "\" is not supported for Dropdown's Menu.")); // menu cannot be selectable in dropdown defaultly
|
|
|
|
|
// menu should be focusable in dropdown defaultly
|
|
|
|
|
|
|
|
|
|
var _overlayProps$selecta = overlayProps.selectable,
|
|
|
|
|
selectable = _overlayProps$selecta === void 0 ? false : _overlayProps$selecta,
|
|
|
|
|
_overlayProps$focusab = overlayProps.focusable,
|
|
|
|
|
focusable = _overlayProps$focusab === void 0 ? true : _overlayProps$focusab;
|
|
|
|
|
var expandIcon = React.createElement("span", {
|
|
|
|
|
className: "".concat(prefixCls, "-menu-submenu-arrow")
|
|
|
|
|
}, React.createElement(_icon["default"], {
|
|
|
|
|
type: "right",
|
|
|
|
|
className: "".concat(prefixCls, "-menu-submenu-arrow-icon")
|
|
|
|
|
}));
|
|
|
|
|
var fixedModeOverlay = typeof overlayNode.type === 'string' ? overlay : React.cloneElement(overlayNode, {
|
|
|
|
|
mode: 'vertical',
|
|
|
|
|
selectable: selectable,
|
|
|
|
|
focusable: focusable,
|
|
|
|
|
expandIcon: expandIcon
|
|
|
|
|
});
|
|
|
|
|
return fixedModeOverlay;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.renderDropDown = function (_ref) {
|
|
|
|
|
var getContextPopupContainer = _ref.getPopupContainer,
|
|
|
|
|
getPrefixCls = _ref.getPrefixCls;
|
|
|
|
|
var _this$props = _this.props,
|
|
|
|
|
customizePrefixCls = _this$props.prefixCls,
|
|
|
|
|
children = _this$props.children,
|
|
|
|
|
trigger = _this$props.trigger,
|
|
|
|
|
disabled = _this$props.disabled,
|
|
|
|
|
getPopupContainer = _this$props.getPopupContainer;
|
|
|
|
|
var prefixCls = getPrefixCls('dropdown', customizePrefixCls);
|
|
|
|
|
var child = React.Children.only(children);
|
|
|
|
|
var dropdownTrigger = React.cloneElement(child, {
|
|
|
|
|
className: (0, _classnames["default"])(child.props.className, "".concat(prefixCls, "-trigger")),
|
|
|
|
|
disabled: disabled
|
|
|
|
|
});
|
|
|
|
|
var triggerActions = disabled ? [] : trigger;
|
|
|
|
|
var alignPoint;
|
|
|
|
|
|
|
|
|
|
if (triggerActions && triggerActions.indexOf('contextMenu') !== -1) {
|
|
|
|
|
alignPoint = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return React.createElement(_rcDropdown["default"], _extends({
|
|
|
|
|
alignPoint: alignPoint
|
|
|
|
|
}, _this.props, {
|
|
|
|
|
prefixCls: prefixCls,
|
|
|
|
|
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
|
|
|
|
transitionName: _this.getTransitionName(),
|
|
|
|
|
trigger: triggerActions,
|
|
|
|
|
overlay: function overlay() {
|
|
|
|
|
return _this.renderOverlay(prefixCls);
|
|
|
|
|
}
|
|
|
|
|
}), dropdownTrigger);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(Dropdown, [{
|
|
|
|
|
key: "getTransitionName",
|
|
|
|
|
value: function getTransitionName() {
|
|
|
|
|
var _this$props2 = this.props,
|
|
|
|
|
_this$props2$placemen = _this$props2.placement,
|
|
|
|
|
placement = _this$props2$placemen === void 0 ? '' : _this$props2$placemen,
|
|
|
|
|
transitionName = _this$props2.transitionName;
|
|
|
|
|
|
|
|
|
|
if (transitionName !== undefined) {
|
|
|
|
|
return transitionName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (placement.indexOf('top') >= 0) {
|
|
|
|
|
return 'slide-down';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 'slide-up';
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_configProvider.ConfigConsumer, null, this.renderDropDown);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return Dropdown;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = Dropdown;
|
|
|
|
|
Dropdown.defaultProps = {
|
|
|
|
|
mouseEnterDelay: 0.15,
|
|
|
|
|
mouseLeaveDelay: 0.1,
|
|
|
|
|
placement: 'bottomLeft'
|
|
|
|
|
};
|
|
|
|
|
//# sourceMappingURL=dropdown.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 901:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
|
|
|
|
|
|
|
|
// load the styles
|
|
|
|
|
var content = __webpack_require__(910);
|
|
|
|
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
|
|
|
// Prepare cssTransformation
|
|
|
|
|
var transform;
|
|
|
|
|
|
|
|
|
|
var options = {"hmr":false}
|
|
|
|
|
options.transform = transform
|
|
|
|
|
// add the styles to the DOM
|
|
|
|
|
var update = __webpack_require__(291)(content, options);
|
|
|
|
|
if(content.locals) module.exports = content.locals;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 903:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(66);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(26);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(11);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(44);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(13);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(14);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames__ = __webpack_require__(3);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_classnames__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(1);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Pager__ = __webpack_require__(904);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Options__ = __webpack_require__(905);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__KeyCode__ = __webpack_require__(837);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__locale_zh_CN__ = __webpack_require__(906);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_react_lifecycles_compat__ = __webpack_require__(7);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function noop() {}
|
|
|
|
|
|
|
|
|
|
function isInteger(value) {
|
|
|
|
|
return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function defaultItemRender(page, type, element) {
|
|
|
|
|
return element;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function calculatePage(p, state, props) {
|
|
|
|
|
var pageSize = p;
|
|
|
|
|
if (typeof pageSize === 'undefined') {
|
|
|
|
|
pageSize = state.pageSize;
|
|
|
|
|
}
|
|
|
|
|
return Math.floor((props.total - 1) / pageSize) + 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var Pagination = function (_React$Component) {
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Pagination, _React$Component);
|
|
|
|
|
|
|
|
|
|
function Pagination(props) {
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Pagination);
|
|
|
|
|
|
|
|
|
|
var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).call(this, props));
|
|
|
|
|
|
|
|
|
|
_initialiseProps.call(_this);
|
|
|
|
|
|
|
|
|
|
var hasOnChange = props.onChange !== noop;
|
|
|
|
|
var hasCurrent = 'current' in props;
|
|
|
|
|
if (hasCurrent && !hasOnChange) {
|
|
|
|
|
console.warn('Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.'); // eslint-disable-line
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var current = props.defaultCurrent;
|
|
|
|
|
if ('current' in props) {
|
|
|
|
|
current = props.current;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var pageSize = props.defaultPageSize;
|
|
|
|
|
if ('pageSize' in props) {
|
|
|
|
|
pageSize = props.pageSize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_this.state = {
|
|
|
|
|
current: current,
|
|
|
|
|
currentInputValue: current,
|
|
|
|
|
pageSize: pageSize
|
|
|
|
|
};
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(Pagination, [{
|
|
|
|
|
key: 'componentDidUpdate',
|
|
|
|
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
|
|
|
// When current page change, fix focused style of prev item
|
|
|
|
|
// A hacky solution of https://github.com/ant-design/ant-design/issues/8948
|
|
|
|
|
var prefixCls = this.props.prefixCls;
|
|
|
|
|
|
|
|
|
|
if (prevState.current !== this.state.current && this.paginationNode) {
|
|
|
|
|
var lastCurrentNode = this.paginationNode.querySelector('.' + prefixCls + '-item-' + prevState.current);
|
|
|
|
|
if (lastCurrentNode && document.activeElement === lastCurrentNode) {
|
|
|
|
|
lastCurrentNode.blur();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'getValidValue',
|
|
|
|
|
value: function getValidValue(e) {
|
|
|
|
|
var inputValue = e.target.value;
|
|
|
|
|
var currentInputValue = this.state.currentInputValue;
|
|
|
|
|
|
|
|
|
|
var value = void 0;
|
|
|
|
|
if (inputValue === '') {
|
|
|
|
|
value = inputValue;
|
|
|
|
|
} else if (isNaN(Number(inputValue))) {
|
|
|
|
|
value = currentInputValue;
|
|
|
|
|
} else {
|
|
|
|
|
value = Number(inputValue);
|
|
|
|
|
}
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'render',
|
|
|
|
|
value: function render() {
|
|
|
|
|
var _props = this.props,
|
|
|
|
|
prefixCls = _props.prefixCls,
|
|
|
|
|
className = _props.className,
|
|
|
|
|
disabled = _props.disabled;
|
|
|
|
|
|
|
|
|
|
// When hideOnSinglePage is true and there is only 1 page, hide the pager
|
|
|
|
|
|
|
|
|
|
if (this.props.hideOnSinglePage === true && this.props.total <= this.state.pageSize) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var props = this.props;
|
|
|
|
|
var locale = props.locale;
|
|
|
|
|
|
|
|
|
|
var allPages = calculatePage(undefined, this.state, this.props);
|
|
|
|
|
var pagerList = [];
|
|
|
|
|
var jumpPrev = null;
|
|
|
|
|
var jumpNext = null;
|
|
|
|
|
var firstPager = null;
|
|
|
|
|
var lastPager = null;
|
|
|
|
|
var gotoButton = null;
|
|
|
|
|
|
|
|
|
|
var goButton = props.showQuickJumper && props.showQuickJumper.goButton;
|
|
|
|
|
var pageBufferSize = props.showLessItems ? 1 : 2;
|
|
|
|
|
var _state = this.state,
|
|
|
|
|
current = _state.current,
|
|
|
|
|
pageSize = _state.pageSize;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var prevPage = current - 1 > 0 ? current - 1 : 0;
|
|
|
|
|
var nextPage = current + 1 < allPages ? current + 1 : allPages;
|
|
|
|
|
|
|
|
|
|
var dataOrAriaAttributeProps = Object.keys(props).reduce(function (prev, key) {
|
|
|
|
|
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {
|
|
|
|
|
prev[key] = props[key];
|
|
|
|
|
}
|
|
|
|
|
return prev;
|
|
|
|
|
}, {});
|
|
|
|
|
|
|
|
|
|
if (props.simple) {
|
|
|
|
|
if (goButton) {
|
|
|
|
|
if (typeof goButton === 'boolean') {
|
|
|
|
|
gotoButton = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'button',
|
|
|
|
|
{
|
|
|
|
|
type: 'button',
|
|
|
|
|
onClick: this.handleGoTO,
|
|
|
|
|
onKeyUp: this.handleGoTO
|
|
|
|
|
},
|
|
|
|
|
locale.jump_to_confirm
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
gotoButton = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'span',
|
|
|
|
|
{
|
|
|
|
|
onClick: this.handleGoTO,
|
|
|
|
|
onKeyUp: this.handleGoTO
|
|
|
|
|
},
|
|
|
|
|
goButton
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
gotoButton = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{
|
|
|
|
|
title: props.showTitle ? '' + locale.jump_to + this.state.current + '/' + allPages : null,
|
|
|
|
|
className: prefixCls + '-simple-pager'
|
|
|
|
|
},
|
|
|
|
|
gotoButton
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'ul',
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({
|
|
|
|
|
className: prefixCls + ' ' + prefixCls + '-simple ' + props.className,
|
|
|
|
|
style: props.style,
|
|
|
|
|
ref: this.savePaginationNode
|
|
|
|
|
}, dataOrAriaAttributeProps),
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{
|
|
|
|
|
title: props.showTitle ? locale.prev_page : null,
|
|
|
|
|
onClick: this.prev,
|
|
|
|
|
tabIndex: this.hasPrev() ? 0 : null,
|
|
|
|
|
onKeyPress: this.runIfEnterPrev,
|
|
|
|
|
className: (this.hasPrev() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev',
|
|
|
|
|
'aria-disabled': !this.hasPrev()
|
|
|
|
|
},
|
|
|
|
|
props.itemRender(prevPage, 'prev', this.getItemIcon(props.prevIcon))
|
|
|
|
|
),
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{
|
|
|
|
|
title: props.showTitle ? this.state.current + '/' + allPages : null,
|
|
|
|
|
className: prefixCls + '-simple-pager'
|
|
|
|
|
},
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('input', {
|
|
|
|
|
type: 'text',
|
|
|
|
|
value: this.state.currentInputValue,
|
|
|
|
|
onKeyDown: this.handleKeyDown,
|
|
|
|
|
onKeyUp: this.handleKeyUp,
|
|
|
|
|
onChange: this.handleKeyUp,
|
|
|
|
|
size: '3'
|
|
|
|
|
}),
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'span',
|
|
|
|
|
{ className: prefixCls + '-slash' },
|
|
|
|
|
'/'
|
|
|
|
|
),
|
|
|
|
|
allPages
|
|
|
|
|
),
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{
|
|
|
|
|
title: props.showTitle ? locale.next_page : null,
|
|
|
|
|
onClick: this.next,
|
|
|
|
|
tabIndex: this.hasPrev() ? 0 : null,
|
|
|
|
|
onKeyPress: this.runIfEnterNext,
|
|
|
|
|
className: (this.hasNext() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next',
|
|
|
|
|
'aria-disabled': !this.hasNext()
|
|
|
|
|
},
|
|
|
|
|
props.itemRender(nextPage, 'next', this.getItemIcon(props.nextIcon))
|
|
|
|
|
),
|
|
|
|
|
gotoButton
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (allPages <= 5 + pageBufferSize * 2) {
|
|
|
|
|
var pagerProps = {
|
|
|
|
|
locale: locale,
|
|
|
|
|
rootPrefixCls: prefixCls,
|
|
|
|
|
onClick: this.handleChange,
|
|
|
|
|
onKeyPress: this.runIfEnter,
|
|
|
|
|
showTitle: props.showTitle,
|
|
|
|
|
itemRender: props.itemRender
|
|
|
|
|
};
|
|
|
|
|
if (!allPages) {
|
|
|
|
|
pagerList.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, pagerProps, {
|
|
|
|
|
key: 'noPager',
|
|
|
|
|
page: allPages,
|
|
|
|
|
className: prefixCls + '-disabled'
|
|
|
|
|
})));
|
|
|
|
|
}
|
|
|
|
|
for (var i = 1; i <= allPages; i++) {
|
|
|
|
|
var active = this.state.current === i;
|
|
|
|
|
pagerList.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, pagerProps, {
|
|
|
|
|
key: i,
|
|
|
|
|
page: i,
|
|
|
|
|
active: active
|
|
|
|
|
})));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
var prevItemTitle = props.showLessItems ? locale.prev_3 : locale.prev_5;
|
|
|
|
|
var nextItemTitle = props.showLessItems ? locale.next_3 : locale.next_5;
|
|
|
|
|
if (props.showPrevNextJumpers) {
|
|
|
|
|
var jumpPrevClassString = prefixCls + '-jump-prev';
|
|
|
|
|
if (props.jumpPrevIcon) {
|
|
|
|
|
jumpPrevClassString += ' ' + prefixCls + '-jump-prev-custom-icon';
|
|
|
|
|
}
|
|
|
|
|
jumpPrev = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{
|
|
|
|
|
title: props.showTitle ? prevItemTitle : null,
|
|
|
|
|
key: 'prev',
|
|
|
|
|
onClick: this.jumpPrev,
|
|
|
|
|
tabIndex: '0',
|
|
|
|
|
onKeyPress: this.runIfEnterJumpPrev,
|
|
|
|
|
className: jumpPrevClassString
|
|
|
|
|
},
|
|
|
|
|
props.itemRender(this.getJumpPrevPage(), 'jump-prev', this.getItemIcon(props.jumpPrevIcon))
|
|
|
|
|
);
|
|
|
|
|
var jumpNextClassString = prefixCls + '-jump-next';
|
|
|
|
|
if (props.jumpNextIcon) {
|
|
|
|
|
jumpNextClassString += ' ' + prefixCls + '-jump-next-custom-icon';
|
|
|
|
|
}
|
|
|
|
|
jumpNext = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{
|
|
|
|
|
title: props.showTitle ? nextItemTitle : null,
|
|
|
|
|
key: 'next',
|
|
|
|
|
tabIndex: '0',
|
|
|
|
|
onClick: this.jumpNext,
|
|
|
|
|
onKeyPress: this.runIfEnterJumpNext,
|
|
|
|
|
className: jumpNextClassString
|
|
|
|
|
},
|
|
|
|
|
props.itemRender(this.getJumpNextPage(), 'jump-next', this.getItemIcon(props.jumpNextIcon))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
lastPager = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], {
|
|
|
|
|
locale: props.locale,
|
|
|
|
|
last: true,
|
|
|
|
|
rootPrefixCls: prefixCls,
|
|
|
|
|
onClick: this.handleChange,
|
|
|
|
|
onKeyPress: this.runIfEnter,
|
|
|
|
|
key: allPages,
|
|
|
|
|
page: allPages,
|
|
|
|
|
active: false,
|
|
|
|
|
showTitle: props.showTitle,
|
|
|
|
|
itemRender: props.itemRender
|
|
|
|
|
});
|
|
|
|
|
firstPager = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], {
|
|
|
|
|
locale: props.locale,
|
|
|
|
|
rootPrefixCls: prefixCls,
|
|
|
|
|
onClick: this.handleChange,
|
|
|
|
|
onKeyPress: this.runIfEnter,
|
|
|
|
|
key: 1,
|
|
|
|
|
page: 1,
|
|
|
|
|
active: false,
|
|
|
|
|
showTitle: props.showTitle,
|
|
|
|
|
itemRender: props.itemRender
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var left = Math.max(1, current - pageBufferSize);
|
|
|
|
|
var right = Math.min(current + pageBufferSize, allPages);
|
|
|
|
|
|
|
|
|
|
if (current - 1 <= pageBufferSize) {
|
|
|
|
|
right = 1 + pageBufferSize * 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (allPages - current <= pageBufferSize) {
|
|
|
|
|
left = allPages - pageBufferSize * 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (var _i = left; _i <= right; _i++) {
|
|
|
|
|
var _active = current === _i;
|
|
|
|
|
pagerList.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], {
|
|
|
|
|
locale: props.locale,
|
|
|
|
|
rootPrefixCls: prefixCls,
|
|
|
|
|
onClick: this.handleChange,
|
|
|
|
|
onKeyPress: this.runIfEnter,
|
|
|
|
|
key: _i,
|
|
|
|
|
page: _i,
|
|
|
|
|
active: _active,
|
|
|
|
|
showTitle: props.showTitle,
|
|
|
|
|
itemRender: props.itemRender
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) {
|
|
|
|
|
pagerList[0] = __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(pagerList[0], {
|
|
|
|
|
className: prefixCls + '-item-after-jump-prev'
|
|
|
|
|
});
|
|
|
|
|
pagerList.unshift(jumpPrev);
|
|
|
|
|
}
|
|
|
|
|
if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) {
|
|
|
|
|
pagerList[pagerList.length - 1] = __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(pagerList[pagerList.length - 1], {
|
|
|
|
|
className: prefixCls + '-item-before-jump-next'
|
|
|
|
|
});
|
|
|
|
|
pagerList.push(jumpNext);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (left !== 1) {
|
|
|
|
|
pagerList.unshift(firstPager);
|
|
|
|
|
}
|
|
|
|
|
if (right !== allPages) {
|
|
|
|
|
pagerList.push(lastPager);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var totalText = null;
|
|
|
|
|
|
|
|
|
|
if (props.showTotal) {
|
|
|
|
|
totalText = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{ className: prefixCls + '-total-text' },
|
|
|
|
|
props.showTotal(props.total, [props.total === 0 ? 0 : (current - 1) * pageSize + 1, current * pageSize > props.total ? props.total : current * pageSize])
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
var prevDisabled = !this.hasPrev() || !allPages;
|
|
|
|
|
var nextDisabled = !this.hasNext() || !allPages;
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'ul',
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({
|
|
|
|
|
className: __WEBPACK_IMPORTED_MODULE_7_classnames___default()(prefixCls, className, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, prefixCls + '-disabled', disabled)),
|
|
|
|
|
style: props.style,
|
|
|
|
|
unselectable: 'unselectable',
|
|
|
|
|
ref: this.savePaginationNode
|
|
|
|
|
}, dataOrAriaAttributeProps),
|
|
|
|
|
totalText,
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{
|
|
|
|
|
title: props.showTitle ? locale.prev_page : null,
|
|
|
|
|
onClick: this.prev,
|
|
|
|
|
tabIndex: prevDisabled ? null : 0,
|
|
|
|
|
onKeyPress: this.runIfEnterPrev,
|
|
|
|
|
className: (!prevDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev',
|
|
|
|
|
'aria-disabled': prevDisabled
|
|
|
|
|
},
|
|
|
|
|
props.itemRender(prevPage, 'prev', this.getItemIcon(props.prevIcon))
|
|
|
|
|
),
|
|
|
|
|
pagerList,
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{
|
|
|
|
|
title: props.showTitle ? locale.next_page : null,
|
|
|
|
|
onClick: this.next,
|
|
|
|
|
tabIndex: nextDisabled ? null : 0,
|
|
|
|
|
onKeyPress: this.runIfEnterNext,
|
|
|
|
|
className: (!nextDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next',
|
|
|
|
|
'aria-disabled': nextDisabled
|
|
|
|
|
},
|
|
|
|
|
props.itemRender(nextPage, 'next', this.getItemIcon(props.nextIcon))
|
|
|
|
|
),
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__Options__["a" /* default */], {
|
|
|
|
|
disabled: disabled,
|
|
|
|
|
locale: props.locale,
|
|
|
|
|
rootPrefixCls: prefixCls,
|
|
|
|
|
selectComponentClass: props.selectComponentClass,
|
|
|
|
|
selectPrefixCls: props.selectPrefixCls,
|
|
|
|
|
changeSize: this.props.showSizeChanger ? this.changePageSize : null,
|
|
|
|
|
current: this.state.current,
|
|
|
|
|
pageSize: this.state.pageSize,
|
|
|
|
|
pageSizeOptions: this.props.pageSizeOptions,
|
|
|
|
|
quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null,
|
|
|
|
|
goButton: goButton
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}], [{
|
|
|
|
|
key: 'getDerivedStateFromProps',
|
|
|
|
|
value: function getDerivedStateFromProps(props, prevState) {
|
|
|
|
|
var newState = {};
|
|
|
|
|
|
|
|
|
|
if ('current' in props) {
|
|
|
|
|
newState.current = props.current;
|
|
|
|
|
|
|
|
|
|
if (props.current !== prevState.current) {
|
|
|
|
|
newState.currentInputValue = newState.current;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ('pageSize' in props && props.pageSize !== prevState.pageSize) {
|
|
|
|
|
var current = prevState.current;
|
|
|
|
|
var newCurrent = calculatePage(props.pageSize, prevState, props);
|
|
|
|
|
current = current > newCurrent ? newCurrent : current;
|
|
|
|
|
|
|
|
|
|
if (!('current' in props)) {
|
|
|
|
|
newState.current = current;
|
|
|
|
|
newState.currentInputValue = current;
|
|
|
|
|
}
|
|
|
|
|
newState.pageSize = props.pageSize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return newState;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* computed icon node that need to be rendered.
|
|
|
|
|
* @param {React.ReactNode | React.ComponentType<PaginationProps>} icon received icon.
|
|
|
|
|
* @returns {React.ReactNode}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return Pagination;
|
|
|
|
|
}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);
|
|
|
|
|
|
|
|
|
|
Pagination.propTypes = {
|
|
|
|
|
disabled: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
|
|
|
|
|
prefixCls: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
|
|
|
|
|
className: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
|
|
|
|
|
current: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
|
|
|
|
|
defaultCurrent: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
|
|
|
|
|
total: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
|
|
|
|
|
pageSize: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
|
|
|
|
|
defaultPageSize: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
|
|
|
|
|
onChange: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
|
|
|
|
|
hideOnSinglePage: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
|
|
|
|
|
showSizeChanger: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
|
|
|
|
|
showLessItems: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
|
|
|
|
|
onShowSizeChange: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
|
|
|
|
|
selectComponentClass: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
|
|
|
|
|
showPrevNextJumpers: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
|
|
|
|
|
showQuickJumper: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object]),
|
|
|
|
|
showTitle: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
|
|
|
|
|
pageSizeOptions: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string),
|
|
|
|
|
showTotal: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
|
|
|
|
|
locale: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object,
|
|
|
|
|
style: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object,
|
|
|
|
|
itemRender: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
|
|
|
|
|
prevIcon: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node]),
|
|
|
|
|
nextIcon: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node]),
|
|
|
|
|
jumpPrevIcon: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node]),
|
|
|
|
|
jumpNextIcon: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node])
|
|
|
|
|
};
|
|
|
|
|
Pagination.defaultProps = {
|
|
|
|
|
defaultCurrent: 1,
|
|
|
|
|
total: 0,
|
|
|
|
|
defaultPageSize: 10,
|
|
|
|
|
onChange: noop,
|
|
|
|
|
className: '',
|
|
|
|
|
selectPrefixCls: 'rc-select',
|
|
|
|
|
prefixCls: 'rc-pagination',
|
|
|
|
|
selectComponentClass: null,
|
|
|
|
|
hideOnSinglePage: false,
|
|
|
|
|
showPrevNextJumpers: true,
|
|
|
|
|
showQuickJumper: false,
|
|
|
|
|
showSizeChanger: false,
|
|
|
|
|
showLessItems: false,
|
|
|
|
|
showTitle: true,
|
|
|
|
|
onShowSizeChange: noop,
|
|
|
|
|
locale: __WEBPACK_IMPORTED_MODULE_12__locale_zh_CN__["a" /* default */],
|
|
|
|
|
style: {},
|
|
|
|
|
itemRender: defaultItemRender
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var _initialiseProps = function _initialiseProps() {
|
|
|
|
|
var _this2 = this;
|
|
|
|
|
|
|
|
|
|
this.getJumpPrevPage = function () {
|
|
|
|
|
return Math.max(1, _this2.state.current - (_this2.props.showLessItems ? 3 : 5));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.getJumpNextPage = function () {
|
|
|
|
|
return Math.min(calculatePage(undefined, _this2.state, _this2.props), _this2.state.current + (_this2.props.showLessItems ? 3 : 5));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.getItemIcon = function (icon) {
|
|
|
|
|
var prefixCls = _this2.props.prefixCls;
|
|
|
|
|
|
|
|
|
|
var iconNode = icon || __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('a', { className: prefixCls + '-item-link' });
|
|
|
|
|
if (typeof icon === 'function') {
|
|
|
|
|
iconNode = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(icon, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, _this2.props));
|
|
|
|
|
}
|
|
|
|
|
return iconNode;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.savePaginationNode = function (node) {
|
|
|
|
|
_this2.paginationNode = node;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.isValid = function (page) {
|
|
|
|
|
return isInteger(page) && page !== _this2.state.current;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.shouldDisplayQuickJumper = function () {
|
|
|
|
|
var _props2 = _this2.props,
|
|
|
|
|
showQuickJumper = _props2.showQuickJumper,
|
|
|
|
|
pageSize = _props2.pageSize,
|
|
|
|
|
total = _props2.total;
|
|
|
|
|
|
|
|
|
|
if (total <= pageSize) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return showQuickJumper;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.handleKeyDown = function (e) {
|
|
|
|
|
if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ARROW_UP || e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ARROW_DOWN) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.handleKeyUp = function (e) {
|
|
|
|
|
var value = _this2.getValidValue(e);
|
|
|
|
|
var currentInputValue = _this2.state.currentInputValue;
|
|
|
|
|
|
|
|
|
|
if (value !== currentInputValue) {
|
|
|
|
|
_this2.setState({
|
|
|
|
|
currentInputValue: value
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ENTER) {
|
|
|
|
|
_this2.handleChange(value);
|
|
|
|
|
} else if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ARROW_UP) {
|
|
|
|
|
_this2.handleChange(value - 1);
|
|
|
|
|
} else if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ARROW_DOWN) {
|
|
|
|
|
_this2.handleChange(value + 1);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.changePageSize = function (size) {
|
|
|
|
|
var current = _this2.state.current;
|
|
|
|
|
var newCurrent = calculatePage(size, _this2.state, _this2.props);
|
|
|
|
|
current = current > newCurrent ? newCurrent : current;
|
|
|
|
|
// fix the issue:
|
|
|
|
|
// Once 'total' is 0, 'current' in 'onShowSizeChange' is 0, which is not correct.
|
|
|
|
|
if (newCurrent === 0) {
|
|
|
|
|
current = _this2.state.current;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (typeof size === 'number') {
|
|
|
|
|
if (!('pageSize' in _this2.props)) {
|
|
|
|
|
_this2.setState({
|
|
|
|
|
pageSize: size
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (!('current' in _this2.props)) {
|
|
|
|
|
_this2.setState({
|
|
|
|
|
current: current,
|
|
|
|
|
currentInputValue: current
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
_this2.props.onShowSizeChange(current, size);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.handleChange = function (p) {
|
|
|
|
|
var disabled = _this2.props.disabled;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var page = p;
|
|
|
|
|
if (_this2.isValid(page) && !disabled) {
|
|
|
|
|
var currentPage = calculatePage(undefined, _this2.state, _this2.props);
|
|
|
|
|
if (page > currentPage) {
|
|
|
|
|
page = currentPage;
|
|
|
|
|
} else if (page < 1) {
|
|
|
|
|
page = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!('current' in _this2.props)) {
|
|
|
|
|
_this2.setState({
|
|
|
|
|
current: page,
|
|
|
|
|
currentInputValue: page
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var pageSize = _this2.state.pageSize;
|
|
|
|
|
_this2.props.onChange(page, pageSize);
|
|
|
|
|
|
|
|
|
|
return page;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _this2.state.current;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.prev = function () {
|
|
|
|
|
if (_this2.hasPrev()) {
|
|
|
|
|
_this2.handleChange(_this2.state.current - 1);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.next = function () {
|
|
|
|
|
if (_this2.hasNext()) {
|
|
|
|
|
_this2.handleChange(_this2.state.current + 1);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.jumpPrev = function () {
|
|
|
|
|
_this2.handleChange(_this2.getJumpPrevPage());
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.jumpNext = function () {
|
|
|
|
|
_this2.handleChange(_this2.getJumpNextPage());
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.hasPrev = function () {
|
|
|
|
|
return _this2.state.current > 1;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.hasNext = function () {
|
|
|
|
|
return _this2.state.current < calculatePage(undefined, _this2.state, _this2.props);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.runIfEnter = function (event, callback) {
|
|
|
|
|
for (var _len = arguments.length, restParams = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
|
|
|
restParams[_key - 2] = arguments[_key];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (event.key === 'Enter' || event.charCode === 13) {
|
|
|
|
|
callback.apply(undefined, restParams);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.runIfEnterPrev = function (e) {
|
|
|
|
|
_this2.runIfEnter(e, _this2.prev);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.runIfEnterNext = function (e) {
|
|
|
|
|
_this2.runIfEnter(e, _this2.next);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.runIfEnterJumpPrev = function (e) {
|
|
|
|
|
_this2.runIfEnter(e, _this2.jumpPrev);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.runIfEnterJumpNext = function (e) {
|
|
|
|
|
_this2.runIfEnter(e, _this2.jumpNext);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.handleGoTO = function (e) {
|
|
|
|
|
if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ENTER || e.type === 'click') {
|
|
|
|
|
_this2.handleChange(_this2.state.currentInputValue);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Object(__WEBPACK_IMPORTED_MODULE_13_react_lifecycles_compat__["polyfill"])(Pagination);
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ __webpack_exports__["a"] = (Pagination);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 904:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(66);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(3);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Pager = function Pager(props) {
|
|
|
|
|
var _classNames;
|
|
|
|
|
|
|
|
|
|
var prefixCls = props.rootPrefixCls + '-item';
|
|
|
|
|
var cls = __WEBPACK_IMPORTED_MODULE_3_classnames___default()(prefixCls, prefixCls + '-' + props.page, (_classNames = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-active', props.active), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, props.className, !!props.className), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-disabled', !props.page), _classNames));
|
|
|
|
|
|
|
|
|
|
var handleClick = function handleClick() {
|
|
|
|
|
props.onClick(props.page);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var handleKeyPress = function handleKeyPress(e) {
|
|
|
|
|
props.onKeyPress(e, props.onClick, props.page);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{
|
|
|
|
|
title: props.showTitle ? props.page : null,
|
|
|
|
|
className: cls,
|
|
|
|
|
onClick: handleClick,
|
|
|
|
|
onKeyPress: handleKeyPress,
|
|
|
|
|
tabIndex: '0'
|
|
|
|
|
},
|
|
|
|
|
props.itemRender(props.page, 'page', __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
|
|
|
|
|
'a',
|
|
|
|
|
null,
|
|
|
|
|
props.page
|
|
|
|
|
))
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Pager.propTypes = {
|
|
|
|
|
page: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
|
|
|
|
|
active: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
|
|
|
|
|
last: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
|
|
|
|
|
locale: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object,
|
|
|
|
|
className: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
|
|
|
|
|
showTitle: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
|
|
|
|
|
rootPrefixCls: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
|
|
|
|
|
onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
|
|
|
|
|
onKeyPress: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
|
|
|
|
|
itemRender: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ __webpack_exports__["a"] = (Pager);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 905:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(11);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(44);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(13);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(14);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(1);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
|
|
|
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__KeyCode__ = __webpack_require__(837);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Options = function (_React$Component) {
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Options, _React$Component);
|
|
|
|
|
|
|
|
|
|
function Options() {
|
|
|
|
|
var _ref;
|
|
|
|
|
|
|
|
|
|
var _temp, _this, _ret;
|
|
|
|
|
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, Options);
|
|
|
|
|
|
|
|
|
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
|
|
|
args[_key] = arguments[_key];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = Options.__proto__ || Object.getPrototypeOf(Options)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
|
|
|
|
|
goInputText: ''
|
|
|
|
|
}, _this.buildOptionText = function (value) {
|
|
|
|
|
return value + ' ' + _this.props.locale.items_per_page;
|
|
|
|
|
}, _this.changeSize = function (value) {
|
|
|
|
|
_this.props.changeSize(Number(value));
|
|
|
|
|
}, _this.handleChange = function (e) {
|
|
|
|
|
_this.setState({
|
|
|
|
|
goInputText: e.target.value
|
|
|
|
|
});
|
|
|
|
|
}, _this.handleBlur = function () {
|
|
|
|
|
var _this$props = _this.props,
|
|
|
|
|
goButton = _this$props.goButton,
|
|
|
|
|
quickGo = _this$props.quickGo;
|
|
|
|
|
|
|
|
|
|
if (goButton) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
quickGo(_this.getValidValue());
|
|
|
|
|
}, _this.go = function (e) {
|
|
|
|
|
var goInputText = _this.state.goInputText;
|
|
|
|
|
|
|
|
|
|
if (goInputText === '') {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (e.keyCode === __WEBPACK_IMPORTED_MODULE_6__KeyCode__["a" /* default */].ENTER || e.type === 'click') {
|
|
|
|
|
_this.setState({
|
|
|
|
|
goInputText: ''
|
|
|
|
|
});
|
|
|
|
|
_this.props.quickGo(_this.getValidValue());
|
|
|
|
|
}
|
|
|
|
|
}, _temp), __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(Options, [{
|
|
|
|
|
key: 'getValidValue',
|
|
|
|
|
value: function getValidValue() {
|
|
|
|
|
var _state = this.state,
|
|
|
|
|
goInputText = _state.goInputText,
|
|
|
|
|
current = _state.current;
|
|
|
|
|
|
|
|
|
|
return !goInputText || isNaN(goInputText) ? current : Number(goInputText);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: 'render',
|
|
|
|
|
value: function render() {
|
|
|
|
|
var _this2 = this;
|
|
|
|
|
|
|
|
|
|
var _props = this.props,
|
|
|
|
|
pageSize = _props.pageSize,
|
|
|
|
|
pageSizeOptions = _props.pageSizeOptions,
|
|
|
|
|
locale = _props.locale,
|
|
|
|
|
rootPrefixCls = _props.rootPrefixCls,
|
|
|
|
|
changeSize = _props.changeSize,
|
|
|
|
|
quickGo = _props.quickGo,
|
|
|
|
|
goButton = _props.goButton,
|
|
|
|
|
selectComponentClass = _props.selectComponentClass,
|
|
|
|
|
buildOptionText = _props.buildOptionText,
|
|
|
|
|
selectPrefixCls = _props.selectPrefixCls,
|
|
|
|
|
disabled = _props.disabled;
|
|
|
|
|
var goInputText = this.state.goInputText;
|
|
|
|
|
|
|
|
|
|
var prefixCls = rootPrefixCls + '-options';
|
|
|
|
|
var Select = selectComponentClass;
|
|
|
|
|
var changeSelect = null;
|
|
|
|
|
var goInput = null;
|
|
|
|
|
var gotoButton = null;
|
|
|
|
|
|
|
|
|
|
if (!changeSize && !quickGo) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (changeSize && Select) {
|
|
|
|
|
var options = pageSizeOptions.map(function (opt, i) {
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
|
|
|
|
|
Select.Option,
|
|
|
|
|
{ key: i, value: opt },
|
|
|
|
|
(buildOptionText || _this2.buildOptionText)(opt)
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
changeSelect = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
|
|
|
|
|
Select,
|
|
|
|
|
{
|
|
|
|
|
disabled: disabled,
|
|
|
|
|
prefixCls: selectPrefixCls,
|
|
|
|
|
showSearch: false,
|
|
|
|
|
className: prefixCls + '-size-changer',
|
|
|
|
|
optionLabelProp: 'children',
|
|
|
|
|
dropdownMatchSelectWidth: false,
|
|
|
|
|
value: (pageSize || pageSizeOptions[0]).toString(),
|
|
|
|
|
onChange: this.changeSize,
|
|
|
|
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
|
|
|
return triggerNode.parentNode;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
options
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (quickGo) {
|
|
|
|
|
if (goButton) {
|
|
|
|
|
gotoButton = typeof goButton === 'boolean' ? __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
|
|
|
|
|
'button',
|
|
|
|
|
{
|
|
|
|
|
type: 'button',
|
|
|
|
|
onClick: this.go,
|
|
|
|
|
onKeyUp: this.go,
|
|
|
|
|
disabled: disabled
|
|
|
|
|
},
|
|
|
|
|
locale.jump_to_confirm
|
|
|
|
|
) : __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
|
|
|
|
|
'span',
|
|
|
|
|
{
|
|
|
|
|
onClick: this.go,
|
|
|
|
|
onKeyUp: this.go
|
|
|
|
|
},
|
|
|
|
|
goButton
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
goInput = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
|
|
|
|
|
'div',
|
|
|
|
|
{ className: prefixCls + '-quick-jumper' },
|
|
|
|
|
locale.jump_to,
|
|
|
|
|
__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('input', {
|
|
|
|
|
disabled: disabled,
|
|
|
|
|
type: 'text',
|
|
|
|
|
value: goInputText,
|
|
|
|
|
onChange: this.handleChange,
|
|
|
|
|
onKeyUp: this.go,
|
|
|
|
|
onBlur: this.handleBlur
|
|
|
|
|
}),
|
|
|
|
|
locale.page,
|
|
|
|
|
gotoButton
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
|
|
|
|
|
'li',
|
|
|
|
|
{ className: '' + prefixCls },
|
|
|
|
|
changeSelect,
|
|
|
|
|
goInput
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return Options;
|
|
|
|
|
}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
|
|
|
|
|
|
|
|
|
|
Options.propTypes = {
|
|
|
|
|
disabled: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,
|
|
|
|
|
changeSize: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
|
|
|
|
|
quickGo: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
|
|
|
|
|
selectComponentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
|
|
|
|
|
current: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number,
|
|
|
|
|
pageSizeOptions: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string),
|
|
|
|
|
pageSize: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number,
|
|
|
|
|
buildOptionText: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
|
|
|
|
|
locale: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object,
|
|
|
|
|
rootPrefixCls: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,
|
|
|
|
|
selectPrefixCls: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,
|
|
|
|
|
goButton: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node])
|
|
|
|
|
};
|
|
|
|
|
Options.defaultProps = {
|
|
|
|
|
pageSizeOptions: ['10', '20', '30', '40']
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ __webpack_exports__["a"] = (Options);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 906:
|
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
/* harmony default export */ __webpack_exports__["a"] = ({
|
|
|
|
|
// Options.jsx
|
|
|
|
|
items_per_page: '条/页',
|
|
|
|
|
jump_to: '跳至',
|
|
|
|
|
jump_to_confirm: '确定',
|
|
|
|
|
page: '页',
|
|
|
|
|
|
|
|
|
|
// Pagination.jsx
|
|
|
|
|
prev_page: '上一页',
|
|
|
|
|
next_page: '下一页',
|
|
|
|
|
prev_5: '向前 5 页',
|
|
|
|
|
next_5: '向后 5 页',
|
|
|
|
|
prev_3: '向前 3 页',
|
|
|
|
|
next_3: '向后 3 页'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 910:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
exports = module.exports = __webpack_require__(290)(true);
|
|
|
|
|
// imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// module
|
|
|
|
|
exports.push([module.i, ".ant-pagination{-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\"}.ant-pagination,.ant-pagination ol,.ant-pagination ul{margin:0;padding:0;list-style:none}.ant-pagination:after{display:block;clear:both;height:0;overflow:hidden;visibility:hidden;content:\" \"}.ant-pagination-item,.ant-pagination-total-text{display:inline-block;height:32px;margin-right:8px;line-height:30px;vertical-align:middle}.ant-pagination-item{min-width:32px;font-family:Arial;text-align:center;list-style:none;background-color:#fff;border:1px solid #d9d9d9;border-radius:4px;outline:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-pagination-item a{display:block;padding:0 6px;color:rgba(0,0,0,.65);-webkit-transition:none;-o-transition:none;transition:none}.ant-pagination-item a:hover{text-decoration:none}.ant-pagination-item:focus,.ant-pagination-item:hover{border-color:#1890ff;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-pagination-item:focus a,.ant-pagination-item:hover a{color:#1890ff}.ant-pagination-item-active{font-weight:500;background:#fff;border-color:#1890ff}.ant-pagination-item-active a{color:#1890ff}.ant-pagination-item-active:focus,.ant-pagination-item-active:hover{border-color:#40a9ff}.ant-pagination-item-active:focus a,.ant-pagination-item-active:hover a{color:#40a9ff}.ant-pagination-jump-next,.ant-pagination-jump-prev{outline:0}.ant-pagination-jump-next .ant-pagination-item-container,.ant-pagination-jump-prev .ant-pagination-item-container{position:relative}.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon,.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon{display:inline-block;font-size:12px;font-size:12px\\9;-webkit-transform:scale(1) rotate(0deg);-ms-transform:scale(1) rotate(0deg);transform:scale(1) rotate(0deg);color:#1890ff;letter-spacing:-1px;opacity:0;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}:root .ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon,:root .ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon{font-size:12px}.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon-svg,.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon-svg{top:0;right:0;bottom:0;left:0;margin:auto}.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis,.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis{position:absolute;top:0;right:0;bottom:0;left:0;display:block;margin:auto;color:rgba(0,0,0,.25);letter-spacing:2px;text-align:center;text-indent:.13em;opacity:1;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.ant-pagination-jump-next:focus .ant-pagination-item-link-icon,.ant-pagination-jump-next:hover .ant-pagination-item-link-icon,.ant-pagination-jump-prev:focus .ant-pagination-item-link-icon,.ant-pagination-jump-prev:hover .ant-pagination-item-link-icon{opacity:1}.ant-pagination-jump-next:focus .ant-pagination-item-ellipsis,.ant-pagination-jump-next:hover .ant-pagination-item-ellipsis,.ant-pagination-jump-prev:focus .ant-pagination-item-ellipsis,.ant-pagination-jump-prev:hover .ant-pagination-item-ellipsis{opacity:0}.ant-pagination-jump-next,.ant-pagination-jump-prev,.ant-pagination-prev{margin-right:8px}.ant-pagination-jump-next,.ant-pagination-jump-prev,.ant-pagination-next,.ant-pagination-prev{display:inline-block;min-width:32px;height:32px;color:rgba(0,0,0,.65);font-family:Arial;line-height:32px;text-align:center;vertical-align:middle;list-style:none;border-radius:4px;cursor:pointer;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-pagination-next,.ant-pagination-prev{outline:0}.ant-pagination-next a,.ant-pagination-prev a{color:rgba(0,0,0,.65);-
|
|
|
|
|
|
|
|
|
|
// exports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 911:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var _rcPagination = _interopRequireDefault(__webpack_require__(860));
|
|
|
|
|
|
|
|
|
|
var _en_US = _interopRequireDefault(__webpack_require__(306));
|
|
|
|
|
|
|
|
|
|
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
|
|
|
|
|
|
|
|
|
var _MiniSelect = _interopRequireDefault(__webpack_require__(912));
|
|
|
|
|
|
|
|
|
|
var _icon = _interopRequireDefault(__webpack_require__(25));
|
|
|
|
|
|
|
|
|
|
var _select = _interopRequireDefault(__webpack_require__(293));
|
|
|
|
|
|
|
|
|
|
var _LocaleReceiver = _interopRequireDefault(__webpack_require__(70));
|
|
|
|
|
|
|
|
|
|
var _configProvider = __webpack_require__(9);
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
|
|
|
|
|
for (var p in s) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
|
|
}
|
|
|
|
|
return t;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var Pagination =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(Pagination, _React$Component);
|
|
|
|
|
|
|
|
|
|
function Pagination() {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, Pagination);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(Pagination).apply(this, arguments));
|
|
|
|
|
|
|
|
|
|
_this.getIconsProps = function (prefixCls) {
|
|
|
|
|
var prevIcon = React.createElement("a", {
|
|
|
|
|
className: "".concat(prefixCls, "-item-link")
|
|
|
|
|
}, React.createElement(_icon["default"], {
|
|
|
|
|
type: "left"
|
|
|
|
|
}));
|
|
|
|
|
var nextIcon = React.createElement("a", {
|
|
|
|
|
className: "".concat(prefixCls, "-item-link")
|
|
|
|
|
}, React.createElement(_icon["default"], {
|
|
|
|
|
type: "right"
|
|
|
|
|
}));
|
|
|
|
|
var jumpPrevIcon = React.createElement("a", {
|
|
|
|
|
className: "".concat(prefixCls, "-item-link")
|
|
|
|
|
}, React.createElement("div", {
|
|
|
|
|
className: "".concat(prefixCls, "-item-container")
|
|
|
|
|
}, React.createElement(_icon["default"], {
|
|
|
|
|
className: "".concat(prefixCls, "-item-link-icon"),
|
|
|
|
|
type: "double-left"
|
|
|
|
|
}), React.createElement("span", {
|
|
|
|
|
className: "".concat(prefixCls, "-item-ellipsis")
|
|
|
|
|
}, "\u2022\u2022\u2022")));
|
|
|
|
|
var jumpNextIcon = React.createElement("a", {
|
|
|
|
|
className: "".concat(prefixCls, "-item-link")
|
|
|
|
|
}, React.createElement("div", {
|
|
|
|
|
className: "".concat(prefixCls, "-item-container")
|
|
|
|
|
}, React.createElement(_icon["default"], {
|
|
|
|
|
className: "".concat(prefixCls, "-item-link-icon"),
|
|
|
|
|
type: "double-right"
|
|
|
|
|
}), React.createElement("span", {
|
|
|
|
|
className: "".concat(prefixCls, "-item-ellipsis")
|
|
|
|
|
}, "\u2022\u2022\u2022")));
|
|
|
|
|
return {
|
|
|
|
|
prevIcon: prevIcon,
|
|
|
|
|
nextIcon: nextIcon,
|
|
|
|
|
jumpPrevIcon: jumpPrevIcon,
|
|
|
|
|
jumpNextIcon: jumpNextIcon
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.renderPagination = function (contextLocale) {
|
|
|
|
|
var _a = _this.props,
|
|
|
|
|
customizePrefixCls = _a.prefixCls,
|
|
|
|
|
customizeSelectPrefixCls = _a.selectPrefixCls,
|
|
|
|
|
className = _a.className,
|
|
|
|
|
size = _a.size,
|
|
|
|
|
customLocale = _a.locale,
|
|
|
|
|
restProps = __rest(_a, ["prefixCls", "selectPrefixCls", "className", "size", "locale"]);
|
|
|
|
|
|
|
|
|
|
var locale = _extends(_extends({}, contextLocale), customLocale);
|
|
|
|
|
|
|
|
|
|
var isSmall = size === 'small';
|
|
|
|
|
return React.createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
|
|
|
var getPrefixCls = _ref.getPrefixCls;
|
|
|
|
|
var prefixCls = getPrefixCls('pagination', customizePrefixCls);
|
|
|
|
|
var selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);
|
|
|
|
|
return React.createElement(_rcPagination["default"], _extends({}, restProps, {
|
|
|
|
|
prefixCls: prefixCls,
|
|
|
|
|
selectPrefixCls: selectPrefixCls
|
|
|
|
|
}, _this.getIconsProps(prefixCls), {
|
|
|
|
|
className: (0, _classnames["default"])(className, {
|
|
|
|
|
mini: isSmall
|
|
|
|
|
}),
|
|
|
|
|
selectComponentClass: isSmall ? _MiniSelect["default"] : _select["default"],
|
|
|
|
|
locale: locale
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(Pagination, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_LocaleReceiver["default"], {
|
|
|
|
|
componentName: "Pagination",
|
|
|
|
|
defaultLocale: _en_US["default"]
|
|
|
|
|
}, this.renderPagination);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return Pagination;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = Pagination;
|
|
|
|
|
//# sourceMappingURL=Pagination.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 912:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var _select = _interopRequireDefault(__webpack_require__(293));
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var MiniSelect =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(MiniSelect, _React$Component);
|
|
|
|
|
|
|
|
|
|
function MiniSelect() {
|
|
|
|
|
_classCallCheck(this, MiniSelect);
|
|
|
|
|
|
|
|
|
|
return _possibleConstructorReturn(this, _getPrototypeOf(MiniSelect).apply(this, arguments));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(MiniSelect, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_select["default"], _extends({
|
|
|
|
|
size: "small"
|
|
|
|
|
}, this.props));
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return MiniSelect;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = MiniSelect;
|
|
|
|
|
MiniSelect.Option = _select["default"].Option;
|
|
|
|
|
//# sourceMappingURL=MiniSelect.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 920:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var _dropdown = _interopRequireDefault(__webpack_require__(865));
|
|
|
|
|
|
|
|
|
|
var _dropdownButton = _interopRequireDefault(__webpack_require__(1042));
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
_dropdown["default"].Button = _dropdownButton["default"];
|
|
|
|
|
var _default = _dropdown["default"];
|
|
|
|
|
exports["default"] = _default;
|
|
|
|
|
//# sourceMappingURL=index.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 924:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__webpack_require__(27);
|
|
|
|
|
|
|
|
|
|
__webpack_require__(1036);
|
|
|
|
|
|
|
|
|
|
__webpack_require__(87);
|
|
|
|
|
//# sourceMappingURL=css.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 929:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
// ================== Collapse Motion ==================
|
|
|
|
|
var getCollapsedHeight = function getCollapsedHeight() {
|
|
|
|
|
return {
|
|
|
|
|
height: 0,
|
|
|
|
|
opacity: 0
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var getRealHeight = function getRealHeight(node) {
|
|
|
|
|
return {
|
|
|
|
|
height: node.scrollHeight,
|
|
|
|
|
opacity: 1
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var getCurrentHeight = function getCurrentHeight(node) {
|
|
|
|
|
return {
|
|
|
|
|
height: node.offsetHeight
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var collapseMotion = {
|
|
|
|
|
motionName: 'ant-motion-collapse',
|
|
|
|
|
onAppearStart: getCollapsedHeight,
|
|
|
|
|
onEnterStart: getCollapsedHeight,
|
|
|
|
|
onAppearActive: getRealHeight,
|
|
|
|
|
onEnterActive: getRealHeight,
|
|
|
|
|
onLeaveStart: getCurrentHeight,
|
|
|
|
|
onLeaveActive: getCollapsedHeight
|
|
|
|
|
};
|
|
|
|
|
var _default = collapseMotion;
|
|
|
|
|
exports["default"] = _default;
|
|
|
|
|
//# sourceMappingURL=motion.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 930:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__webpack_require__(27);
|
|
|
|
|
|
|
|
|
|
__webpack_require__(1060);
|
|
|
|
|
|
|
|
|
|
__webpack_require__(165);
|
|
|
|
|
//# sourceMappingURL=css.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 933:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = exports.LayoutContext = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
|
|
|
|
|
|
|
|
|
var _createReactContext = _interopRequireDefault(__webpack_require__(294));
|
|
|
|
|
|
|
|
|
|
var _configProvider = __webpack_require__(9);
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
|
|
|
|
|
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
|
|
|
|
|
|
|
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
|
|
|
|
|
|
|
|
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
|
|
|
|
|
|
|
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
|
|
|
|
|
for (var p in s) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
|
|
}
|
|
|
|
|
return t;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var LayoutContext = (0, _createReactContext["default"])({
|
|
|
|
|
siderHook: {
|
|
|
|
|
addSider: function addSider() {
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
removeSider: function removeSider() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
exports.LayoutContext = LayoutContext;
|
|
|
|
|
|
|
|
|
|
function generator(_ref) {
|
|
|
|
|
var suffixCls = _ref.suffixCls,
|
|
|
|
|
tagName = _ref.tagName;
|
|
|
|
|
return function (BasicComponent) {
|
|
|
|
|
return (
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(Adapter, _React$Component);
|
|
|
|
|
|
|
|
|
|
function Adapter() {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, Adapter);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(Adapter).apply(this, arguments));
|
|
|
|
|
|
|
|
|
|
_this.renderComponent = function (_ref2) {
|
|
|
|
|
var getPrefixCls = _ref2.getPrefixCls;
|
|
|
|
|
var customizePrefixCls = _this.props.prefixCls;
|
|
|
|
|
var prefixCls = getPrefixCls(suffixCls, customizePrefixCls);
|
|
|
|
|
return React.createElement(BasicComponent, _extends({
|
|
|
|
|
prefixCls: prefixCls,
|
|
|
|
|
tagName: tagName
|
|
|
|
|
}, _this.props));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(Adapter, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_configProvider.ConfigConsumer, null, this.renderComponent);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return Adapter;
|
|
|
|
|
}(React.Component)
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var Basic = function Basic(props) {
|
|
|
|
|
var prefixCls = props.prefixCls,
|
|
|
|
|
className = props.className,
|
|
|
|
|
children = props.children,
|
|
|
|
|
tagName = props.tagName,
|
|
|
|
|
others = __rest(props, ["prefixCls", "className", "children", "tagName"]);
|
|
|
|
|
|
|
|
|
|
var classString = (0, _classnames["default"])(className, prefixCls);
|
|
|
|
|
return React.createElement(tagName, _extends({
|
|
|
|
|
className: classString
|
|
|
|
|
}, others), children);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var BasicLayout =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component2) {
|
|
|
|
|
_inherits(BasicLayout, _React$Component2);
|
|
|
|
|
|
|
|
|
|
function BasicLayout() {
|
|
|
|
|
var _this2;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, BasicLayout);
|
|
|
|
|
|
|
|
|
|
_this2 = _possibleConstructorReturn(this, _getPrototypeOf(BasicLayout).apply(this, arguments));
|
|
|
|
|
_this2.state = {
|
|
|
|
|
siders: []
|
|
|
|
|
};
|
|
|
|
|
return _this2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(BasicLayout, [{
|
|
|
|
|
key: "getSiderHook",
|
|
|
|
|
value: function getSiderHook() {
|
|
|
|
|
var _this3 = this;
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
addSider: function addSider(id) {
|
|
|
|
|
_this3.setState(function (state) {
|
|
|
|
|
return {
|
|
|
|
|
siders: [].concat(_toConsumableArray(state.siders), [id])
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
removeSider: function removeSider(id) {
|
|
|
|
|
_this3.setState(function (state) {
|
|
|
|
|
return {
|
|
|
|
|
siders: state.siders.filter(function (currentId) {
|
|
|
|
|
return currentId !== id;
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
var _a = this.props,
|
|
|
|
|
prefixCls = _a.prefixCls,
|
|
|
|
|
className = _a.className,
|
|
|
|
|
children = _a.children,
|
|
|
|
|
hasSider = _a.hasSider,
|
|
|
|
|
Tag = _a.tagName,
|
|
|
|
|
others = __rest(_a, ["prefixCls", "className", "children", "hasSider", "tagName"]);
|
|
|
|
|
|
|
|
|
|
var classString = (0, _classnames["default"])(className, prefixCls, _defineProperty({}, "".concat(prefixCls, "-has-sider"), typeof hasSider === 'boolean' ? hasSider : this.state.siders.length > 0));
|
|
|
|
|
return React.createElement(LayoutContext.Provider, {
|
|
|
|
|
value: {
|
|
|
|
|
siderHook: this.getSiderHook()
|
|
|
|
|
}
|
|
|
|
|
}, React.createElement(Tag, _extends({
|
|
|
|
|
className: classString
|
|
|
|
|
}, others), children));
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return BasicLayout;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
var Layout = generator({
|
|
|
|
|
suffixCls: 'layout',
|
|
|
|
|
tagName: 'section'
|
|
|
|
|
})(BasicLayout);
|
|
|
|
|
var Header = generator({
|
|
|
|
|
suffixCls: 'layout-header',
|
|
|
|
|
tagName: 'header'
|
|
|
|
|
})(Basic);
|
|
|
|
|
var Footer = generator({
|
|
|
|
|
suffixCls: 'layout-footer',
|
|
|
|
|
tagName: 'footer'
|
|
|
|
|
})(Basic);
|
|
|
|
|
var Content = generator({
|
|
|
|
|
suffixCls: 'layout-content',
|
|
|
|
|
tagName: 'main'
|
|
|
|
|
})(Basic);
|
|
|
|
|
Layout.Header = Header;
|
|
|
|
|
Layout.Footer = Footer;
|
|
|
|
|
Layout.Content = Content;
|
|
|
|
|
var _default = Layout;
|
|
|
|
|
exports["default"] = _default;
|
|
|
|
|
//# sourceMappingURL=layout.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 939:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var isNumeric = function isNumeric(value) {
|
|
|
|
|
return !isNaN(parseFloat(value)) && isFinite(value);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var _default = isNumeric;
|
|
|
|
|
exports["default"] = _default;
|
|
|
|
|
//# sourceMappingURL=isNumeric.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 954:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
|
|
|
|
|
|
|
|
|
|
var _rcMenu = __webpack_require__(167);
|
|
|
|
|
|
|
|
|
|
var _classnames = _interopRequireDefault(__webpack_require__(3));
|
|
|
|
|
|
|
|
|
|
var _MenuContext = _interopRequireDefault(__webpack_require__(838));
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var SubMenu =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(SubMenu, _React$Component);
|
|
|
|
|
|
|
|
|
|
function SubMenu() {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, SubMenu);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(SubMenu).apply(this, arguments));
|
|
|
|
|
|
|
|
|
|
_this.onKeyDown = function (e) {
|
|
|
|
|
_this.subMenu.onKeyDown(e);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.saveSubMenu = function (subMenu) {
|
|
|
|
|
_this.subMenu = subMenu;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(SubMenu, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
var _this2 = this;
|
|
|
|
|
|
|
|
|
|
var _this$props = this.props,
|
|
|
|
|
rootPrefixCls = _this$props.rootPrefixCls,
|
|
|
|
|
popupClassName = _this$props.popupClassName;
|
|
|
|
|
return React.createElement(_MenuContext["default"].Consumer, null, function (_ref) {
|
|
|
|
|
var antdMenuTheme = _ref.antdMenuTheme;
|
|
|
|
|
return React.createElement(_rcMenu.SubMenu, _extends({}, _this2.props, {
|
|
|
|
|
ref: _this2.saveSubMenu,
|
|
|
|
|
popupClassName: (0, _classnames["default"])("".concat(rootPrefixCls, "-").concat(antdMenuTheme), popupClassName)
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return SubMenu;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
SubMenu.contextTypes = {
|
|
|
|
|
antdMenuTheme: PropTypes.string
|
|
|
|
|
}; // fix issue:https://github.com/ant-design/ant-design/issues/8666
|
|
|
|
|
|
|
|
|
|
SubMenu.isSubMenu = 1;
|
|
|
|
|
var _default = SubMenu;
|
|
|
|
|
exports["default"] = _default;
|
|
|
|
|
//# sourceMappingURL=SubMenu.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 955:
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports["default"] = void 0;
|
|
|
|
|
|
|
|
|
|
var React = _interopRequireWildcard(__webpack_require__(0));
|
|
|
|
|
|
|
|
|
|
var _rcMenu = __webpack_require__(167);
|
|
|
|
|
|
|
|
|
|
var _MenuContext = _interopRequireDefault(__webpack_require__(838));
|
|
|
|
|
|
|
|
|
|
var _tooltip = _interopRequireDefault(__webpack_require__(164));
|
|
|
|
|
|
|
|
|
|
var _Sider = __webpack_require__(857);
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
|
|
|
|
|
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
|
|
|
|
|
|
|
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
|
|
|
|
|
|
|
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
|
|
|
|
|
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
|
|
|
|
|
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
|
|
var t = {};
|
|
|
|
|
|
|
|
|
|
for (var p in s) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
|
|
}
|
|
|
|
|
return t;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var MenuItem =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function (_React$Component) {
|
|
|
|
|
_inherits(MenuItem, _React$Component);
|
|
|
|
|
|
|
|
|
|
function MenuItem() {
|
|
|
|
|
var _this;
|
|
|
|
|
|
|
|
|
|
_classCallCheck(this, MenuItem);
|
|
|
|
|
|
|
|
|
|
_this = _possibleConstructorReturn(this, _getPrototypeOf(MenuItem).apply(this, arguments));
|
|
|
|
|
|
|
|
|
|
_this.onKeyDown = function (e) {
|
|
|
|
|
_this.menuItem.onKeyDown(e);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.saveMenuItem = function (menuItem) {
|
|
|
|
|
_this.menuItem = menuItem;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_this.renderItem = function (_ref) {
|
|
|
|
|
var siderCollapsed = _ref.siderCollapsed;
|
|
|
|
|
var _this$props = _this.props,
|
|
|
|
|
level = _this$props.level,
|
|
|
|
|
children = _this$props.children,
|
|
|
|
|
rootPrefixCls = _this$props.rootPrefixCls;
|
|
|
|
|
|
|
|
|
|
var _a = _this.props,
|
|
|
|
|
title = _a.title,
|
|
|
|
|
rest = __rest(_a, ["title"]);
|
|
|
|
|
|
|
|
|
|
return React.createElement(_MenuContext["default"].Consumer, null, function (_ref2) {
|
|
|
|
|
var inlineCollapsed = _ref2.inlineCollapsed;
|
|
|
|
|
var tooltipProps = {
|
|
|
|
|
title: title || (level === 1 ? children : '')
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (!siderCollapsed && !inlineCollapsed) {
|
|
|
|
|
tooltipProps.title = null; // Reset `visible` to fix control mode tooltip display not correct
|
|
|
|
|
// ref: https://github.com/ant-design/ant-design/issues/16742
|
|
|
|
|
|
|
|
|
|
tooltipProps.visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return React.createElement(_tooltip["default"], _extends({}, tooltipProps, {
|
|
|
|
|
placement: "right",
|
|
|
|
|
overlayClassName: "".concat(rootPrefixCls, "-inline-collapsed-tooltip")
|
|
|
|
|
}), React.createElement(_rcMenu.Item, _extends({}, rest, {
|
|
|
|
|
title: title,
|
|
|
|
|
ref: _this.saveMenuItem
|
|
|
|
|
})));
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return _this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_createClass(MenuItem, [{
|
|
|
|
|
key: "render",
|
|
|
|
|
value: function render() {
|
|
|
|
|
return React.createElement(_Sider.SiderContext.Consumer, null, this.renderItem);
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return MenuItem;
|
|
|
|
|
}(React.Component);
|
|
|
|
|
|
|
|
|
|
exports["default"] = MenuItem;
|
|
|
|
|
MenuItem.isMenuItem = true;
|
|
|
|
|
//# sourceMappingURL=MenuItem.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
|
|
|
|
});
|