Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ac-upload

Package Overview
Dependencies
Maintainers
15
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ac-upload - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

build/ac-upload.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React"),require("TinperBee"),require("PropTypes")):"function"==typeof define&&define.amd?define(["React","TinperBee","PropTypes"],e):"object"==typeof exports?exports["ac-upload"]=e(require("React"),require("TinperBee"),require("PropTypes")):t["ac-upload"]=e(t.React,t.TinperBee,t.PropTypes)}(window,function(t,e,n){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=20)}([function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(3),o=n(0),i=n(11),u=n(26),a=n(6),c=function(t,e,n){var f,s,l,p=t&c.F,d=t&c.G,y=t&c.S,v=t&c.P,h=t&c.B,m=t&c.W,b=d?o:o[e]||(o[e]={}),x=b.prototype,_=d?r:y?r[e]:(r[e]||{}).prototype;for(f in d&&(n=e),n)(s=!p&&_&&void 0!==_[f])&&a(b,f)||(l=s?_[f]:n[f],b[f]=d&&"function"!=typeof _[f]?n[f]:h&&s?i(l,r):m&&_[f]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?i(Function.call,l):l,v&&((b.virtual||(b.virtual={}))[f]=l,t&c.R&&x&&!x[f]&&u(x,f,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(4),o=n(12),i=n(14),u=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(33),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(45)("keys"),o=n(47);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(25);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){t.exports=!n(1)&&!n(8)(function(){return 7!=Object.defineProperty(n(13)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(5),o=n(3).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){n(21),t.exports=n(57)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=p(n(22)),o=p(n(27)),i=p(n(35)),u=p(n(49)),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,r.default)(t,o.key,o)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(54),f=p(c),s=n(55),l=p(n(56));function p(t){return t&&t.__esModule?t:{default:t}}var d={title:l.default.string,multiple:l.default.bool,action:l.default.string,showUploadList:l.default.bool,accept:l.default.string,name:l.default.string,data:l.default.object,maxSize:l.default.number,isView:l.default.bool},y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||(0,u.default)(e)).call(this,t));return n.componentWillReceiveProps=function(t){n.setState({historyData:t.defaultFileList})},n.defaultFileListToList=function(t){var e=[];if(Array.isArray(t))for(var n=0;n<t.length;n++)null==t[n].del&&e.push({uid:t[n].fileName,name:t[n].originalFileName,status:"done",url:t[n].accessAddress});return e},n.showModeHandler=function(t){t&&t.stopPropagation(),n.setState({show:!0})},n.hideModelHandler=function(){n.setState({show:!1})},n.viewFileHandler=function(){n.setState({show:!0})},n.state={show:!1,historyData:t.defaultFileList},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(o.default?(0,o.default)(t,e):t.__proto__=e)}(e,c.Component),a(e,[{key:"render",value:function(){var t=this,e={name:this.props.name,data:this.props.data,size:this.props.maxSize,multiple:this.props.multiple,showUploadList:this.props.showUploadList,action:this.props.action,accept:this.props.accept,defaultFileList:this.defaultFileListToList(this.state.historyData),onChange:function(e){"done"==e.file.status&&(t.props.onSuccess&&t.props.onSuccess(e.file.response),t.props.multiple||t.setState({show:!1})),"error"==e.file.status&&t.props.onError&&t.props.onError(),"uploading"==e.file.status&&console.log("uploading"),"removed"==e.file.status&&(console.log(e),t.props.onDelete&&t.props.onDelete(e.file))}};return f.default.createElement("span",{className:"ac-upload-wrap"},f.default.createElement("span",{onClick:this.showModeHandler},this.props.children),f.default.createElement(s.Modal,{dialogClassName:"ac-upload-modal",backdrop:!1,autoFocus:!1,enforceFocus:!1,show:this.state.show,onHide:this.hideModelHandler},f.default.createElement(s.Modal.Header,{closeButton:!0},f.default.createElement(s.Modal.Title,null,this.props.title)),f.default.createElement(s.Modal.Body,null,f.default.createElement("div",{className:"ac-upload-wrap"},f.default.createElement(s.Upload,e,!this.props.isView&&f.default.createElement("div",{className:"opeat"},f.default.createElement("div",{className:"svg-ready"}),f.default.createElement("div",{className:"upload-tips"},"点击选择上传文件"))),this.props.isView&&0==this.props.defaultFileList.length&&f.default.createElement("div",{className:"opeat"},f.default.createElement("div",{className:"svg-no-pic"}),f.default.createElement("div",{style:{fontSize:"14px"},className:"upload-tips"},"暂无附件"))))))}}]),e}();y.propTypes=d,y.defaultProps={title:"文件上传",multiple:!1,action:"/iuap_pap_quickstart/fileMananger/fastDfs/imgUpload",showUploadList:!0,accept:"",name:"files[]",data:{},maxSize:1024e7,defaultFileList:[],isView:!1},e.default=y},function(t,e,n){t.exports={default:n(23),__esModule:!0}},function(t,e,n){n(24);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(2);r(r.S+r.F*!n(1),"Object",{defineProperty:n(7).f})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(7),o=n(15);t.exports=n(1)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports={default:n(28),__esModule:!0}},function(t,e,n){n(29),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(30).set})},function(t,e,n){var r=n(5),o=n(4),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(11)(Function.call,n(31).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){var r=n(32),o=n(15),i=n(9),u=n(14),a=n(6),c=n(12),f=Object.getOwnPropertyDescriptor;e.f=n(1)?f:function(t,e){if(t=i(t),e=u(e,!0),c)try{return f(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){t.exports={default:n(36),__esModule:!0}},function(t,e,n){n(37);var r=n(0).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(2);r(r.S,"Object",{create:n(38)})},function(t,e,n){var r=n(4),o=n(39),i=n(18),u=n(10)("IE_PROTO"),a=function(){},c=function(){var t,e=n(13)("iframe"),r=i.length;for(e.style.display="none",n(48).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[u]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(7),o=n(4),i=n(40);t.exports=n(1)?Object.defineProperties:function(t,e){o(t);for(var n,u=i(e),a=u.length,c=0;a>c;)r.f(t,n=u[c++],e[n]);return t}},function(t,e,n){var r=n(41),o=n(18);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(6),o=n(9),i=n(42)(!1),u=n(10)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),c=0,f=[];for(n in a)n!=u&&r(a,n)&&f.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~i(f,n)||f.push(n));return f}},function(t,e,n){var r=n(9),o=n(43),i=n(44);t.exports=function(t){return function(e,n,u){var a,c=r(e),f=o(c.length),s=i(u,f);if(t&&n!=n){for(;f>s;)if((a=c[s++])!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===n)return t||s||0;return!t&&-1}}},function(t,e,n){var r=n(17),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(17),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(0),o=n(3),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(46)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(3).document;t.exports=r&&r.documentElement},function(t,e,n){t.exports={default:n(50),__esModule:!0}},function(t,e,n){n(51),t.exports=n(0).Object.getPrototypeOf},function(t,e,n){var r=n(19),o=n(52);n(53)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(6),o=n(19),i=n(10)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(2),o=n(0),i=n(8);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],u={};u[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",u)}},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e,n){}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React"),require("TinperBee"),require("PropTypes")):"function"==typeof define&&define.amd?define(["React","TinperBee","PropTypes"],e):"object"==typeof exports?exports["ac-upload"]=e(require("React"),require("TinperBee"),require("PropTypes")):t["ac-upload"]=e(t.React,t.TinperBee,t.PropTypes)}(window,function(t,e,n){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=20)}([function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(3),o=n(0),i=n(11),u=n(26),a=n(6),c=function(t,e,n){var f,s,l,p=t&c.F,d=t&c.G,y=t&c.S,v=t&c.P,h=t&c.B,m=t&c.W,b=d?o:o[e]||(o[e]={}),x=b.prototype,_=d?r:y?r[e]:(r[e]||{}).prototype;for(f in d&&(n=e),n)(s=!p&&_&&void 0!==_[f])&&a(b,f)||(l=s?_[f]:n[f],b[f]=d&&"function"!=typeof _[f]?n[f]:h&&s?i(l,r):m&&_[f]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?i(Function.call,l):l,v&&((b.virtual||(b.virtual={}))[f]=l,t&c.R&&x&&!x[f]&&u(x,f,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(4),o=n(12),i=n(14),u=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(33),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(45)("keys"),o=n(47);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(25);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){t.exports=!n(1)&&!n(8)(function(){return 7!=Object.defineProperty(n(13)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(5),o=n(3).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){n(21),t.exports=n(57)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=p(n(22)),o=p(n(27)),i=p(n(35)),u=p(n(49)),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,r.default)(t,o.key,o)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(54),f=p(c),s=n(55),l=p(n(56));function p(t){return t&&t.__esModule?t:{default:t}}var d={title:l.default.string,multiple:l.default.bool,action:l.default.string,showUploadList:l.default.bool,accept:l.default.string,name:l.default.string,data:l.default.object,maxSize:l.default.number,isView:l.default.bool},y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||(0,u.default)(e)).call(this,t));return n.componentWillReceiveProps=function(t){n.setState({historyData:t.defaultFileList})},n.defaultFileListToList=function(t){var e=[];if(Array.isArray(t))for(var n=0;n<t.length;n++)null==t[n].del&&e.push({uid:t[n].fileName,name:t[n].fileName,status:"done",url:t[n].accessAddress});return e},n.showModeHandler=function(t){t&&t.stopPropagation(),n.setState({show:!0})},n.hideModelHandler=function(){n.setState({show:!1})},n.viewFileHandler=function(){n.setState({show:!0})},n.state={show:!1,historyData:t.defaultFileList},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(o.default?(0,o.default)(t,e):t.__proto__=e)}(e,c.Component),a(e,[{key:"render",value:function(){var t=this,e={name:this.props.name,data:this.props.data,size:this.props.maxSize,multiple:this.props.multiple,showUploadList:this.props.showUploadList,action:this.props.action,accept:this.props.accept,defaultFileList:this.defaultFileListToList(this.state.historyData),onChange:function(e){"done"==e.file.status&&(t.props.onSuccess&&t.props.onSuccess(e.file.response),t.props.multiple||t.setState({show:!1})),"error"==e.file.status&&t.props.onError&&t.props.onError(),e.file.status,"removed"==e.file.status&&t.props.onDelete&&t.props.onDelete(e.file)}};return f.default.createElement("span",{className:"ac-upload-wrap"},f.default.createElement("span",{onClick:this.showModeHandler},this.props.children),f.default.createElement(s.Modal,{dialogClassName:"ac-upload-modal",backdrop:!1,autoFocus:!1,enforceFocus:!1,show:this.state.show,onHide:this.hideModelHandler},f.default.createElement(s.Modal.Header,{closeButton:!0},f.default.createElement(s.Modal.Title,null,this.props.title)),f.default.createElement(s.Modal.Body,null,f.default.createElement("div",{className:"ac-upload-wrap"},f.default.createElement(s.Upload,e,!this.props.isView&&f.default.createElement("div",{className:"opeat"},f.default.createElement("div",{className:"svg-ready"}),f.default.createElement("div",{className:"upload-tips"},"点击选择上传文件"))),this.props.isView&&0==this.props.defaultFileList.length&&f.default.createElement("div",{className:"opeat"},f.default.createElement("div",{className:"svg-no-pic"}),f.default.createElement("div",{style:{fontSize:"14px"},className:"upload-tips"},"暂无附件"))))))}}]),e}();y.propTypes=d,y.defaultProps={title:"文件上传",multiple:!1,action:"/iuap_pap_quickstart/fileMananger/fastDfs/imgUpload",showUploadList:!0,accept:"",name:"files[]",data:{},maxSize:1024e7,defaultFileList:[],isView:!1},e.default=y},function(t,e,n){t.exports={default:n(23),__esModule:!0}},function(t,e,n){n(24);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(2);r(r.S+r.F*!n(1),"Object",{defineProperty:n(7).f})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(7),o=n(15);t.exports=n(1)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports={default:n(28),__esModule:!0}},function(t,e,n){n(29),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(30).set})},function(t,e,n){var r=n(5),o=n(4),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(11)(Function.call,n(31).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){var r=n(32),o=n(15),i=n(9),u=n(14),a=n(6),c=n(12),f=Object.getOwnPropertyDescriptor;e.f=n(1)?f:function(t,e){if(t=i(t),e=u(e,!0),c)try{return f(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){t.exports={default:n(36),__esModule:!0}},function(t,e,n){n(37);var r=n(0).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(2);r(r.S,"Object",{create:n(38)})},function(t,e,n){var r=n(4),o=n(39),i=n(18),u=n(10)("IE_PROTO"),a=function(){},c=function(){var t,e=n(13)("iframe"),r=i.length;for(e.style.display="none",n(48).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[u]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(7),o=n(4),i=n(40);t.exports=n(1)?Object.defineProperties:function(t,e){o(t);for(var n,u=i(e),a=u.length,c=0;a>c;)r.f(t,n=u[c++],e[n]);return t}},function(t,e,n){var r=n(41),o=n(18);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(6),o=n(9),i=n(42)(!1),u=n(10)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),c=0,f=[];for(n in a)n!=u&&r(a,n)&&f.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~i(f,n)||f.push(n));return f}},function(t,e,n){var r=n(9),o=n(43),i=n(44);t.exports=function(t){return function(e,n,u){var a,c=r(e),f=o(c.length),s=i(u,f);if(t&&n!=n){for(;f>s;)if((a=c[s++])!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===n)return t||s||0;return!t&&-1}}},function(t,e,n){var r=n(17),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(17),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(0),o=n(3),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(46)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(3).document;t.exports=r&&r.documentElement},function(t,e,n){t.exports={default:n(50),__esModule:!0}},function(t,e,n){n(51),t.exports=n(0).Object.getPrototypeOf},function(t,e,n){var r=n(19),o=n(52);n(53)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(6),o=n(19),i=n(10)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(2),o=n(0),i=n(8);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],u={};u[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",u)}},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e,n){}])});

@@ -76,3 +76,3 @@ 'use strict';

uid: _list[i].fileName,
name: _list[i].originalFileName,
name: _list[i].fileName,
status: 'done',

@@ -139,7 +139,4 @@ url: _list[i].accessAddress

}
if (msg.file.status == 'uploading') {
console.log('uploading');
}
if (msg.file.status == 'uploading') {}
if (msg.file.status == 'removed') {
console.log(msg);
_this2.props.onDelete && _this2.props.onDelete(msg.file);

@@ -146,0 +143,0 @@ }

{
"name": "ac-upload",
"version": "0.1.2",
"version": "0.1.3",
"description": "tinper-bee ac upload components",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -61,2 +61,3 @@ ## AC-Upload

9|onError|function|上传失败后的回调,用于处理后续失败操作
10|maxSize|number|附件限制大小
10|maxSize|number|附件限制大小
11|onDelete|function|删除的时候触发的回调参数为file对象

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc