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
23 KiB
2 lines
23 KiB
4 months ago
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{3089:function(ce,K,n){n.d(K,{Z:function(){return f}});var w=n(1413),A=n(67294),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},G=H,q=n(91146),i=function(m,Z){return A.createElement(q.Z,(0,w.Z)((0,w.Z)({},m),{},{ref:Z,icon:G}))},y=A.forwardRef(i),f=y},38996:function(ce,K,n){n.r(K),n.d(K,{default:function(){return _e}});var w=n(97857),A=n.n(w),H=n(13769),G=n.n(H),q=n(15009),i=n.n(q),y=n(99289),f=n.n(y),h=n(5574),m=n.n(h),Z=n(48357),M=n(52043),R=n(1413),g=n(67294),de=n(509),te=n(91146),ae=function(S,I){return g.createElement(te.Z,(0,R.Z)((0,R.Z)({},S),{},{ref:I,icon:de.Z}))},ue=g.forwardRef(ae),se=ue,Pe=n(3089),be=n(90930),D=n(8232),W=n(55102),ie=n(42075),O=n(14726),Me=n(55241),pe=n(66309),ne=n(2453),Oe=n(13169),Fe=n(72051),fe=n(17788),Se=n(34041),Be=n(71230),xe=n(15746),ke=n(47676),le=n(16250),Te=n(27484),me=n.n(Te),Ue=n(19632),Ee=n.n(Ue),Ke=n(32400),we=n(56448),Le=n.n(we),Re=n(66476),e=n(85893),We=function(S){var I=S.onUploadSuccess,j=S.onUploadError,C=(0,g.useState)(!1),z=m()(C,2),L=z[0],$=z[1],_=(0,g.useState)([]),X=m()(_,2),k=X[0],Y=X[1],N=(0,g.useState)(null),J=m()(N,2),T=J[0],B=J[1],U=Re.Z.Dragger;(0,g.useEffect)(function(){function r(){return t.apply(this,arguments)}function t(){return t=f()(i()().mark(function v(){var u,o;return i()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.prev=0,p.next=3,(0,Z.po)();case 3:if(u=p.sent,!(!u.data||!u.data.accessKeySecret||!u.data.accessKeyId)){p.next=7;break}return ne.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),p.abrupt("return");case 7:o=new(Le())({region:"oss-cn-beijing",accessKeyId:u.data.accessKeyId,accessKeySecret:u.data.accessKeySecret,stsToken:u.data.securityToken,bucket:u.data.bucket}),B(o),p.next=15;break;case 11:p.prev=11,p.t0=p.catch(0),ne.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),j&&j(p.t0);case 15:case"end":return p.stop()}},v,null,[[0,11]])})),t.apply(this,arguments)}r()},[j]);var Q=function(t){var v=(k||[]).filter(function(u){return u.url!==t.url});Y(v)},c=function(){var r=f()(i()().mark(function t(v){var u,o,x,p;return i()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(u=v.file,!(u instanceof File)){F.next=26;break}return $(!0),F.prev=3,F.next=6,(0,Ke.p)(u);case 6:return o=F.sent,x="matrix/".concat(o,".").concat(u.name.split(".").pop()),F.next=10,T==null?void 0:T.put(x,u,{headers:{"Content-Type":u.type}});case 10:p="https://apks.bzgames.cn/".concat(x),I&&I(p),$(!1),Y(function(oe){return[].concat(Ee()(oe),[{uid:u.uid,name:u.name+"\uFF1A"+p,status:"done",url:p}])}),F.next=21;break;case 16:F.prev=16,F.t0=F.catch(3),ne.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),j&&j(F.t0),Y(function(oe){return[].concat(Ee()(oe),[{uid:u.uid,name:u.name,status:"error"}])});case 21:return F.prev=21,$(!1),F.finish(21);case 24:F.next=27;break;case 26:ne.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(v){return r.apply(this,arguments)}}();return(0,e.jsxs)(U,{fileList:k,multiple:!0,customRequest:c,onRemove:Q,disabled:L||!T,onPreview:function(){var r=f()(i()().mark(function t(v){return i()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,navigator.clipboard.writeText(v.url||"");case 2:ne.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+v.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",c
|