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
11 KiB

3 years ago
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{54679:function(re,L,e){"use strict";e.d(L,{Z:function(){return q}});var x=e(3182),O=e(57337),T=e(94043),a=e.n(T),$=e(96006),I=e(67294),u=e(11849),K=e(43358),U=e(34041),Q=e(20228),R=e(11382),V=e(93224),A=e(23279),d=e.n(A),o=e(85893);function C(z){var P=z.fetchOptions,N=z.debounceTimeout,w=N===void 0?800:N,W=z.initOption,E=(0,V.Z)(z,["fetchOptions","debounceTimeout","initOption"]),Y=I.useState(!1),b=(0,O.Z)(Y,2),G=b[0],g=b[1],y=[],j=null;W&&(y.push(W),j=W.value);var M=I.useState(y),m=(0,O.Z)(M,2),D=m[0],S=m[1],J=I.useRef(0),_=I.useMemo(function(){var X=function(r){J.current+=1;var te=J.current;S([]),g(!0),P(r).then(function(k){te===J.current&&(S(k),g(!1))})};return d()(X,w)},[P,w]);return(0,o.jsx)(U.Z,(0,u.Z)((0,u.Z)({showSearch:!0,filterOption:!1,defaultValue:j,onSearch:_,notFoundContent:G?(0,o.jsx)(R.Z,{size:"small"}):null},E),{},{options:D}))}var F=C,i=function(P){var N=I.useState(),w=(0,O.Z)(N,2),W=w[0],E=w[1];return I.useEffect(function(){if(!!P.value){var Y=function(){var b=(0,x.Z)(a().mark(function G(){var g,y,j,M,m;return a().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,(0,$.l)({id:P.value});case 2:M=S.sent,m={key:(g=M.data)===null||g===void 0?void 0:g.id,label:(y=M.data)===null||y===void 0?void 0:y.name,value:(j=M.data)===null||j===void 0?void 0:j.id},E(m);case 5:case"end":return S.stop()}},G)}));return function(){return b.apply(this,arguments)}}();Y()}},[P.value]),P.value&&!W?null:(0,o.jsx)(F,{initOption:W,fetchOptions:function(){var Y=(0,x.Z)(a().mark(function b(G){var g,y,j;return a().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,(0,$.Jr)({name:G});case 2:if(y=m.sent,!((g=y.data)!==null&&g!==void 0&&g.list)){m.next=5;break}return m.abrupt("return",(j=y.data.list)===null||j===void 0?void 0:j.map(function(D){var S={label:D.name,value:D.id,key:D.id};return S}));case 5:return m.abrupt("return",void 0);case 6:case"end":return m.stop()}},b)}));return function(b){return Y.apply(this,arguments)}}(),onChange:P.onChange,style:{width:"100%"}})},q=i},2599:function(re,L,e){"use strict";e.r(L),e.d(L,{default:function(){return ae}});var x=e(62350),O=e(75443),T=e(3182),a=e(11849),$=e(93224),I=e(94043),u=e.n(I),K=e(54679),U=e(4614);function Q(f,s){return R.apply(this,arguments)}function R(){return R=(0,T.Z)(u().mark(function f(s,n){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,U.WY)("/api/luigi/poem/detail",(0,a.Z)({method:"GET",params:(0,a.Z)({},s)},n||{})));case 1:case"end":return t.stop()}},f)})),R.apply(this,arguments)}function V(f,s){return A.apply(this,arguments)}function A(){return A=(0,T.Z)(u().mark(function f(s,n){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,U.WY)("/api/luigi/poem/list",(0,a.Z)({method:"POST",headers:{"Content-Type":"application/json"},data:s},n||{})));case 1:case"end":return t.stop()}},f)})),A.apply(this,arguments)}function d(f,s){return o.apply(this,arguments)}function o(){return o=(0,T.Z)(u().mark(function f(s,n){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,U.WY)("/api/luigi/poem/save",(0,a.Z)({method:"POST",headers:{"Content-Type":"application/json"},data:s},n||{})));case 1:case"end":return t.stop()}},f)})),o.apply(this,arguments)}var C=e(37006),F=e(67294),i=e(13062),q=e(71230),z=e(89032),P=e(15746),N=e(47673),w=e(4107),W=e(9715),E=e(22712),Y=e(34792),b=e(48086),G=e(57663),g=e(71577),y=e(28991),j={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"minus-circle",theme:"outlined"},M=j,m=e(27029),D=function(s,n){return F.createElement(m.Z,(0,y.Z)((0,y.Z)({},s),{},{ref:n,icon:M}))};D.displayName=