2 lines
17 KiB
JavaScript
2 lines
17 KiB
JavaScript
|
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[15176,12802],{76734:function(J){J.exports={newColorPicker:"newColorPicker___2va38"}},96278:function(J){J.exports={root:"root___7VXfh",colorWeak:"colorWeak___2fQ5G","ant-layout":"ant-layout___2lk2i",globalSpin:"globalSpin___3wjkL","ant-table":"ant-table___3MoMQ","ant-table-thead":"ant-table-thead___2F4eD","ant-table-tbody":"ant-table-tbody___1iFAX",formBox:"formBox___1MR6m",hrefModal:"hrefModal___GOUPi",shop:"shop___3KrmS"}},64752:function(){},44943:function(){},96328:function(J,j,e){"use strict";var m=e(67294),P=e(79941),X=e(53390),K=e(76734),se=e.n(K),o=e(85893);function d(B){var g=B.offsetTop;return B.offsetParent!=null&&(g+=d(B.offsetParent)),g}function q(B){var g=B.offsetLeft;return B.offsetParent!=null&&(g+=q(B.offsetParent)),g}class ee extends m.Component{constructor(){super(...arguments);this.state={displayColorPicker:!1,pageX:0,pageY:0},this.handleClick=g=>{var D=this.props.cssData,b=D===void 0?{devX:0,devY:0}:D,w=b.devX,T=b.devY;this.first=!0;var O=root.clientWidth,_=root.clientHeight,c=$(g.target),a=c.offset().left+w,R=c.offset().top+c.outerHeight()+5+T;a+220>O&&(a=O-220),R+333>_&&(R=_-333),this.setState({displayColorPicker:!this.state.displayColorPicker,pageX:a,pageY:R})},this.handleClear=()=>{var g=this.props.onChange,D=g===void 0?b=>{}:g;this.setState({displayColorPicker:!1,scrollTop:0}),D("transparent")},this.handleClose=()=>{this.setState({displayColorPicker:!1,scrollTop:0})}}render(){var g=this.props,D=g.className,b=D===void 0?"colorPicker":D,w=g.onChange,T=w===void 0?u=>{}:w,O=g.value,_=O===void 0?"#000000":O,c=g.style,a=this.state,R=a.pageX,Q=a.pageY,H=u=>{u.rgb.a<1&&!(this.first&&u.rgb.a==0)?T("rgba(".concat(u.rgb.r,", ").concat(u.rgb.g,", ").concat(u.rgb.b,", ").concat(u.rgb.a,")")):T(u.hex),this.first=!1},M=(0,P.ZP)({default:{color:{height:"100%",borderRadius:"2px",background:_},colorBox:{height:"100%",borderRadius:"2px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",background:'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")'},swatch:{width:"100%",height:"100%",padding:"2px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"fixed",zIndex:"101",background:"#ccc",top:Q,left:R},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"},clearBtn:{position:"absolute",bottom:"10px",height:"18px",lineHeight:"18px",right:"8px",zIndex:1,fontSize:"12px",cursor:"pointer"}}});return(0,o.jsxs)("div",{style:c,className:b+" "+se().newColorPicker,children:[(0,o.jsx)("div",{style:M.swatch,onClick:this.handleClick,children:(0,o.jsx)("div",{style:M.colorBox,children:(0,o.jsx)("div",{style:M.color})})}),this.state.displayColorPicker?(0,o.jsxs)("div",{style:M.popover,children:[(0,o.jsx)("div",{style:M.clearBtn,onClick:this.handleClear,children:"\u6E05\u7A7A"}),(0,o.jsx)("div",{style:M.cover,onClick:this.handleClose}),(0,o.jsx)(X.xS,{color:_,onChange:H})]}):null]})}}j.Z=ee},15176:function(J,j,e){"use strict";e.r(j),e.d(j,{default:function(){return I}});var m=e(71194),P=e(50146),X=e(13062),K=e(71230),se=e(63185),o=e(9676),d=e(18106),q=e(95562),ee=e(88983),B=e(47933),g=e(47673),D=e(4107),b=e(67294),w=e(28216),T=e(96278),O=e.n(T),_=e(96328),c=e(41273),a=e(85893),R,Q,H=D.Z.TextArea,M=B.ZP.Group,u=q.Z.TabPane,f=o.Z.Group,I=(R=(0,w.$j)(l=>{var n=l.commondesign;return{commondesign:n}}),R(Q=class extends b.PureComponent{constructor(){super(...arguments);this.state={visible:!1,aicon:"icon-user",atext:"\u8BF7\u8F93\u5165\u8D26\u53F7",picon:"icon-lock",ptext:"\u8BF7\u8F93\u5165\u5BC6\u7801",btext:"\u7ACB\u5373\u767B\u9646",bColor:"#1890ff",after:["head","realName","loginname","lastLogin"]},this.updataDomCallBack=n=>{var E=this,Z=this.props.commondesign,t=Z.LoginBox,i=t.element,x=t.callback,r=t.callClose,s=i.find(".box"),A=i.find("input.account"),y=i.find("input.password");A&&A.attr("placeholder",n.atext),y&&y.attr("placeholder",n.ptext),i.attr("da
|