2 lines
8.9 KiB
JavaScript
2 lines
8.9 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[62831],{96278:function(G){G.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"}},44943:function(){},62831:function(G,Z,e){"use strict";e.r(Z),e.d(Z,{default:function(){return K}});var g=e(71194),h=e(50146),j=e(34792),O=e(48086),V=e(88983),H=e(47933),o=e(47673),R=e(4107),B=e(67294),J=e(28216),k=e(96278),$=e.n(k),y=e(41273),Q=e(56173),v=e(85893),f,i,r=R.Z.TextArea,u=H.ZP.Group,K=(f=(0,J.$j)(x=>{var s=x.commondesign,d=x.globaldesign;return{commondesign:s,globaldesign:d}}),f(i=class extends B.PureComponent{constructor(){super(...arguments);this.state={visible:!1,href:location.origin,hrefName:""},this.updataDomCallBack=s=>{var d=this,b=this.props.commondesign,C=b.QRCode,_=C.element,I=C.callback,A=C.callClose;_.find(".box").remove(),_.append('<div class="box"></div>'),_.find(".box").qrcode(s.href);var E=_.find("canvas")[0],T=E.toDataURL("image/png");_.find(".box, canvas").remove(),_.append('<a class="box" href='+T+' download="\u4E8C\u7EF4\u7801.png"><img src="'+T+'"/></a>'),_.attr("data-qrcode",JSON.stringify(s))},this.show=s=>{s?(s=JSON.parse(s),this.setState({href:s.href})):this.setState({visible:!0,href:location.origin})},this.cancelEvent=()=>{var s=this,d=this.props.dispatch;d({type:"commondesign/setState",payload:{QRCode:{visible:!1,callback:()=>{},callClose:()=>{}}}})}}componentDidMount(){var s=this.props.commondesign,d=s.QRCode,b=d.visible,C=d.element,_=d.callback,I=d.callClose;this.setState({visible:b});var A=C.attr("data-qrcode");this.show(A)}render(){var s=this,d=this.props,b=d.commondesign,C=d.dispatch,_=b.QRCode.callback,I=this.state,A=I.visible,E=I.href,T=t=>{s.cancelEvent()},a=t=>{if(E!=""){var n={href:E};s.updataDomCallBack(n),_&&_(n),s.cancelEvent()}else O.ZP.error("\u8BF7\u6DFB\u52A0\u94FE\u63A5\u5730\u5740")},l=t=>{s.setState({href:t.target.value})},c=()=>{C({type:"commondesign/setState",payload:{Href:{visible:!0,type:{question:!0,forum:!0,member:!0,shop:!0,information:!0,course:!0,formData:!0},closeHandle:!0,typex:!1,callback:t=>{var n=(0,Q.wS)(t,s),D=n.url;s.setState({href:location.origin+D})}}}})};return(0,v.jsx)(h.Z,{title:"\u6DFB\u52A0\u4E8C\u7EF4\u7801",visible:A,onOk:a,width:520,onCancel:T,maskClosable:!1,className:$().hrefModal,children:(0,v.jsxs)("div",{className:"divRow",children:[(0,v.jsx)("div",{className:"label",style:{marginBottom:0},children:"\u94FE\u63A5\u5730\u5740\uFF1A"}),(0,v.jsxs)("div",{className:"content",style:{paddingLeft:100,marginTop:-28},children:[(0,v.jsx)("div",{children:(0,v.jsx)("a",{onClick:c,children:"\u9009\u62E9\u94FE\u63A5"})}),(0,v.jsx)(R.Z,{value:E,onChange:l,style:{width:360},placeholder:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"})]})]})})}})||i)},47933:function(G,Z,e){"use strict";e.d(Z,{ZP:function(){return T}});var g=e(22122),h=e(96156),j=e(28481),O=e(94184),V=e.n(O),H=e(21770),o=e(67294),R=e(53124),B=e(97647),J=e(5467),k=o.createContext(null),$=k.Provider,y=k,Q=o.createContext(null),v=Q.Provider,f=e(50132),i=e(42550),r=e(98866),u=e(65223),K=function(a,l){var c={};for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&l.indexOf(t)<0&&(c[t]=a[t]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,t=Object.getOwnPropertySymbols(a);n<t.length;n++)l.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(a,t[n])&&(c[t[n]]=a[t[n]]);return c},x=function(l,c){var t,n=o.useContext(y),D=o.useContext(Q),M=o.useContext(R.E_),W=M.getPrefixCls,F=M.direction,L=o.useRef(),z=(0,i.sQ)(c,L),p=(0,o.useContext)(u.aM),te=p.isFormItemInput,w=function(ae){var N,S;(N=l.onChange)===null||N===void 0||N.call(l,ae),(S=n==null?void 0:n.onChange)===null||S===void 0||S.call(n,ae)},ne=l.prefixCls,X=l.className,Y=l.children,oe=l.style,q=l.disabled,re=K(l,["prefixCls","className","children","style","disabled"]),ee=W("radio",ne),U=((n==null?void 0:n.optionType)||D)==="button"?"".concat(ee,"-button"):ee,P=(0,g.Z)({},re),se=o.useContext(r.Z);P.disabled=q||se,n&&(P.name=n.name,P.onChange=w,P.checked=l.value===n.value,P.disabled=P.disabled||n.disabled);var le=V()("".concat(U,"-wrapper"),(t={},(0,h.Z)(t,"".concat(U,"-wrapper-checked"),P.checked),(0,h.Z)(t,"".concat(U,"-wrapper-disabled"),P.disabled),(0,h.Z)(t,"".concat(U,"-wrapper-rtl"),F==="rtl"),(0,h.Z)(t,"".concat(U,"-wrapper-in-form-item"),te),t),X);return o.createElement("label",{className:le,style:oe,onMouseEnter:l.onMouseEnter,onMouseLeave:l.onMouseLeave},o.createElement(f.Z,(0,g.Z)({},P,{type:"radio",prefixCls:U,ref:z})),Y!==void 0?o.createElement("span",null,Y):null)},s=o.forwardRef(x),d=s,b=o.forwardRef(function(a,l){var c,t=o.useContext(R.E_),n=t.getPrefixCls,D=t.direction,M=o.useContext(B.Z),W=(0,H.Z)(a.defaultValue,{value:a.value}),F=(0,j.Z)(W,2),L=F[0],z=F[1],p=function(ue){var me=L,ve=ue.target.value;"value"in a||z(ve);var _e=a.onChange;_e&&ve!==me&&_e(ue)},te=a.prefixCls,w=a.className,ne=w===void 0?"":w,X=a.options,Y=a.buttonStyle,oe=Y===void 0?"outline":Y,q=a.disabled,re=a.children,ee=a.size,U=a.style,P=a.id,se=a.onMouseEnter,le=a.onMouseLeave,ie=a.onFocus,ae=a.onBlur,N=n("radio",te),S="".concat(N,"-group"),de=re;X&&X.length>0&&(de=X.map(function(m){return typeof m=="string"||typeof m=="number"?o.createElement(d,{key:m.toString(),prefixCls:N,disabled:q,value:m,checked:L===m},m):o.createElement(d,{key:"radio-group-value-options-".concat(m.value),prefixCls:N,disabled:m.disabled||q,value:m.value,checked:L===m.value,style:m.style},m.label)}));var ce=ee||M,fe=V()(S,"".concat(S,"-").concat(oe),(c={},(0,h.Z)(c,"".concat(S,"-").concat(ce),ce),(0,h.Z)(c,"".concat(S,"-rtl"),D==="rtl"),c),ne);return o.createElement("div",(0,g.Z)({},(0,J.Z)(a),{className:fe,style:U,onMouseEnter:se,onMouseLeave:le,onFocus:ie,onBlur:ae,id:P,ref:l}),o.createElement($,{value:{onChange:p,value:L,disabled:a.disabled,name:a.name,optionType:a.optionType}},de))}),C=o.memo(b),_=function(a,l){var c={};for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&l.indexOf(t)<0&&(c[t]=a[t]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,t=Object.getOwnPropertySymbols(a);n<t.length;n++)l.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(a,t[n])&&(c[t[n]]=a[t[n]]);return c},I=function(l,c){var t=o.useContext(R.E_),n=t.getPrefixCls,D=l.prefixCls,M=_(l,["prefixCls"]),W=n("radio",D);return o.createElement(v,{value:"button"},o.createElement(d,(0,g.Z)({prefixCls:W},M,{type:"radio",ref:c})))},A=o.forwardRef(I),E=d;E.Button=A,E.Group=C,E.__ANT_RADIO=!0;var T=E},88983:function(G,Z,e){"use strict";var g=e(38663),h=e.n(g),j=e(44943),O=e.n(j)},50132:function(G,Z,e){"use strict";var g=e(22122),h=e(96156),j=e(81253),O=e(28991),V=e(6610),H=e(5991),o=e(10379),R=e(54070),B=e(67294),J=e(94184),k=e.n(J),$=function(y){(0,o.Z)(v,y);var Q=(0,R.Z)(v);function v(f){var i;(0,V.Z)(this,v),i=Q.call(this,f),i.handleChange=function(u){var K=i.props,x=K.disabled,s=K.onChange;x||("checked"in i.props||i.setState({checked:u.target.checked}),s&&s({target:(0,O.Z)((0,O.Z)({},i.props),{},{checked:u.target.checked}),stopPropagation:function(){u.stopPropagation()},preventDefault:function(){u.preventDefault()},nativeEvent:u.nativeEvent}))},i.saveInput=function(u){i.input=u};var r="checked"in f?f.checked:f.defaultChecked;return i.state={checked:r},i}return(0,H.Z)(v,[{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var i,r=this.props,u=r.prefixCls,K=r.className,x=r.style,s=r.name,d=r.id,b=r.type,C=r.disabled,_=r.readOnly,I=r.tabIndex,A=r.onClick,E=r.onFocus,T=r.onBlur,a=r.onKeyDown,l=r.onKeyPress,c=r.onKeyUp,t=r.autoFocus,n=r.value,D=r.required,M=(0,j.Z)(r,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","onKeyDown","onKeyPress","onKeyUp","autoFocus","value","required"]),W=Object.keys(M).reduce(function(z,p){return(p.substr(0,5)==="aria-"||p.substr(0,5)==="data-"||p==="role")&&(z[p]=M[p]),z},{}),F=this.state.checked,L=k()(u,K,(i={},(0,h.Z)(i,"".concat(u,"-checked"),F),(0,h.Z)(i,"".concat(u,"-disabled"),C),i));return B.createElement("span",{className:L,style:x},B.createElement("input",(0,g.Z)({name:s,id:d,type:b,required:D,readOnly:_,disabled:C,tabIndex:I,className:"".concat(u,"-input"),checked:!!F,onClick:A,onFocus:E,onBlur:T,onKeyUp:c,onKeyDown:a,onKeyPress:l,onChange:this.handleChange,autoFocus:t,ref:this.saveInput,value:n},W)),B.createElement("span",{className:"".concat(u,"-inner")}))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return"checked"in i?(0,O.Z)((0,O.Z)({},r),{},{checked:i.checked}):null}}]),v}(B.Component);$.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){}},Z.Z=$}}]);
|