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,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),o=s.n(oe),fe=s(99289),Z=s.n(fe),ae=s(5574),x=s.n(ae),L=s(48357),G=s(52043),N=s(40110),me=s(3089),ue=s(90930),v=s(8232),B=s(55102),R=s(42075),I=s(14726),Se=s(55241),se=s(66309),z=s(2453),Ze=s(13169),ve=s(72051),Q=s(17788),pe=s(34041),Ie=s(71230),je=s(15746),ye=s(47676),X=s(16250),De=s(27484),J=s.n(De),g=s(67294),ke=s(19632),Fe=s.n(ke),Ae=s(32400),Ee=s(56448),be=s.n(Ee),Pe=s(66476),e=s(85893),Te=function(K){var P=K.onUploadSuccess,M=K.onUploadError,E=(0,g.useState)(!1),$=x()(E,2),O=$[0],T=$[1],Y=(0,g.useState)([]),U=x()(Y,2),F=U[0],f=U[1],j=(0,g.useState)(null),S=x()(j,2),y=S[0],D=S[1],C=Pe.Z.Dragger;(0,g.useEffect)(function(){function n(){return r.apply(this,arguments)}function r(){return r=Z()(o()().mark(function i(){var u,m;return o()().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}),D(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"),M&&M(d.t0);case 15:case"end":return d.stop()}},i,null,[[0,11]])})),r.apply(this,arguments)}n()},[M]);var h=function(r){var i=(F||[]).filter(function(u){return u.url!==r.url});f(i)},t=function(){var n=Z()(o()().mark(function r(i){var u,m,k,d;return o()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(u=i.file,!(u instanceof File)){A.next=26;break}return T(!0),A.prev=3,A.next=6,(0,Ae.p)(u);case 6:return m=A.sent,k="matrix/".concat(m,".").concat(u.name.split(".").pop()),A.next=10,y==null?void 0:y.put(k,u,{headers:{"Content-Type":u.type}});case 10:d="https://apks.bzgames.cn/".concat(k),P&&P(d),T(!1),f(function(ne){return[].concat(Fe()(ne),[{uid:u.uid,name:u.name+"\uFF1A"+d,status:"done",url:d}])}),A.next=21;break;case 16:A.prev=16,A.t0=A.catch(3),z.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),M&&M(A.t0),f(function(ne){return[].concat(Fe()(ne),[{uid:u.uid,name:u.name,status:"error"}])});case 21:return A.prev=21,T(!1),A.finish(21);case 24:A.next=27;break;case 26:z.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return A.stop()}},r,null,[[3,16,21,24]])}));return function(i){return n.apply(this,arguments)}}();return(0,e.jsxs)(C,{fileList:F,multiple:!0,customRequest:t,onRemove:h,disabled:O||!y,onPreview:function(){var n=Z()(o()().mark(function r(i){return o()().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"})]})},Me=Te,ie=s(67539),H=s(4575),we=function(){var K=(0,g.useState)(!1),P=x()(K,2),M=P[0],E=P[1],$=(0,g.useState)([]),O=x()($,2),T=O[0],Y=O[1],U=(0,g.useState)([]),F=x()(U,2),f=F[0],j=F[1],S=v.Z.useForm(),y=x()(S,1),D=y[0],C=[{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
|