You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
17 KiB
1 line
17 KiB
5 years ago
|
(this.webpackJsonph5=this.webpackJsonph5||[]).push([[11],{480:function(e,t,r){"use strict";var n,o=r(0),a=r.n(o),i=r(1),c=r.n(i),l=r(13),p=r.n(l),u=r(105),s=r(12),f=r.n(s),y={adjustX:1,adjustY:1},b=[0,0],m={topLeft:{points:["bl","tl"],overflow:y,offset:[0,-4],targetOffset:b},topCenter:{points:["bc","tc"],overflow:y,offset:[0,-4],targetOffset:b},topRight:{points:["br","tr"],overflow:y,offset:[0,-4],targetOffset:b},bottomLeft:{points:["tl","bl"],overflow:y,offset:[0,4],targetOffset:b},bottomCenter:{points:["tc","bc"],overflow:y,offset:[0,4],targetOffset:b},bottomRight:{points:["tr","br"],overflow:y,offset:[0,4],targetOffset:b}},h=r(25),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(g,n=o.Component),g.getDerivedStateFromProps=function(e){return"visible"in e?{visible:e.visible}:null},g.prototype.getOverlayElement=function(){var e=this.props.overlay;return"function"==typeof e?e():e},g.prototype.getMenuElementOrLambda=function(){return"function"==typeof this.props.overlay?this.getMenuElement:this.getMenuElement()},g.prototype.getPopupDomNode=function(){return this.trigger.getPopupDomNode()},g.prototype.getOpenClassName=function(){var e=this.props,t=e.openClassName,r=e.prefixCls;return void 0!==t?t:r+"-open"},g.prototype.renderChildren=function(){var e=this.props.children,t=this.state.visible,r=e.props?e.props:{},n=f()(r.className,this.getOpenClassName());return t&&e?Object(o.cloneElement)(e,{className:n}):e},g.prototype.render=function(){var e=this.props,t=e.prefixCls,r=e.transitionName,n=e.animation,o=e.align,i=e.placement,c=e.getPopupContainer,l=e.showAction,p=e.hideAction,s=e.overlayClassName,f=e.overlayStyle,y=e.trigger,b=function(e,t){var r={};for(var n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["prefixCls","transitionName","animation","align","placement","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","trigger"]),h=p;return h||-1===y.indexOf("contextMenu")||(h=["click"]),a.a.createElement(u.a,d({},b,{prefixCls:t,ref:this.saveTrigger,popupClassName:s,popupStyle:f,builtinPlacements:m,action:y,showAction:l,hideAction:h||[],popupPlacement:i,popupAlign:o,popupTransitionName:r,popupAnimation:n,popupVisible:this.state.visible,afterPopupVisibleChange:this.afterVisibleChange,popup:this.getMenuElementOrLambda(),onPopupVisibleChange:this.onVisibleChange,getPopupContainer:c}),this.renderChildren())},g);function g(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,e));return O.call(t),t.state="visible"in e?{visible:e.visible}:{visible:e.defaultVisible},t}v.propTypes={minOverlayWidthMatchTrigger:c.a.bool,onVisibleChange:c.a.func,onOverlayClick:c.a.func,prefixCls:c.a.string,children:c.a.any,transitionName:c.a.string,overlayClassName:c.a.string,openClassName:c.a.string,animation:c.a.any,align:c.a.object,overlayStyle:c.a.object,placement:c.a.string,overlay:c.a.oneOfType([c.a.node,c.a.func]),trigger:c.a.array,alignPoint:c.a.bool,showAction:c.a.array,hideAction:c.a.array,getPopupContainer:c.a.func,visible:c.a.bool,defaultVisible:c.a.bool},v.defaultProps={prefixCls:"rc-dropdown",trigger:["hover"],showAction:[],overlayClassName:"",overlayStyle:{},defaultVisible:!1,onVisibleChange:function(){},placement:"bottomLeft"};var O=function(){var e=this;this.onClick=function(t){var r=e.props,n=e.getOverlayElement().props;"visible"in r||e.setState({visible:!1}),r.onOverlayClick&&r.onOverlayClick(t),n.onClick&&n.on
|