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

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{35388:function(he,w,r){"use strict";r.r(w),r.d(w,{default:function(){return le}});var fe=r(62350),R=r(75443),g=r(3182),p=r(11849),A=r(93224),L=r(94043),l=r.n(L),F=r(57337),S=r(4614);function N(s,n){return I.apply(this,arguments)}function I(){return I=(0,g.Z)(l().mark(function s(n,t){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,S.WY)("/api/luigi/author/get",(0,p.Z)({method:"GET",params:(0,p.Z)({},n)},t||{})));case 1:case"end":return e.stop()}},s)})),I.apply(this,arguments)}function V(s,n){return $.apply(this,arguments)}function $(){return $=(0,g.Z)(l().mark(function s(n,t){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,S.WY)("/api/luigi/author/seek",(0,p.Z)({method:"GET",params:(0,p.Z)({},n)},t||{})));case 1:case"end":return e.stop()}},s)})),$.apply(this,arguments)}var Z=r(67294),ve=r(43358),K=r(34041),ge=r(20228),M=r(11382),H=r(23279),J=r.n(H),a=r(85893);function Q(s){var n=s.fetchOptions,t=s.debounceTimeout,o=t===void 0?800:t,e=s.initOption,c=(0,A.Z)(s,["fetchOptions","debounceTimeout","initOption"]),h=Z.useState(!1),u=(0,F.Z)(h,2),d=u[0],m=u[1],i=[],f=null;e&&(i.push(e),f=e.value);var j=Z.useState(i),v=(0,F.Z)(j,2),x=v[0],y=v[1],P=Z.useRef(0),oe=Z.useMemo(function(){var de=function(ce){P.current+=1;var me=P.current;y([]),m(!0),n(ce).then(function(pe){me===P.current&&(y(pe),m(!1))})};return J()(de,o)},[n,o]);return(0,a.jsx)(K.Z,(0,p.Z)((0,p.Z)({showSearch:!0,filterOption:!1,defaultValue:f,onSearch:oe,notFoundContent:d?(0,a.jsx)(M.Z,{size:"small"}):null},c),{},{options:x}))}var X=Q,k=function(n){var t=Z.useState(),o=(0,F.Z)(t,2),e=o[0],c=o[1];return Z.useEffect(function(){if(!!n.value){var h=function(){var u=(0,g.Z)(l().mark(function d(){var m,i,f,j,v;return l().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,N({id:n.value});case 2:j=y.sent,v={key:(m=j.data)===null||m===void 0?void 0:m.id,label:(i=j.data)===null||i===void 0?void 0:i.name,value:(f=j.data)===null||f===void 0?void 0:f.id},c(v);case 5:case"end":return y.stop()}},d)}));return function(){return u.apply(this,arguments)}}();h()}},[n.value]),n.value&&!e?null:(0,a.jsx)(X,{initOption:e,fetchOptions:function(){var h=(0,g.Z)(l().mark(function u(d){var m,i,f;return l().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,V({name:d});case 2:if(i=v.sent,!((m=i.data)!==null&&m!==void 0&&m.list)){v.next=5;break}return v.abrupt("return",(f=i.data.list)===null||f===void 0?void 0:f.map(function(x){var y={label:x.name,value:x.id,key:x.id};return y}));case 5:return v.abrupt("return",void 0);case 6:case"end":return v.stop()}},u)}));return function(u){return h.apply(this,arguments)}}(),onChange:n.onChange,style:{width:"100%"}})},U=k;function q(s,n){return C.apply(this,arguments)}function C(){return C=(0,g.Z)(l().mark(function s(n,t){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,S.WY)("/api/luigi/poem/detail",(0,p.Z)({method:"GET",params:(0,p.Z)({},n)},t||{})));case 1:case"end":return e.stop()}},s)})),C.apply(this,arguments)}function _(s,n){return E.apply(this,arguments)}function E(){return E=(0,g.Z)(l().mark(function s(n,t){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,S.WY)("/api/luigi/poem/list",(0,p.Z)({method:"POST",headers:{"Content-Type":"application/json"},data:n},t||{})));case 1:case"end":return e.stop()}},s)})),E.apply(this,arguments)}function O(s,n){return B.apply(this,arguments)}function B(){return B=(0,g.Z)(l().mark(function s(n,t){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,S.WY)("/api/luigi/poem/save",(0,p.Z)({method:"POST",headers:{"Content-Type":"application/json"},data:n},t||{})));case 1:case"end":return e.stop()}},s)})),B.apply(this,arguments)}var ee=r(37006),ye=r(13062),te=r(71230),Ze=r(89032),b=r(15746),Te=r(47673),G=r(4107),je=r(9715),T=r(22712),xe=r(34792),re=r(48086),Se=r(57663),z=r(71577),ne=r(59465),ae=r(491