mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-01 06:20:17 +00:00
1 line
1.5 KiB
JavaScript
1 line
1.5 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[8355],{57057:function(e,n,a){a(90819),a(73193),a(89933),a(45332),a(94956),a(40629),a(16698),a(87663),a(5488),a(14870),a(44194),a(31549)},65398:function(e,n,a){a(90819),a(73193),a(89933),a(45332),a(94956),a(33232),a(40629),a(16698),a(68100),a(87663),a(5488),a(14870),a(44194),a(31549)},92023:function(e,n,a){a.d(n,{G:function(){return d}});var i=a(73193),o=a.n(i),r=(a(44194),a(15435)),l=a(5488),t=a(28977),f=a.n(t),s=a(95660),c=a(5025),u=a(18580),p=a(31549),d=function(e){var n=e.children,a=e.onSuccess,i=e.onError,t={file:null,fileName:"test.png",fileType:"image/png",isAvatar:"true",kbType:l.IrL,categoryUid:"",kbUid:"",channel:l.XtJ},d={name:"file",accept:"image/*",action:(0,u.M$)(),headers:{Authorization:"Bearer "+localStorage.getItem(l.LA8)},data:t,showUploadList:!1,beforeUpload:function(e){s.Z.log("beforeUpload",e);var n=f()(new Date).format("YYYYMMDDHHmmss")+"_"+e.name;return t.file=e,t.fileName=n,t.fileType=e.type,s.Z.log("beforeUpload",t),!0},onChange:function(e){if("uploading"!==e.file.status&&s.Z.log("not uploading:",e.file),"done"===e.file.status)if(s.Z.log("response: ",e.file.response),200===e.file.response.code){var n=e.file.response.data.fileUrl;a(n),c.yw.success("".concat(e.file.name," 上传成功"))}else i(e.file),c.yw.error("".concat(e.file.name," 上传失败"));else"error"===e.file.status&&(c.yw.error("".concat(e.file.name," 上传失败")),i(e.file))}};return(0,p.jsx)(r.Z,o()(o()({},d),{},{children:n}))}}}]); |