Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
2 lines
8.5 KiB
JavaScript
2 lines
8.5 KiB
JavaScript
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[1909,7476],{31199:function(G,x,e){var p=e(1413),P=e(91),h=e(67294),R=e(43495),j=e(85893),A=["fieldProps","min","proFieldProps","max"],W=function(i,L){var s=i.fieldProps,M=i.min,K=i.proFieldProps,d=i.max,S=(0,P.Z)(i,A);return(0,j.jsx)(R.Z,(0,p.Z)({valueType:"digit",fieldProps:(0,p.Z)({min:M,max:d},s),ref:L,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:K},S))},U=h.forwardRef(W);x.Z=U},5966:function(G,x,e){var p=e(97685),P=e(1413),h=e(91),R=e(21770),j=e(77569),A=e(55241),W=e(98423),U=e(67294),B=e(43495),i=e(85893),L=["fieldProps","proFieldProps"],s=["fieldProps","proFieldProps"],M="text",K=function(n){var r=n.fieldProps,O=n.proFieldProps,m=(0,h.Z)(n,L);return(0,i.jsx)(B.Z,(0,P.Z)({valueType:M,fieldProps:r,filedConfig:{valueType:M},proFieldProps:O},m))},d=function(n){var r=(0,R.Z)(n.open||!1,{value:n.open,onChange:n.onOpenChange}),O=(0,p.Z)(r,2),m=O[0],F=O[1];return(0,i.jsx)(j.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(t){var f,C=t.getFieldValue(n.name||[]);return(0,i.jsx)(A.Z,(0,P.Z)((0,P.Z)({getPopupContainer:function(c){return c&&c.parentNode?c.parentNode:c},onOpenChange:function(c){return F(c)},content:(0,i.jsxs)("div",{style:{padding:"4px 0"},children:[(f=n.statusRender)===null||f===void 0?void 0:f.call(n,C),n.strengthText?(0,i.jsx)("div",{style:{marginTop:10},children:(0,i.jsx)("span",{children:n.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},n.popoverProps),{},{open:m,children:n.children}))}})},S=function(n){var r=n.fieldProps,O=n.proFieldProps,m=(0,h.Z)(n,s),F=(0,U.useState)(!1),g=(0,p.Z)(F,2),t=g[0],f=g[1];return r!=null&&r.statusRender&&m.name?(0,i.jsx)(d,{name:m.name,statusRender:r==null?void 0:r.statusRender,popoverProps:r==null?void 0:r.popoverProps,strengthText:r==null?void 0:r.strengthText,open:t,onOpenChange:f,children:(0,i.jsx)("div",{children:(0,i.jsx)(B.Z,(0,P.Z)({valueType:"password",fieldProps:(0,P.Z)((0,P.Z)({},(0,W.Z)(r,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(I){var c;r==null||(c=r.onBlur)===null||c===void 0||c.call(r,I),f(!1)},onClick:function(I){var c;r==null||(c=r.onClick)===null||c===void 0||c.call(r,I),f(!0)}}),proFieldProps:O,filedConfig:{valueType:M}},m))})}):(0,i.jsx)(B.Z,(0,P.Z)({valueType:"password",fieldProps:r,proFieldProps:O,filedConfig:{valueType:M}},m))},y=K;y.Password=S,y.displayName="ProFormComponent",x.Z=y},37476:function(G,x,e){e.d(x,{Y:function(){return y}});var p=e(55850),P=e(15861),h=e(1413),R=e(97685),j=e(91),A=e(73177),W=e(21532),U=e(17788),B=e(21770),i=e(8880),L=e(80334),s=e(67294),M=e(73935),K=e(78733),d=e(85893),S=["children","trigger","onVisibleChange","onOpenChange","modalProps","onFinish","submitTimeout","title","width","visible","open"];function y(v){var n,r,O=v.children,m=v.trigger,F=v.onVisibleChange,g=v.onOpenChange,t=v.modalProps,f=v.onFinish,C=v.submitTimeout,I=v.title,c=v.width,Z=v.visible,w=v.open,E=(0,j.Z)(v,S);(0,L.ET)(!E.footer||!(t!=null&&t.footer),"ModalForm \u662F\u4E00\u4E2A ProForm \u7684\u7279\u6B8A\u5E03\u5C40\uFF0C\u5982\u679C\u60F3\u81EA\u5B9A\u4E49\u6309\u94AE\uFF0C\u8BF7\u4F7F\u7528 submit.render \u81EA\u5B9A\u4E49\u3002");var z=(0,s.useContext)(W.ZP.ConfigContext),q=(0,s.useState)([]),ee=(0,R.Z)(q,2),ne=ee[1],re=(0,s.useState)(!1),Q=(0,R.Z)(re,2),Y=Q[0],X=Q[1],te=(0,B.Z)(!!Z,{value:w||Z,onChange:g||F}),k=(0,R.Z)(te,2),V=k[0],b=k[1],N=(0,s.useRef)(null),oe=(0,s.useCallback)(function(a){N.current===null&&a&&ne([]),N.current=a},[]),$=(0,s.useRef)(),le=(0,s.useCallback)(function(){var a,o,l,u=(a=(o=E.form)!==null&&o!==void 0?o:(l=E.formRef)===null||l===void 0?void 0:l.current)!==null&&a!==void 0?a:$.current;u&&t!==null&&t!==void 0&&t.destroyOnClose&&u.resetFields()},[t==null?void 0:t.destroyOnClose,E.form,E.formRef]);(0,s.useImperativeHandle)(E.formRef,function(){return $.current},[$.current]),(0,s.useEffect)(function(){(w||Z)&&(g==null||g(!0),F==null||F(!0))},[Z,w]);var se=(0,s.useMemo)(function(){return m?s.cloneElement(m,(0,h.Z)((0,h.Z)({key:"trigger"},m.props),{},{onClick:function(){var a=(0,P.Z)((0,p.Z)().mark(function l(u){var D,_;return(0,p.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:b(!V),(D=m.props)===null||D===void 0||(_=D.onClick)===null||_===void 0||_.call(D,u);case 2:case"end":return T.stop()}},l)}));function o(l){return a.apply(this,arguments)}return o}()})):null},[b,m,V]),ae=(0,s.useMemo)(function(){var a,o,l,u,D,_,H;return E.submitter===!1?!1:(0,i.T)({searchConfig:{submitText:(a=(o=t==null?void 0:t.okText)!==null&&o!==void 0?o:(l=z.locale)===null||l===void 0||(l=l.Modal)===null||l===void 0?void 0:l.okText)!==null&&a!==void 0?a:"\u786E\u8BA4",resetText:(u=(D=t==null?void 0:t.cancelText)!==null&&D!==void 0?D:(_=z.locale)===null||_===void 0||(_=_.Modal)===null||_===void 0?void 0:_.cancelText)!==null&&u!==void 0?u:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:C?Y:void 0,onClick:function(de){var J;b(!1),t==null||(J=t.onCancel)===null||J===void 0||J.call(t,de)}}},(H=E.submitter)!==null&&H!==void 0?H:{})},[(n=z.locale)===null||n===void 0||(n=n.Modal)===null||n===void 0?void 0:n.cancelText,(r=z.locale)===null||r===void 0||(r=r.Modal)===null||r===void 0?void 0:r.okText,t,E.submitter,b,Y,C]),_e=(0,s.useCallback)(function(a,o){return(0,d.jsxs)(d.Fragment,{children:[a,N.current&&o?(0,d.jsx)(s.Fragment,{children:(0,M.createPortal)(o,N.current)},"submitter"):o]})},[]),ie=(0,s.useCallback)(function(){var a=(0,P.Z)((0,p.Z)().mark(function o(l){var u,D,_;return(0,p.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return u=f==null?void 0:f(l),C&&u instanceof Promise&&(X(!0),D=setTimeout(function(){return X(!1)},C),u.finally(function(){clearTimeout(D),X(!1)})),T.next=4,u;case 4:return _=T.sent,_&&b(!1),T.abrupt("return",_);case 7:case"end":return T.stop()}},o)}));return function(o){return a.apply(this,arguments)}}(),[f,b,C]),ue=(0,A.X)(V);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(U.Z,(0,h.Z)((0,h.Z)((0,h.Z)({title:I,width:c||800},t),ue),{},{onCancel:function(o){var l;C&&Y||(b(!1),t==null||(l=t.onCancel)===null||l===void 0||l.call(t,o))},afterClose:function(){var o;le(),V&&b(!1),t==null||(o=t.afterClose)===null||o===void 0||o.call(t)},footer:E.submitter!==!1?(0,d.jsx)("div",{ref:oe,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,d.jsx)(K.I,(0,h.Z)((0,h.Z)({formComponentType:"ModalForm",layout:"vertical"},E),{},{onInit:function(o,l){var u;E.formRef&&(E.formRef.current=l),E==null||(u=E.onInit)===null||u===void 0||u.call(E,o,l),$.current=l},formRef:$,submitter:ae,onFinish:function(){var a=(0,P.Z)((0,p.Z)().mark(function o(l){var u;return(0,p.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,ie(l);case 2:return u=_.sent,_.abrupt("return",u);case 4:case"end":return _.stop()}},o)}));return function(o){return a.apply(this,arguments)}}(),contentRender:_e,children:O}))})),se]})}},31909:function(G,x,e){e.r(x);var p=e(15009),P=e.n(p),h=e(99289),R=e.n(h),j=e(97857),A=e.n(j),W=e(5574),U=e.n(W),B=e(67294),i=e(37476),L=e(31199),s=e(97269),M=e(5966),K=e(77569),d=e(85893),S=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100;return new Promise(function(r){setTimeout(function(){r(!0)},n)})},y=function(n){var r=K.Z.useForm(),O=U()(r,1),m=O[0],F=n.enableStatusEnum;(0,B.useEffect)(function(){m.resetFields(),n.values&&m.setFieldsValue(A()(A()({},n.values),{},{isPush:String(n.values.isPush)}))},[m,n]);var g=function(){n.onCancel()},t=function(){var f=R()(P()().mark(function C(I){return P()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:n.onSubmit(I);case 1:case"end":return Z.stop()}},C)}));return function(I){return f.apply(this,arguments)}}();return(0,d.jsxs)(i.Y,{title:"".concat(n.values?"\u7F16\u8F91":"\u65B0\u589E","\u4F01\u4E1A"),form:m,autoFocusFirstInput:!0,open:n.open,modalProps:{destroyOnClose:!0,onCancel:function(){return g()}},submitTimeout:2e3,onFinish:t,initialValues:{isPush:"1"},children:[(0,d.jsx)(L.Z,{label:"InputNumber",name:"id",disabled:!0,hidden:!0}),(0,d.jsx)(s.A.Group,{children:(0,d.jsx)(M.Z,{width:"md",name:"wechatName",label:"\u5FAE\u4FE1\u540D",placeholder:"\u8BF7\u8F93\u5165\u5FAE\u4FE1\u540D"})}),(0,d.jsx)(s.A.Group,{children:(0,d.jsx)(M.Z,{width:"md",name:"phoneNumber",label:"\u5DE5\u4F5C\u4EBA\u5458\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u4EBA\u5458\u624B\u673A\u53F7\u9700\u8981\u548C\u7B80\u5386\u624B\u673A\u53F7\u4E00\u81F4",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA\u624B\u673A\u53F7!"},{pattern:/^1[3-9]\d{9}$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u683C\u5F0F!"}]})})]})};x.default=y}}]);
|