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
26 KiB
2 lines
26 KiB
4 months ago
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{87450:function(ge,re,i){i.r(re),i.d(re,{default:function(){return Ge}});var le=i(97857),ee=i.n(le),ce=i(13769),te=i.n(ce),de=i(15009),f=i.n(de),oe=i(99289),y=i.n(oe),ae=i(5574),v=i.n(ae),W=i(48357),z=i(52043),H=i(40110),fe=i(3089),ue=i(90930),h=i(8232),b=i(55102),L=i(42075),C=i(14726),Ze=i(55241),se=i(66309),X=i(2453),Ie=i(13169),me=i(72051),q=i(17788),pe=i(34041),De=i(71230),ye=i(15746),Fe=i(47676),J=i(16250),Ae=i(27484),Q=i.n(Ae),j=i(67294),Ee=i(19632),Ce=i.n(Ee),ke=i(32400),Pe=i(56448),be=i.n(Pe),Me=i(66476),e=i(85893),Be=function(K){var I=K.onUploadSuccess,A=K.onUploadError,S=(0,j.useState)(!1),U=v()(S,2),E=U[0],B=U[1],N=(0,j.useState)([]),Y=v()(N,2),D=Y[0],T=Y[1],w=(0,j.useState)(null),$=v()(w,2),M=$[0],x=$[1],k=Me.Z.Dragger;(0,j.useEffect)(function(){function n(){return t.apply(this,arguments)}function t(){return t=y()(f()().mark(function a(){var r,u;return f()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,l.next=3,(0,W.po)();case 3:if(r=l.sent,!(!r.data||!r.data.accessKeySecret||!r.data.accessKeyId)){l.next=7;break}return X.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),l.abrupt("return");case 7:u=new(be())({region:"oss-cn-beijing",accessKeyId:r.data.accessKeyId,accessKeySecret:r.data.accessKeySecret,stsToken:r.data.securityToken,bucket:r.data.bucket}),x(u),l.next=15;break;case 11:l.prev=11,l.t0=l.catch(0),X.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),A&&A(l.t0);case 15:case"end":return l.stop()}},a,null,[[0,11]])})),t.apply(this,arguments)}n()},[A]);var R=function(t){var a=(D||[]).filter(function(r){return r.url!==t.url});T(a)},c=function(){var n=y()(f()().mark(function t(a){var r,u,p,l;return f()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(r=a.file,!(r instanceof File)){F.next=26;break}return B(!0),F.prev=3,F.next=6,(0,ke.p)(r);case 6:return u=F.sent,p="matrix/".concat(u,".").concat(r.name.split(".").pop()),F.next=10,M==null?void 0:M.put(p,r,{headers:{"Content-Type":r.type}});case 10:l="https://apks.bzgames.cn/".concat(p),I&&I(l),B(!1),T(function(Z){return[].concat(Ce()(Z),[{uid:r.uid,name:r.name+"\uFF1A"+l,status:"done",url:l}])}),F.next=21;break;case 16:F.prev=16,F.t0=F.catch(3),X.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),A&&A(F.t0),T(function(Z){return[].concat(Ce()(Z),[{uid:r.uid,name:r.name,status:"error"}])});case 21:return F.prev=21,B(!1),F.finish(21);case 24:F.next=27;break;case 26:X.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return F.stop()}},t,null,[[3,16,21,24]])}));return function(a){return n.apply(this,arguments)}}();return(0,e.jsxs)(k,{fileList:D,multiple:!0,customRequest:c,onRemove:R,disabled:E||!M,onPreview:function(){var n=y()(f()().mark(function t(a){return f()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,navigator.clipboard.writeText(a.url||"");case 2:X.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+a.url);case 3:case"end":return u.stop()}},t)}));return function(t){return n.apply(this,arguments)}}(),capture:void 0,children:[(0,e.jsx)("p",{className:"ant-upload-drag-icon",children:(0,e.jsx)("i",{className:"anticon anticon-inbox"})}),(0,e.jsx)("p",{className:"ant-upload-text",children:"\u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20"}),(0,e.jsx)("p",{className:"ant-upload-hint",children:"\u652F\u6301\u5355\u4E2A\u6216\u6279\u91CF\u4E0A\u4F20\u3002\u6587\u4EF6\u540D\u5C06\u4F7F\u7528\u6587\u4EF6\u7684 MD5 \u503C\u547D\u540D\u3002"})]})},we=Be,he=i(67539),V=i(4575),Te=function(){var K=(0,j.useState)(!1),I=v()(K,2),A=I[0],S=I[1],U=(0,j.useState)([]),E=v()(U,2),B=E[0],N=E[1],Y=(0,j.useState)([]),D=v()(Y,2),T=D[0],w=D[1],$=h.Z.useForm(),M=v()($,1),x=M[0],k=[{title:"\u5E94\u7528\u540D",dataIndex:"name",copyable:!0,hideInSearch:!0,filterDropdown:function(n){var t=n.setSelectedKeys,a=n.selectedKeys,r=n.confirm,u=n.clearFilters;return(0,e.jsxs)("div",{style:{padding:8},children:[(0,e.jsx)(b.Z,{placeholder:"\u641C\
|