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.
 
 
 

2 lines
13 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7751],{64893:function(me,z,e){"use strict";e.d(z,{G:function(){return P}});var p=e(96156),W=e(28481),n=e(28991),R=e(81253),S=e(85893),Y=["colon","dependencies","extra","getValueFromEvent","getValueProps","hasFeedback","help","htmlFor","initialValue","noStyle","label","labelAlign","labelCol","name","preserve","normalize","required","rules","shouldUpdate","trigger","validateFirst","validateStatus","validateTrigger","valuePropName","wrapperCol","hidden","addonBefore","addonAfter"];function B(M){var g={};return Y.forEach(function(y){M[y]!==void 0&&(g[y]=M[y])}),g}var K=e(51812),C=e(26369),d=e(60249),b=e(94184),T=e.n(b),k=e(48526),s=e(80334),r=e(67294),a=e(30939),G=e(82785),q=e(97462),ee=e(66758),V=e(2514),Q=["valueType","customLightMode","lightFilterLabelFormatter","valuePropName","ignoreWidth","defaultProps"],N=["label","tooltip","placeholder","width","bordered","messageVariables","ignoreFormItem","transform","convertValue","readonly","allowClear","colSize","getFormItemProps","getFieldProps","filedConfig","cacheForSwr","proFieldProps"],ae=Symbol("ProFormComponent"),$={xs:104,s:216,sm:216,m:328,md:328,l:440,lg:440,xl:552},D=["switch","radioButton","radio","rate"];function P(M,g){M.displayName="ProFormComponent";var y=function(t){var o=(0,n.Z)((0,n.Z)({},t==null?void 0:t.filedConfig),g)||{},v=o.valueType,l=o.customLightMode,c=o.lightFilterLabelFormatter,O=o.valuePropName,Z=O===void 0?"value":O,_=o.ignoreWidth,L=o.defaultProps,A=(0,R.Z)(o,Q),i=(0,n.Z)((0,n.Z)({},L),t),h=i.label,de=i.tooltip,ue=i.placeholder,j=i.width,Ce=i.bordered,fe=i.messageVariables,ie=i.ignoreFormItem,he=i.transform,pe=i.convertValue,oe=i.readonly,ce=i.allowClear,Ze=i.colSize,w=i.getFormItemProps,ne=i.getFieldProps,De=i.filedConfig,Pe=i.cacheForSwr,I=i.proFieldProps,u=(0,R.Z)(i,N),E=v||u.valueType,ve=(0,r.useMemo)(function(){return _||D.includes(E)},[_,E]),Fe=(0,r.useState)(),Me=(0,W.Z)(Fe,2),Ee=Me[1],ge=(0,r.useState)(),ye=(0,W.Z)(ge,2),Oe=ye[0],se=ye[1],F=r.useContext(ee.Z),X=(0,r.useMemo)(function(){return{formItemProps:w==null?void 0:w(),fieldProps:ne==null?void 0:ne()}},[ne,w,u.dependenciesValues,Oe]),m=(0,r.useMemo)(function(){var f=(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)({},ie?(0,K.Z)({value:u.value}):{}),{},{placeholder:ue,disabled:t.disabled},F.fieldProps),X.fieldProps),u.fieldProps);return f.style=(0,K.Z)(f==null?void 0:f.style),f},[ie,u.value,u.fieldProps,ue,t.disabled,F.fieldProps,X.fieldProps]),xe=B(u),Se=(0,r.useMemo)(function(){return(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)({},F.formItemProps),xe),X.formItemProps),u.formItemProps)},[X.formItemProps,F.formItemProps,u.formItemProps,xe]),U=(0,r.useMemo)(function(){return(0,n.Z)((0,n.Z)({messageVariables:fe},A),Se)},[A,Se,fe]);(0,s.ET)(!u.defaultValue,"\u8BF7\u4E0D\u8981\u5728 Form \u4E2D\u4F7F\u7528 defaultXXX\u3002\u5982\u679C\u9700\u8981\u9ED8\u8BA4\u503C\u8BF7\u4F7F\u7528 initialValues \u548C initialValue\u3002");var Be=(0,r.useContext)(k.zb),Ie=Be.prefixName,Te=(0,r.useMemo)(function(){var f,x=U==null?void 0:U.name;Array.isArray(x)&&(x=x.join("_")),Array.isArray(Ie)&&x&&(x="".concat(Ie.join("."),".").concat(x));var te=x&&"form-".concat((f=F.formKey)!==null&&f!==void 0?f:"","-field-").concat(x);return te},[(0,a.P)(U==null?void 0:U.name),Ie,F.formKey]),Ue=(0,C.Z)(u),Ne=(0,r.useCallback)(function(){var f;w||ne?se([]):u.renderFormItem&&Ee([]);for(var x=arguments.length,te=new Array(x),le=0;le<x;le++)te[le]=arguments[le];m==null||(f=m.onChange)===null||f===void 0||f.call.apply(f,[m].concat(te))},[ne,w,m,u.renderFormItem]),Le=(0,r.useMemo)(function(){var f=(0,n.Z)({width:j&&!$[j]?j:F.grid?"100%":void 0},m==null?void 0:m.style);return ve&&Reflect.deleteProperty(f,"width"),(0,K.Z)(f)},[(0,a.P)(m==null?void 0:m.style),F.grid,ve,j]),Ae=(0,r.useMemo)(function(){var f=j&&$[j];return T()(m==null?void 0:m.className,(0,p.Z)({"pro-field":f},"pro-field-".concat(j),f&&!ve))||void 0},[j,m==null?void 0:m.className,ve]),We=(0,r.useMemo)(function(){return(0,K.Z)((0,n.Z)({mode:u==null?void 0:u.mode,readonly:oe,params:u.params,proFieldKey:Te,cacheForSwr:Pe},I))},[u==null?void 0:u.mode,u.params,oe,Te,Pe,I]),Re=(0,r.useMemo)(function(){return(0,n.Z)((0,n.Z)({onChange:Ne,allowClear:ce},m),{},{style:Le,className:Ae})},[ce,Ae,Ne,m,Le]),re=(0,r.useMemo)(function(){return(0,S.jsx)(M,(0,n.Z)((0,n.Z)({},u),{},{fieldProps:Re,proFieldProps:We,ref:t==null?void 0:t.fieldRef}),t.proFormFieldKey||t.name)},[We,Re,(0,d.Z)(Ue,u,["onChange","onBlur","onFocus","record"])?void 0:{}]),Ke=(0,r.useMemo)(function(){var f,x,te,le;return(0,S.jsx)(G.Z,(0,n.Z)((0,n.Z)({label:h&&(I==null?void 0:I.light)!==!0?h:void 0,tooltip:(I==null?void 0:I.light)!==!0&&de,valuePropName:Z},U),{},{ignoreFormItem:ie,transform:he,dataFormat:m==null?void 0:m.format,valueType:E,messageVariables:(0,n.Z)({label:h||""},U==null?void 0:U.messageVariables),convertValue:pe,lightProps:(0,K.Z)((0,n.Z)((0,n.Z)((0,n.Z)({},m),{},{valueType:E,bordered:Ce,allowClear:(f=re==null||(x=re.props)===null||x===void 0?void 0:x.allowClear)!==null&&f!==void 0?f:ce,light:I==null?void 0:I.light,label:h,customLightMode:l,labelFormatter:c,valuePropName:Z,footerRender:re==null||(te=re.props)===null||te===void 0?void 0:te.footerRender},u.lightProps),U.lightProps)),children:re}),t.proFormFieldKey||((le=U.name)===null||le===void 0?void 0:le.toString()))},[h,I==null?void 0:I.light,de,Z,t.proFormFieldKey,U,ie,he,m,E,pe,Ce,re,ce,l,c,u.lightProps]),be=(0,V.zx)(u),Ve=be.ColWrapper;return(0,S.jsx)(Ve,{children:Ke})},J=function(t){var o=t.dependencies;return o?(0,S.jsx)(q.Z,{name:o,children:function(l){return(0,S.jsx)(y,(0,n.Z)({dependenciesValues:l,dependencies:o},t))}}):(0,S.jsx)(y,(0,n.Z)({dependencies:o},t))};return J}},97462:function(me,z,e){"use strict";var p=e(28991),W=e(9715),n=e(71257),R=e(81253),S=e(85893),Y=e(41036),B=e(60249),K=e(92210),C=e(88306),d=e(8880),b=e(67294),T=e(59962),k=["name","children","ignoreFormListField"],s=function(a){var G=a.name,q=a.children,ee=a.ignoreFormListField,V=(0,R.Z)(a,k),Q=(0,b.useContext)(Y.Z),N=(0,b.useContext)(T.J),ae=(0,b.useMemo)(function(){return G.map(function($){var D,P=[$];return!ee&&N.name!==void 0&&((D=N.listName)===null||D===void 0?void 0:D.length)&&P.unshift(N.listName),P.flat(1)})},[N.listName,N.name,ee,G]);return(0,S.jsx)(n.Z.Item,(0,p.Z)((0,p.Z)({},V),{},{noStyle:!0,shouldUpdate:function(D,P,M){if(typeof V.shouldUpdate=="boolean")return V.shouldUpdate;if(typeof V.shouldUpdate=="function"){var g;return(g=V.shouldUpdate)===null||g===void 0?void 0:g.call(V,D,P,M)}return ae.some(function(y){return!(0,B.Z)((0,C.Z)(D,y),(0,C.Z)(P,y))})},children:function(D){for(var P={},M=0;M<G.length;M++){var g,y=ae[M],J=G[M],H=[J].flat(1),t=(g=Q.getFieldFormatValueObject)===null||g===void 0?void 0:g.call(Q,y);if(t&&Object.keys(t).length)P=(0,K.T)({},P,t),(0,C.Z)(t,y)&&(P=(0,d.Z)(P,H,(0,C.Z)(t,y),!1));else{var o;t=(o=D.getFieldValue)===null||o===void 0?void 0:o.call(D,y),typeof t!="undefined"&&(P=(0,d.Z)(P,H,t,!1))}}return q==null?void 0:q(P,(0,p.Z)((0,p.Z)({},D),Q))}}))};z.Z=s},31649:function(me,z,e){"use strict";var p=e(28991),W=e(81253),n=e(85893),R=e(1705),S=e(22270),Y=e(60249),B=e(67294),K=e(64893),C=e(9105),d=["fieldProps","children","labelCol","label","autoFocus","isDefaultDom","render","proFieldProps","renderFormItem","valueType","initialValue","onChange","valueEnum","params","name","dependenciesValues","cacheForSwr","valuePropName"],b=function(s){var r=s.fieldProps,a=s.children,G=s.labelCol,q=s.label,ee=s.autoFocus,V=s.isDefaultDom,Q=s.render,N=s.proFieldProps,ae=s.renderFormItem,$=s.valueType,D=s.initialValue,P=s.onChange,M=s.valueEnum,g=s.params,y=s.name,J=s.dependenciesValues,H=s.cacheForSwr,t=H===void 0?!1:H,o=s.valuePropName,v=o===void 0?"value":o,l=(0,W.Z)(s,d),c=(0,B.useContext)(C.A),O=(0,B.useMemo)(function(){return J&&l.request?(0,p.Z)((0,p.Z)({},g),J||{}):g},[J,g,l.request]),Z=(0,B.useMemo)(function(){if(a)return B.isValidElement(a)?B.cloneElement(a,(0,p.Z)((0,p.Z)({},l),{},{onChange:function(){for(var L=arguments.length,A=new Array(L),i=0;i<L;i++)A[i]=arguments[i];if(r==null?void 0:r.onChange){var h;r==null||(h=r.onChange)===null||h===void 0||h.call.apply(h,[r].concat(A));return}P==null||P.apply(void 0,A)}},a.props)):(0,n.jsx)(n.Fragment,{children:a})},[a,r==null?void 0:r.onChange,P,l]);return Z||(0,n.jsx)(R.ZP,(0,p.Z)((0,p.Z)((0,p.Z)({text:r==null?void 0:r[v],render:Q,renderFormItem:ae,valueType:$||"text",cacheForSwr:t,fieldProps:(0,p.Z)((0,p.Z)({autoFocus:ee},r),{},{onChange:function(){if(r==null?void 0:r.onChange){for(var L,A=arguments.length,i=new Array(A),h=0;h<A;h++)i[h]=arguments[h];r==null||(L=r.onChange)===null||L===void 0||L.call.apply(L,[r].concat(i));return}}}),valueEnum:(0,S.h)(M)},N),l),{},{mode:(N==null?void 0:N.mode)||c.mode||"edit",params:O}))},T=(0,K.G)((0,B.memo)(b,function(k,s){return(0,Y.Z)(s,k,["onChange","onBlur"])}));z.Z=T},3178:function(){},76772:function(me,z,e){"use strict";e.d(z,{Z:function(){return H}});var p=e(22122),W=e(28481),n=e(96156),R=e(38819),S=e(15873),Y=e(43061),B=e(73218),K=e(54549),C=e(68855),d=e(57119),b=e(40847),T=e(68628),k=e(94184),s=e.n(k),r=e(63441),a=e(67294),G=e(53124),q=e(5467),ee=e(96159),V=e(6610),Q=e(5991),N=e(10379),ae=e(54070),$=function(t){(0,N.Z)(v,t);var o=(0,ae.Z)(v);function v(){var l;return(0,V.Z)(this,v),l=o.apply(this,arguments),l.state={error:void 0,info:{componentStack:""}},l}return(0,Q.Z)(v,[{key:"componentDidCatch",value:function(c,O){this.setState({error:c,info:O})}},{key:"render",value:function(){var c=this.props,O=c.message,Z=c.description,_=c.children,L=this.state,A=L.error,i=L.info,h=i&&i.componentStack?i.componentStack:null,de=typeof O=="undefined"?(A||"").toString():O,ue=typeof Z=="undefined"?h:Z;return A?a.createElement(H,{type:"error",message:de,description:a.createElement("pre",null,ue)}):_}}]),v}(a.Component),D=function(t,o){var v={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&o.indexOf(l)<0&&(v[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(t);c<l.length;c++)o.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(t,l[c])&&(v[l[c]]=t[l[c]]);return v},P={success:R.Z,info:b.Z,error:Y.Z,warning:C.Z},M={success:S.Z,info:T.Z,error:B.Z,warning:d.Z},g=function(o){var v=o.description,l=o.icon,c=o.prefixCls,O=o.type,Z=(v?M:P)[O]||null;return l?(0,ee.wm)(l,a.createElement("span",{className:"".concat(c,"-icon")},l),function(){return{className:s()("".concat(c,"-icon"),(0,n.Z)({},l.props.className,l.props.className))}}):a.createElement(Z,{className:"".concat(c,"-icon")})},y=function(o){var v=o.isClosable,l=o.closeText,c=o.prefixCls,O=o.closeIcon,Z=o.handleClose;return v?a.createElement("button",{type:"button",onClick:Z,className:"".concat(c,"-close-icon"),tabIndex:0},l?a.createElement("span",{className:"".concat(c,"-close-text")},l):O):null},J=function(o){var v,l=o.description,c=o.prefixCls,O=o.message,Z=o.banner,_=o.className,L=_===void 0?"":_,A=o.style,i=o.onMouseEnter,h=o.onMouseLeave,de=o.onClick,ue=o.afterClose,j=o.showIcon,Ce=o.closable,fe=o.closeText,ie=o.closeIcon,he=ie===void 0?a.createElement(K.Z,null):ie,pe=o.action,oe=D(o,["description","prefixCls","message","banner","className","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),ce=a.useState(!1),Ze=(0,W.Z)(ce,2),w=Ze[0],ne=Ze[1],De=a.useRef(),Pe=a.useContext(G.E_),I=Pe.getPrefixCls,u=Pe.direction,E=I("alert",c),ve=function(F){var X;ne(!0),(X=oe.onClose)===null||X===void 0||X.call(oe,F)},Fe=function(){var F=oe.type;return F!==void 0?F:Z?"warning":"info"},Me=fe?!0:Ce,Ee=Fe(),ge=Z&&j===void 0?!0:j,ye=s()(E,"".concat(E,"-").concat(Ee),(v={},(0,n.Z)(v,"".concat(E,"-with-description"),!!l),(0,n.Z)(v,"".concat(E,"-no-icon"),!ge),(0,n.Z)(v,"".concat(E,"-banner"),!!Z),(0,n.Z)(v,"".concat(E,"-rtl"),u==="rtl"),v),L),Oe=(0,q.Z)(oe);return a.createElement(r.Z,{visible:!w,motionName:"".concat(E,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:function(F){return{maxHeight:F.offsetHeight}},onLeaveEnd:ue},function(se){var F=se.className,X=se.style;return a.createElement("div",(0,p.Z)({ref:De,"data-show":!w,className:s()(ye,F),style:(0,p.Z)((0,p.Z)({},A),X),onMouseEnter:i,onMouseLeave:h,onClick:de,role:"alert"},Oe),ge?a.createElement(g,{description:l,icon:oe.icon,prefixCls:E,type:Ee}):null,a.createElement("div",{className:"".concat(E,"-content")},O?a.createElement("div",{className:"".concat(E,"-message")},O):null,l?a.createElement("div",{className:"".concat(E,"-description")},l):null),pe?a.createElement("div",{className:"".concat(E,"-action")},pe):null,a.createElement(y,{isClosable:!!Me,closeText:fe,prefixCls:E,closeIcon:he,handleClose:ve}))})};J.ErrorBoundary=$;var H=J},17462:function(me,z,e){"use strict";var p=e(38663),W=e.n(p),n=e(3178),R=e.n(n)},30939:function(me,z,e){"use strict";e.d(z,{P:function(){return R}});var p=e(67294);function W(C){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W=function(d){return typeof d}:W=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},W(C)}var n=function(){var d=new WeakSet;return function(b,T){if(W(T)==="object"&&T!==null){if(d.has(T))return;d.add(T)}return T}},R=function(d){return JSON.stringify(d,n())},S=function(d,b){try{return R(d)===R(b)}catch(T){}return!1};function Y(C){var d=useRef("");return S(C,d.current)||(d.current=JSON.stringify(C,n())),d.current}function B(C,d){useEffect(C,[Y(d)])}var K=null}}]);