react-tencent-captcha
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -1,2 +0,2 @@ | ||
import e from"react";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c,i="react-tencent-captcha",s=(c="Function",function(e){return Object.prototype.toString.call(e)==="[object ".concat(c,"]")}),u=function(c){function u(){var t,o,c;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),o=this,c=r(u).apply(this,arguments),t=!c||"object"!=typeof c&&"function"!=typeof c?a(o):c,n(a(t),"init",function(){var e=a(t);if(window.TencentCaptcha)e.ready();else{var n=document.getElementById(i);if(n){if(e.script)return;return n.addEventListener("Im-ready",e.ready,!1),void(e.script=n)}var r=document.createElement("script");r.id=i,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,e.ready(),e.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,e.ready(),e.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o),e.script=r}}),n(a(t),"ready",function(e){var n=a(t),r=n.props,o=r.appId,c=r.options,i=r.onCallBack,u=r.onReady;if(window.TencentCaptcha&&!n.instance&&n.dom&&n.dom.current){var p=new window.TencentCaptcha(n.dom.current,o,i,c);n.instance=p,n.script&&s(n.script.removeEventListener)&&n.script.removeEventListener("Im-ready",n.ready,!1),s(u)&&u(p)}}),n(a(t),"destroy",function(){var e=a(t);e.script&&s(e.script.removeEventListener)&&e.script.removeEventListener("Im-ready",e.ready,!1),e.instance&&s(e.instance.destroy)&&e.instance.destroy(),e.instance=null,e.script=null}),n(a(t),"triggerEvent",function(e){var n=a(t);if(n.script&&s(n.script.dispatchEvent)){var r=document.createEvent("Event");r.initEvent(e,!0,!0),n.script.dispatchEvent(r)}});var p=a(t);return p.dom=e.createRef(),p.instance=null,p.script=null,t}var p,l,d;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(u,e.PureComponent),p=u,(l=[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t){this.init()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.children;return e.createElement("div",{ref:this.dom,className:n},r)}}])&&t(p.prototype,l),d&&t(p,d),u}();n(u,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}});export default u; | ||
import e from"react";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c,i="react-tencent-captcha",s=(c="Function",function(e){return Object.prototype.toString.call(e)==="[object ".concat(c,"]")}),u=function(c){function u(){var t,a,c;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a=this,c=r(u).apply(this,arguments),t=!c||"object"!=typeof c&&"function"!=typeof c?o(a):c,n(o(t),"create",function(){var e=o(t);if(window.TencentCaptcha)e.ready();else{var n=document.getElementById(i);if(n){if(e.script)return;return n.addEventListener("Im-ready",e.ready,!1),void(e.script=n)}var r=document.createElement("script");r.id=i,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,e.ready(),e.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,e.ready(),e.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a),e.script=r}}),n(o(t),"ready",function(e){var n=o(t),r=n.props,a=r.appId,c=r.options,i=r.onCallBack,u=r.onReady;if(window.TencentCaptcha&&!n.instance&&n.dom&&n.dom.current){var p=new window.TencentCaptcha(n.dom.current,a,i,c);n.instance=p,n.script&&s(n.script.removeEventListener)&&n.script.removeEventListener("Im-ready",n.ready,!1),s(u)&&u(p)}}),n(o(t),"destroy",function(){var e=o(t);e.script&&s(e.script.removeEventListener)&&e.script.removeEventListener("Im-ready",e.ready,!1),e.instance&&s(e.instance.destroy)&&e.instance.destroy(),e.instance=null,e.script=null}),n(o(t),"triggerEvent",function(e){var n=o(t);if(n.script&&s(n.script.dispatchEvent)){var r=document.createEvent("Event");r.initEvent(e,!0,!0),n.script.dispatchEvent(r)}});var p=o(t);return p.dom=e.createRef(),p.instance=null,p.script=null,t}var p,l,d;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(u,e.PureComponent),p=u,(l=[{key:"componentDidMount",value:function(){this.create()}},{key:"componentDidUpdate",value:function(e,t){this.create()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.children;return e.createElement("div",{ref:this.dom,className:n},r||null)}}])&&t(p.prototype,l),d&&t(p,d),u}();n(u,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}});export default u; | ||
//# sourceMappingURL=tcaptcha.esm.min.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=_interopDefault(require("react"));function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}var SCRIPT_ID="react-tencent-captcha",typeOf=function(e){return function(t){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}},isFunction=typeOf("Function"),TCaptcha=function(e){function t(){var e;_classCallCheck(this,t),_defineProperty(_assertThisInitialized(e=_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))),"init",function(){var t=_assertThisInitialized(e);if(window.TencentCaptcha)t.ready();else{var n=document.getElementById(SCRIPT_ID);if(n){if(t.script)return;return n.addEventListener("Im-ready",t.ready,!1),void(t.script=n)}var r=document.createElement("script");r.id=SCRIPT_ID,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,t.ready(),t.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,t.ready(),t.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i),t.script=r}}),_defineProperty(_assertThisInitialized(e),"ready",function(t){var n=_assertThisInitialized(e),r=n.props,i=r.appId,a=r.options,o=r.onCallBack,c=r.onReady;if(window.TencentCaptcha&&!n.instance&&n.dom&&n.dom.current){var s=new window.TencentCaptcha(n.dom.current,i,o,a);n.instance=s,n.script&&isFunction(n.script.removeEventListener)&&n.script.removeEventListener("Im-ready",n.ready,!1),isFunction(c)&&c(s)}}),_defineProperty(_assertThisInitialized(e),"destroy",function(){var t=_assertThisInitialized(e);t.script&&isFunction(t.script.removeEventListener)&&t.script.removeEventListener("Im-ready",t.ready,!1),t.instance&&isFunction(t.instance.destroy)&&t.instance.destroy(),t.instance=null,t.script=null}),_defineProperty(_assertThisInitialized(e),"triggerEvent",function(t){var n=_assertThisInitialized(e);if(n.script&&isFunction(n.script.dispatchEvent)){var r=document.createEvent("Event");r.initEvent(t,!0,!0),n.script.dispatchEvent(r)}});var n=_assertThisInitialized(e);return n.dom=React.createRef(),n.instance=null,n.script=null,e}return _inherits(t,React.PureComponent),_createClass(t,[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t){this.init()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children;return React.createElement("div",{ref:this.dom,className:t},n)}}]),t}();_defineProperty(TCaptcha,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}}),module.exports=TCaptcha; | ||
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=_interopDefault(require("react"));function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}var SCRIPT_ID="react-tencent-captcha",typeOf=function(e){return function(t){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}},isFunction=typeOf("Function"),TCaptcha=function(e){function t(){var e;_classCallCheck(this,t),_defineProperty(_assertThisInitialized(e=_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))),"create",function(){var t=_assertThisInitialized(e);if(window.TencentCaptcha)t.ready();else{var n=document.getElementById(SCRIPT_ID);if(n){if(t.script)return;return n.addEventListener("Im-ready",t.ready,!1),void(t.script=n)}var r=document.createElement("script");r.id=SCRIPT_ID,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,t.ready(),t.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,t.ready(),t.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i),t.script=r}}),_defineProperty(_assertThisInitialized(e),"ready",function(t){var n=_assertThisInitialized(e),r=n.props,i=r.appId,a=r.options,o=r.onCallBack,c=r.onReady;if(window.TencentCaptcha&&!n.instance&&n.dom&&n.dom.current){var s=new window.TencentCaptcha(n.dom.current,i,o,a);n.instance=s,n.script&&isFunction(n.script.removeEventListener)&&n.script.removeEventListener("Im-ready",n.ready,!1),isFunction(c)&&c(s)}}),_defineProperty(_assertThisInitialized(e),"destroy",function(){var t=_assertThisInitialized(e);t.script&&isFunction(t.script.removeEventListener)&&t.script.removeEventListener("Im-ready",t.ready,!1),t.instance&&isFunction(t.instance.destroy)&&t.instance.destroy(),t.instance=null,t.script=null}),_defineProperty(_assertThisInitialized(e),"triggerEvent",function(t){var n=_assertThisInitialized(e);if(n.script&&isFunction(n.script.dispatchEvent)){var r=document.createEvent("Event");r.initEvent(t,!0,!0),n.script.dispatchEvent(r)}});var n=_assertThisInitialized(e);return n.dom=React.createRef(),n.instance=null,n.script=null,e}return _inherits(t,React.PureComponent),_createClass(t,[{key:"componentDidMount",value:function(){this.create()}},{key:"componentDidUpdate",value:function(e,t){this.create()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children;return React.createElement("div",{ref:this.dom,className:t},n||null)}}]),t}();_defineProperty(TCaptcha,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}}),module.exports=TCaptcha; | ||
//# sourceMappingURL=tcaptcha.min.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).TCaptcha=t(e.React)}(this,function(e){"use strict";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e=e&&e.hasOwnProperty("default")?e.default:e;var i,c="react-tencent-captcha",s=(i="Function",function(e){return Object.prototype.toString.call(e)==="[object ".concat(i,"]")}),u=function(i){function u(){var t,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),o=this,i=r(u).apply(this,arguments),t=!i||"object"!=typeof i&&"function"!=typeof i?a(o):i,n(a(t),"init",function(){var e=a(t);if(window.TencentCaptcha)e.ready();else{var n=document.getElementById(c);if(n){if(e.script)return;return n.addEventListener("Im-ready",e.ready,!1),void(e.script=n)}var r=document.createElement("script");r.id=c,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,e.ready(),e.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,e.ready(),e.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o),e.script=r}}),n(a(t),"ready",function(e){var n=a(t),r=n.props,o=r.appId,i=r.options,c=r.onCallBack,u=r.onReady;if(window.TencentCaptcha&&!n.instance&&n.dom&&n.dom.current){var p=new window.TencentCaptcha(n.dom.current,o,c,i);n.instance=p,n.script&&s(n.script.removeEventListener)&&n.script.removeEventListener("Im-ready",n.ready,!1),s(u)&&u(p)}}),n(a(t),"destroy",function(){var e=a(t);e.script&&s(e.script.removeEventListener)&&e.script.removeEventListener("Im-ready",e.ready,!1),e.instance&&s(e.instance.destroy)&&e.instance.destroy(),e.instance=null,e.script=null}),n(a(t),"triggerEvent",function(e){var n=a(t);if(n.script&&s(n.script.dispatchEvent)){var r=document.createEvent("Event");r.initEvent(e,!0,!0),n.script.dispatchEvent(r)}});var p=a(t);return p.dom=e.createRef(),p.instance=null,p.script=null,t}var p,d,f;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(u,e.PureComponent),p=u,(d=[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t){this.init()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.children;return e.createElement("div",{ref:this.dom,className:n},r)}}])&&t(p.prototype,d),f&&t(p,f),u}();return n(u,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}}),u}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).TCaptcha=t(e.React)}(this,function(e){"use strict";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e=e&&e.hasOwnProperty("default")?e.default:e;var c,i="react-tencent-captcha",u=(c="Function",function(e){return Object.prototype.toString.call(e)==="[object ".concat(c,"]")}),s=function(c){function s(){var t,o,c;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),o=this,c=r(s).apply(this,arguments),t=!c||"object"!=typeof c&&"function"!=typeof c?a(o):c,n(a(t),"create",function(){var e=a(t);if(window.TencentCaptcha)e.ready();else{var n=document.getElementById(i);if(n){if(e.script)return;return n.addEventListener("Im-ready",e.ready,!1),void(e.script=n)}var r=document.createElement("script");r.id=i,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,e.ready(),e.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,e.ready(),e.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o),e.script=r}}),n(a(t),"ready",function(e){var n=a(t),r=n.props,o=r.appId,c=r.options,i=r.onCallBack,s=r.onReady;if(window.TencentCaptcha&&!n.instance&&n.dom&&n.dom.current){var p=new window.TencentCaptcha(n.dom.current,o,i,c);n.instance=p,n.script&&u(n.script.removeEventListener)&&n.script.removeEventListener("Im-ready",n.ready,!1),u(s)&&s(p)}}),n(a(t),"destroy",function(){var e=a(t);e.script&&u(e.script.removeEventListener)&&e.script.removeEventListener("Im-ready",e.ready,!1),e.instance&&u(e.instance.destroy)&&e.instance.destroy(),e.instance=null,e.script=null}),n(a(t),"triggerEvent",function(e){var n=a(t);if(n.script&&u(n.script.dispatchEvent)){var r=document.createEvent("Event");r.initEvent(e,!0,!0),n.script.dispatchEvent(r)}});var p=a(t);return p.dom=e.createRef(),p.instance=null,p.script=null,t}var p,d,l;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,e.PureComponent),p=s,(d=[{key:"componentDidMount",value:function(){this.create()}},{key:"componentDidUpdate",value:function(e,t){this.create()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.children;return e.createElement("div",{ref:this.dom,className:n},r||null)}}])&&t(p.prototype,d),l&&t(p,l),s}();return n(s,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}}),s}); | ||
//# sourceMappingURL=tcaptcha.umd.min.js.map |
@@ -59,3 +59,3 @@ { | ||
"unpkg": "dist/tcaptcha.min.js", | ||
"version": "2.0.0" | ||
"version": "2.0.1" | ||
} |
@@ -35,3 +35,3 @@ import React from 'react'; | ||
// console.log('componentDidMount', that.props, that.state); | ||
that.init(); | ||
that.create(); | ||
} | ||
@@ -59,3 +59,3 @@ | ||
// console.log('componentDidUpdate', prevProps, that.props, prevState, that.state); | ||
that.init(); | ||
that.create(); | ||
} | ||
@@ -69,5 +69,5 @@ | ||
init = () => { | ||
create = () => { | ||
const that = this; | ||
// console.log('init'); | ||
// console.log('create'); | ||
// const { } = that.state; | ||
@@ -191,3 +191,3 @@ | ||
<div ref={that.dom} className={className}> | ||
{children} | ||
{children || null} | ||
</div> | ||
@@ -194,0 +194,0 @@ ); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26391