Files
houyi-admin/dist/src__pages__note__ads__components__CreateFormModal.680762e2.async.js
PC-202306242200\Administrator 23dc139a31 first commit
2026-03-28 23:25:01 +08:00

2 lines
13 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3166],{78033:function(Y,D,e){e.d(D,{Z:function(){return x}});var o=e(52319),u=e(93236),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},p=a,R=e(85651),i=function(F,j){return u.createElement(R.Z,(0,o.Z)({},F,{ref:j,icon:p}))},x=u.forwardRef(i)},17675:function(Y,D,e){e.d(D,{Z:function(){return x}});var o=e(52319),u=e(93236),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},p=a,R=e(85651),i=function(F,j){return u.createElement(R.Z,(0,o.Z)({},F,{ref:j,icon:p}))},x=u.forwardRef(i)},61786:function(Y,D,e){var o=e(88351),u=e(87841),a=e(93236),p=e(8263),R=e(62086),i=["fieldProps","proFieldProps"],x=["fieldProps","proFieldProps"],Z="text",F=function(t){var T=t.fieldProps,_=t.proFieldProps,O=(0,u.Z)(t,i);return(0,R.jsx)(p.Z,(0,o.Z)({valueType:Z,fieldProps:T,filedConfig:{valueType:Z},proFieldProps:_},O))},j=function(t){var T=t.fieldProps,_=t.proFieldProps,O=(0,u.Z)(t,x);return(0,R.jsx)(p.Z,(0,o.Z)({valueType:"password",fieldProps:T,proFieldProps:_,filedConfig:{valueType:Z}},O))},B=F;B.Password=j,B.displayName="ProFormComponent",D.Z=B},28931:function(Y,D,e){e.d(D,{Y:function(){return q}});var o=e(99177),u=e(42700),a=e(88351),p=e(67654),R=e(87841),i=e(29320),x=e(50126),Z=e(92750),F=e(72266),j=e.n(F),B=e(71639),$=e(24599),t=e(93236),T=e(19103),_=e(96630),O=e(62086),L=["children","trigger","onVisibleChange","onOpenChange","modalProps","onFinish","submitTimeout","title","width","visible","open"];function q(m){var r,E,H,K,S=m.children,g=m.trigger,d=m.onVisibleChange,h=m.onOpenChange,n=m.modalProps,c=m.onFinish,I=m.submitTimeout,w=m.title,J=m.width,W=m.visible,ee=m.open,P=(0,R.Z)(m,L);(0,$.ET)(!P.footer||!(n!=null&&n.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 G=(0,t.useContext)(x.ZP.ConfigContext),le=(0,t.useState)([]),ae=(0,p.Z)(le,2),ie=ae[1],se=(0,t.useState)(!1),ne=(0,p.Z)(se,2),Q=ne[0],te=ne[1],de=(0,B.Z)(!!W,{value:ee||W,onChange:h||d}),U=(0,p.Z)(de,2),b=U[0],A=U[1],k=(0,t.useRef)(null),ue=(0,t.useCallback)(function(s){k.current===null&&s&&ie([]),k.current=s},[]),z=(0,t.useRef)(),me=(0,t.useCallback)(function(){var s,l,f,v=(s=(l=P.form)!==null&&l!==void 0?l:(f=P.formRef)===null||f===void 0?void 0:f.current)!==null&&s!==void 0?s:z.current;v&&n!==null&&n!==void 0&&n.destroyOnClose&&v.resetFields()},[n==null?void 0:n.destroyOnClose,P.form,P.formRef]);(0,t.useImperativeHandle)(P.formRef,function(){return z.current},[z.current]),(0,t.useEffect)(function(){b&&(ee||W)&&(h==null||h(!0),d==null||d(!0))},[W,ee,b]);var pe=(0,t.useMemo)(function(){return g?t.cloneElement(g,(0,a.Z)((0,a.Z)({key:"trigger"},g.props),{},{onClick:function(){var s=(0,u.Z)((0,o.Z)().mark(function f(v){var y,C;return(0,o.Z)().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:A(!b),(y=g.props)===null||y===void 0||(C=y.onClick)===null||C===void 0||C.call(y,v);case 2:case"end":return M.stop()}},f)}));function l(f){return s.apply(this,arguments)}return l}()})):null},[A,g,b]),he=(0,t.useMemo)(function(){var s,l,f,v,y,C,N,M;return P.submitter===!1?!1:j()({searchConfig:{submitText:(s=(l=n==null?void 0:n.okText)!==null&&l!==void 0?l:(f=G.locale)===null||f===void 0||(v=f.Modal)===null||v===void 0?void 0:v.okText)!==null&&s!==void 0?s:"\u786E\u8BA4",resetText:(y=(C=n==null?void 0:n.cancelText)!==null&&C!==void 0?C:(N=G.locale)===null||N===void 0||(M=N.Modal)===null||M===void 0?void 0:M.cancelText)!==null&&y!==void 0?y:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:I?Q:void 0,onClick:function(fe){var oe;A(!1),n==null||(oe=n.onCancel)===null||oe===void 0||oe.call(n,fe)}}},P.submitter)},[(r=G.locale)===null||r===void 0||(E=r.Modal)===null||E===void 0?void 0:E.cancelText,(H=G.locale)===null||H===void 0||(K=H.Modal)===null||K===void 0?void 0:K.okText,n,P.submitter,A,Q,I]),ce=(0,t.useCallback)(function(s,l){return(0,O.jsxs)(O.Fragment,{children:[s,k.current&&l?(0,O.jsx)(t.Fragment,{children:(0,T.createPortal)(l,k.current)},"submitter"):l]})},[]),Ce=(0,t.useCallback)(function(){var s=(0,u.Z)((0,o.Z)().mark(function l(f){var v,y,C;return(0,o.Z)().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return v=c==null?void 0:c(f),I&&v instanceof Promise&&(te(!0),y=setTimeout(function(){return te(!1)},I),v.finally(function(){clearTimeout(y),te(!1)})),M.next=4,v;case 4:return C=M.sent,C&&A(!1),M.abrupt("return",C);case 7:case"end":return M.stop()}},l)}));return function(l){return s.apply(this,arguments)}}(),[c,A,I]),ve=(0,i.X)(b);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Z.Z,(0,a.Z)((0,a.Z)((0,a.Z)({title:w,width:J||800},n),ve),{},{onCancel:function(l){var f;I&&Q||(A(!1),n==null||(f=n.onCancel)===null||f===void 0||f.call(n,l))},afterClose:function(){var l;me(),A(!1),n==null||(l=n.afterClose)===null||l===void 0||l.call(n)},footer:P.submitter!==!1?(0,O.jsx)("div",{ref:ue,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,O.jsx)(_.I,(0,a.Z)((0,a.Z)({formComponentType:"ModalForm",layout:"vertical"},P),{},{onInit:function(l,f){var v;P.formRef&&(P.formRef.current=f),P==null||(v=P.onInit)===null||v===void 0||v.call(P,l,f),z.current=f},formRef:z,submitter:he,onFinish:function(){var s=(0,u.Z)((0,o.Z)().mark(function l(f){var v;return(0,o.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,Ce(f);case 2:return v=C.sent,C.abrupt("return",v);case 4:case"end":return C.stop()}},l)}));return function(l){return s.apply(this,arguments)}}(),contentRender:ce,children:S}))})),pe]})}},40882:function(Y,D,e){e.d(D,{A:function(){return S}});var o=e(88351),u=e(84974),a=e(93236),p=e(96630),R=e(5424),i=e(40749),x=e(67654),Z=e(67817),F=e(71639),j=e(80128),B=e(50126),$=e(61385),t=e(84875),T=e.n(t),_=e(75986),O=e(16216),L=e(21983),q=function(d){var h;return(0,i.Z)({},d.componentCls,{"&-title":{marginBlockEnd:d.marginXL,fontWeight:"bold"},"&-container":(0,i.Z)({flexWrap:"wrap",maxWidth:"100%"},"> div".concat(d.antCls,"-space-item"),{maxWidth:"100%"}),"&-twoLine":(h={display:"block",width:"100%"},(0,i.Z)(h,"".concat(d.componentCls,"-title"),{width:"100%",margin:"8px 0"}),(0,i.Z)(h,"".concat(d.componentCls,"-container"),{paddingInlineStart:16}),(0,i.Z)(h,"".concat(d.antCls,"-space-item,").concat(d.antCls,"-form-item"),{width:"100%"}),(0,i.Z)(h,"".concat(d.antCls,"-form-item"),{"&-control":{display:"flex",alignItems:"center",justifyContent:"flex-end","&-input":{alignItems:"center",justifyContent:"flex-end","&-content":{flex:"none"}}}}),h)})};function m(g){return(0,L.Xj)("ProFormGroup",function(d){var h=(0,o.Z)((0,o.Z)({},d),{},{componentCls:".".concat(g)});return[q(h)]})}var r=e(62086),E=a.forwardRef(function(g,d){var h=a.useContext(_.Z),n=h.groupProps,c=(0,o.Z)((0,o.Z)({},n),g),I=c.children,w=c.collapsible,J=c.defaultCollapsed,W=c.style,ee=c.labelLayout,P=c.title,G=P===void 0?g.label:P,le=c.tooltip,ae=c.align,ie=ae===void 0?"start":ae,se=c.direction,ne=c.size,Q=ne===void 0?32:ne,te=c.titleStyle,de=c.titleRender,U=c.spaceProps,b=c.extra,A=c.autoFocus,k=(0,F.Z)(function(){return J||!1},{value:g.collapsed,onChange:g.onCollapse}),ue=(0,x.Z)(k,2),z=ue[0],me=ue[1],pe=(0,a.useContext)(B.ZP.ConfigContext),he=pe.getPrefixCls,ce=(0,O.zx)(g),Ce=ce.ColWrapper,ve=ce.RowWrapper,s=he("pro-form-group"),l=m(s),f=l.wrapSSR,v=l.hashId,y=w&&(0,r.jsx)(Z.Z,{style:{marginInlineEnd:8},rotate:z?void 0:90}),C=(0,r.jsx)(j.G,{label:y?(0,r.jsxs)("div",{children:[y,G]}):G,tooltip:le}),N=(0,a.useCallback)(function(X){var re=X.children;return(0,r.jsx)($.Z,(0,o.Z)((0,o.Z)({},U),{},{className:T()("".concat(s,"-container ").concat(v),U==null?void 0:U.className),size:Q,align:ie,direction:se,style:(0,o.Z)({rowGap:0},U==null?void 0:U.style),children:re}))},[ie,s,se,v,Q,U]),M=de?de(C,g):C,ge=(0,a.useMemo)(function(){var X=[],re=a.Children.toArray(I).map(function(V,Ee){var Pe;return a.isValidElement(V)&&V!==null&&V!==void 0&&(Pe=V.props)!==null&&Pe!==void 0&&Pe.hidden?(X.push(V),null):Ee===0&&a.isValidElement(V)&&A?a.cloneElement(V,(0,o.Z)((0,o.Z)({},V.props),{},{autoFocus:A})):V});return[(0,r.jsx)(ve,{Wrapper:N,children:re},"children"),X.length>0?(0,r.jsx)("div",{style:{display:"none"},children:X}):null]},[I,ve,N,A]),fe=(0,x.Z)(ge,2),oe=fe[0],xe=fe[1];return f((0,r.jsx)(Ce,{children:(0,r.jsxs)("div",{className:T()(s,v,(0,i.Z)({},"".concat(s,"-twoLine"),ee==="twoLine")),style:W,ref:d,children:[xe,(G||le||b)&&(0,r.jsx)("div",{className:"".concat(s,"-title ").concat(v).trim(),style:te,onClick:function(){me(!z)},children:b?(0,r.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[M,(0,r.jsx)("span",{onClick:function(re){return re.stopPropagation()},children:b})]}):M}),(0,r.jsx)("div",{style:{display:w&&z?"none":void 0},children:oe})]})}))});E.displayName="ProForm-Group";var H=E,K=e(9664);function S(g){return(0,r.jsx)(p.I,(0,o.Z)({layout:"vertical",submitter:{render:function(h,n){return n.reverse()}},contentRender:function(h,n){return(0,r.jsxs)(r.Fragment,{children:[h,n]})}},g))}S.Group=H,S.useForm=u.Z.useForm,S.Item=K.Z,S.useWatch=u.Z.useWatch,S.ErrorList=u.Z.ErrorList,S.Provider=u.Z.Provider,S.useFormInstance=u.Z.useFormInstance,S.EditOrReadOnlyContext=R.A},80128:function(Y,D,e){e.d(D,{G:function(){return q}});var o=e(88351),u=e(40749),a=e(52319),p=e(93236),R={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},i=R,x=e(85651),Z=function(r,E){return p.createElement(x.Z,(0,a.Z)({},r,{ref:E,icon:i}))},F=p.forwardRef(Z),j=e(50126),B=e(87087),$=e(84875),t=e.n($),T=e(21983),_=function(r){return(0,u.Z)({},r.componentCls,{display:"inline-flex",alignItems:"center",maxWidth:"100%","&-icon":{display:"block",marginInlineStart:"4px",cursor:"pointer","&:hover":{color:r.colorPrimary}},"&-title":{display:"inline-flex",flex:"1"},"&-subtitle ":{marginInlineStart:8,color:r.colorTextSecondary,fontWeight:"normal",fontSize:r.fontSize,whiteSpace:"nowrap"},"&-title-ellipsis":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"keep-all"}})};function O(m){return(0,T.Xj)("LabelIconTip",function(r){var E=(0,o.Z)((0,o.Z)({},r),{},{componentCls:".".concat(m)});return[_(E)]})}var L=e(62086),q=p.memo(function(m){var r=m.label,E=m.tooltip,H=m.ellipsis,K=m.subTitle,S=(0,p.useContext)(j.ZP.ConfigContext),g=S.getPrefixCls,d=g("pro-core-label-tip"),h=O(d),n=h.wrapSSR,c=h.hashId;if(!E&&!K)return(0,L.jsx)(L.Fragment,{children:r});var I=typeof E=="string"||p.isValidElement(E)?{title:E}:E,w=(I==null?void 0:I.icon)||(0,L.jsx)(F,{});return n((0,L.jsxs)("div",{className:t()(d,c),onMouseDown:function(W){return W.stopPropagation()},onMouseLeave:function(W){return W.stopPropagation()},onMouseMove:function(W){return W.stopPropagation()},children:[(0,L.jsx)("div",{className:t()("".concat(d,"-title"),c,(0,u.Z)({},"".concat(d,"-title-ellipsis"),H)),children:r}),K&&(0,L.jsx)("div",{className:"".concat(d,"-subtitle ").concat(c).trim(),children:K}),E&&(0,L.jsx)(B.Z,(0,o.Z)((0,o.Z)({},I),{},{children:(0,L.jsx)("span",{className:"".concat(d,"-icon ").concat(c).trim(),children:w})}))]}))})},29082:function(Y,D,e){e.r(D);var o=e(28931),u=e(61786),a=e(40882),p=e(93236),R=e(48970),i=e(62086);D.default=function(x){var Z=x.values,F=x.modalOpenState,j=x.onModalOpenState,B=x.onSubmit,$=(0,p.useRef)();return(0,p.useEffect)(function(){var t;(t=$.current)===null||t===void 0||t.setFieldsValue(Z)},[Z]),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(o.Y,{title:"\u5E7F\u544A-\u6DFB\u52A0",formRef:$,submitter:{searchConfig:{resetText:"\u91CD\u7F6E"},resetButtonProps:{onClick:function(){var T;(T=$.current)===null||T===void 0||T.resetFields()}}},initialValues:Z,onFinish:B,open:F,onOpenChange:j,children:[(0,i.jsx)(u.Z,{hidden:!0,width:"md",name:"id"}),(0,i.jsxs)(a.A.Group,{children:[(0,i.jsx)(u.Z,{width:"md",name:"title",label:"\u6807\u9898",placeholder:"\u8BF7\u8F93\u5165"}),(0,i.jsx)(u.Z,{width:"md",name:"path",label:"\u8DF3\u8F6C\u8DEF\u5F84",placeholder:"\u8BF7\u8F93\u5165"})]}),(0,i.jsx)(a.A.Group,{children:(0,i.jsx)(a.A.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],label:"\u56FE\u7247",name:"cover",children:(0,i.jsx)(R.Z,{fileType:"image",defaultValue:"",count:1,mode:""})})})]})})}}}]);