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
27 KiB
2 lines
27 KiB
5 months ago
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{3089:function(he,L,n){n.d(L,{Z:function(){return p}});var U=n(1413),S=n(67294),$={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=$,w=n(91146),i=function(h,D){return S.createElement(w.Z,(0,U.Z)((0,U.Z)({},h),{},{ref:D,icon:M}))},F=S.forwardRef(i),p=F},40110:function(he,L,n){var U=n(1413),S=n(67294),$=n(509),M=n(91146),w=function(p,j){return S.createElement(M.Z,(0,U.Z)((0,U.Z)({},p),{},{ref:j,icon:$.Z}))},i=S.forwardRef(w);L.Z=i},28490:function(he,L,n){n.r(L),n.d(L,{default:function(){return We}});var U=n(97857),S=n.n(U),$=n(13769),M=n.n($),w=n(15009),i=n.n(w),F=n(99289),p=n.n(F),j=n(5574),h=n.n(j),D=n(48357),E=n(52043),O=n(40110),ne=n(3089),G=n(90930),o=n(8232),C=n(55102),b=n(42075),y=n(14726),K=n(55241),Se=n(66309),c=n(2453),Pe=n(13169),De=n(72051),je=n(17788),Ze=n(34041),be=n(71230),k=n(15746),xe=n(47676),H=n(16250),Fe=n(27484),re=n.n(Fe),x=n(67294),me=n(19632),ge=n.n(me),Ie=n(32400),Me=n(56448),Oe=n.n(Me),z=n(66476),e=n(85893),P=function(le){var X=le.onUploadSuccess,N=le.onUploadError,V=(0,x.useState)(!1),oe=h()(V,2),ee=oe[0],ae=oe[1],pe=(0,x.useState)([]),ce=h()(pe,2),J=ce[0],se=ce[1],ue=(0,x.useState)(null),de=h()(ue,2),Q=de[0],Y=de[1],_=z.Z.Dragger;(0,x.useEffect)(function(){function r(){return t.apply(this,arguments)}function t(){return t=p()(i()().mark(function v(){var s,d;return i()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=0,g.next=3,(0,D.po)();case 3:if(s=g.sent,!(!s.data||!s.data.accessKeySecret||!s.data.accessKeyId)){g.next=7;break}return c.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),g.abrupt("return");case 7:d=new(Oe())({region:"oss-cn-beijing",accessKeyId:s.data.accessKeyId,accessKeySecret:s.data.accessKeySecret,stsToken:s.data.securityToken,bucket:s.data.bucket}),Y(d),g.next=15;break;case 11:g.prev=11,g.t0=g.catch(0),c.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),N&&N(g.t0);case 15:case"end":return g.stop()}},v,null,[[0,11]])})),t.apply(this,arguments)}r()},[N]);var fe=function(t){var v=(J||[]).filter(function(s){return s.url!==t.url});se(v)},f=function(){var r=p()(i()().mark(function t(v){var s,d,Z,g;return i()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(s=v.file,!(s instanceof File)){A.next=26;break}return ae(!0),A.prev=3,A.next=6,(0,Ie.p)(s);case 6:return d=A.sent,Z="matrix/".concat(d,".").concat(s.name.split(".").pop()),A.next=10,Q==null?void 0:Q.put(Z,s,{headers:{"Content-Type":s.type}});case 10:g="https://apks.bzgames.cn/".concat(Z),X&&X(g),ae(!1),se(function(Ae){return[].concat(ge()(Ae),[{uid:s.uid,name:s.name+"\uFF1A"+g,status:"done",url:g}])}),A.next=21;break;case 16:A.prev=16,A.t0=A.catch(3),c.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),N&&N(A.t0),se(function(Ae){return[].concat(ge()(Ae),[{uid:s.uid,name:s.name,status:"error"}])});case 21:return A.prev=21,ae(!1),A.finish(21);case 24:A.next=27;break;case 26:c.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return A.stop()}},t,null,[[3,16,21,24]])}));return function(v){return r.apply(this,arguments)}}();return(0,e.jsxs)(_,{fileList:J,multiple:!0,customRequest:f,onRemove:fe,disabled:ee||!Q,onPreview:function(){var r=p()(i()().mark(function t(v){return i()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,navigator.clipboard.writeText(v.url||"");case 2:c.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+v.url);case 3:case"end":return d.stop()}},t)}));return function(t){return r.apply(this,arguments)}}(),capture:void 0,children:[(0,e.jsx)("p",{className:"ant-upload-drag-icon",children:(0,e.jsx)("i",{className:"anticon antico
|