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