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

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