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

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