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

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{87450:function(ge,re,s){s.r(re),s.d(re,{default:function(){return Ve}});var ce=s(97857),_=s.n(ce),de=s(13769),te=s.n(de),oe=s(15009),f=s.n(oe),fe=s(99289),S=s.n(fe),ae=s(5574),g=s.n(ae),L=s(48357),G=s(52043),H=s(40110),me=s(3089),ue=s(90930),x=s(8232),B=s(55102),R=s(42075),D=s(14726),Se=s(55241),se=s(66309),z=s(2453),Ie=s(13169),ve=s(72051),Q=s(17788),pe=s(34041),Ze=s(71230),je=s(15746),xe=s(47676),X=s(16250),De=s(27484),J=s.n(De),I=s(67294),ke=s(19632),ye=s.n(ke),Ee=s(32400),Ae=s(56448),be=s.n(Ae),Pe=s(66476),e=s(85893),Te=function(K){var P=K.onUploadSuccess,w=K.onUploadError,A=(0,I.useState)(!1),Y=g()(A,2),O=Y[0],T=Y[1],$=(0,I.useState)([]),U=g()($,2),F=U[0],o=U[1],j=(0,I.useState)(null),C=g()(j,2),v=C[0],Z=C[1],y=Pe.Z.Dragger;(0,I.useEffect)(function(){function n(){return r.apply(this,arguments)}function r(){return r=S()(f()().mark(function i(){var u,m;return f()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,(0,L.po)();case 3:if(u=d.sent,!(!u.data||!u.data.accessKeySecret||!u.data.accessKeyId)){d.next=7;break}return z.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),d.abrupt("return");case 7:m=new(be())({region:"oss-cn-beijing",accessKeyId:u.data.accessKeyId,accessKeySecret:u.data.accessKeySecret,stsToken:u.data.securityToken,bucket:u.data.bucket}),Z(m),d.next=15;break;case 11:d.prev=11,d.t0=d.catch(0),z.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),w&&w(d.t0);case 15:case"end":return d.stop()}},i,null,[[0,11]])})),r.apply(this,arguments)}n()},[w]);var h=function(r){var i=(F||[]).filter(function(u){return u.url!==r.url});o(i)},t=function(){var n=S()(f()().mark(function r(i){var u,m,k,d;return f()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(u=i.file,!(u instanceof File)){E.next=26;break}return T(!0),E.prev=3,E.next=6,(0,Ee.p)(u);case 6:return m=E.sent,k="matrix/".concat(m,".").concat(u.name.split(".").pop()),E.next=10,v==null?void 0:v.put(k,u,{headers:{"Content-Type":u.type}});case 10:d="https://apks.bzgames.cn/".concat(k),P&&P(d),T(!1),o(function(ne){return[].concat(ye()(ne),[{uid:u.uid,name:u.name+"\uFF1A"+d,status:"done",url:d}])}),E.next=21;break;case 16:E.prev=16,E.t0=E.catch(3),z.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),w&&w(E.t0),o(function(ne){return[].concat(ye()(ne),[{uid:u.uid,name:u.name,status:"error"}])});case 21:return E.prev=21,T(!1),E.finish(21);case 24:E.next=27;break;case 26:z.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return E.stop()}},r,null,[[3,16,21,24]])}));return function(i){return n.apply(this,arguments)}}();return(0,e.jsxs)(y,{fileList:F,multiple:!0,customRequest:t,onRemove:h,disabled:O||!v,onPreview:function(){var n=S()(f()().mark(function r(i){return f()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,navigator.clipboard.writeText(i.url||"");case 2:z.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+i.url);case 3:case"end":return m.stop()}},r)}));return function(r){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=Te,ie=s(67539),N=s(4575),Me=function(){var K=(0,I.useState)(!1),P=g()(K,2),w=P[0],A=P[1],Y=(0,I.useState)([]),O=g()(Y,2),T=O[0],$=O[1],U=(0,I.useState)([]),F=g()(U,2),o=F[0],j=F[1],C=x.Z.useForm(),v=g()(C,1),Z=v[0],y=[{title:"\u5E94\u7528\u540D",dataIndex:"name",copyable:!0,hideInSearch:!0,filterDropdown:function(n){var r=n.setSelectedKeys,i=n.selectedKeys,u=n.confirm,m=n.clearFilters;return(0,e.jsxs)("div",{style:{padding:8},children:[(0,e.jsx)(B.Z,{placeholder:"\u64