tntd 1.4.8 → 1.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/DevelopmentLogin/LoginModal.js +2 -2
- package/dist/1.tntd.js +1 -1
- package/dist/stats.json +4870 -4870
- package/es/DevelopmentLogin/LoginModal.js +2 -2
- package/lib/DevelopmentLogin/LoginModal.js +2 -2
- package/lib/Layout/EnterpriseLayout/Header.js +113 -0
- package/lib/Layout/EnterpriseLayout/HeaderActions.js +104 -0
- package/package.json +1 -1
package/dist/1.tntd.js
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
object-assign
|
|
10
10
|
(c) Sindre Sorhus
|
|
11
11
|
@license MIT
|
|
12
|
-
*/var c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))u.call(r,i)&&(n[i]=r[i]);if(c)for(var a=c(r),s=0;s<a.length;s++)p.call(r,a[s])&&(n[a[s]]=r[a[s]])}return n}},90:function(e,t,r){"use strict";r.r(t);var p=r(0),l=r(1),o=r(88);function i(e,t){void 0===t&&(t={});var r,n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(r=n,!(t=void 0===(t=t.doNotParse)?!r||"{"!==r[0]&&"["!==r[0]&&'"'!==r[0]:t))try{return JSON.parse(n)}catch(e){}return e}var a=r(89);function n(e,t){var r=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=(t=t,"string"==typeof(e=e)?o.parse(e,t):"object"==typeof e&&null!==e?e:{}),new Promise(function(){r.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie}).catch(function(){})}function f(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function
|
|
12
|
+
*/var c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))u.call(r,i)&&(n[i]=r[i]);if(c)for(var a=c(r),s=0;s<a.length;s++)p.call(r,a[s])&&(n[a[s]]=r[a[s]])}return n}},90:function(e,t,r){"use strict";r.r(t);var p=r(0),l=r(1),o=r(88);function i(e,t){void 0===t&&(t={});var r,n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(r=n,!(t=void 0===(t=t.doNotParse)?!r||"{"!==r[0]&&"["!==r[0]&&'"'!==r[0]:t))try{return JSON.parse(n)}catch(e){}return e}var a=r(89);function n(e,t){var r=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=(t=t,"string"==typeof(e=e)?o.parse(e,t):"object"==typeof e&&null!==e?e:{}),new Promise(function(){r.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie}).catch(function(){})}function f(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var m=new(n.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=o.parse(document.cookie,e))},n.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},n.prototype.get=function(e,t,r){return void 0===t&&(t={}),this._updateBrowserValues(r),i(this.cookies[e],t)},n.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var r,n={};for(r in this.cookies)n[r]=i(this.cookies[r],e);return n},n.prototype.set=function(e,t,r){var n;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=a({},this.cookies,((n={})[e]=t,n)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=o.serialize(e,t,r)),this._emitChange({name:e,value:t,options:r})},n.prototype.remove=function(e,t){var r=t=a({},t,{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=a({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=o.serialize(e,"",r)),this._emitChange({name:e,value:void 0,options:t})},n.prototype.addChangeListener=function(e){this.changeListeners.push(e)},n.prototype.removeChangeListener=function(e){e=this.changeListeners.indexOf(e);0<=e&&this.changeListeners.splice(e,1)},n),y={account:void 0,password:void 0};t.default=function(e){var t=e.visible,n=e.close,r=e.signIn,o=d(Object(p.useState)(!1),2),i=o[0],a=o[1],e=localStorage.getItem("accountInfo");if(e)try{y=JSON.parse(e)}catch(e){}function s(e,t){u(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach(function(e){h(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},c,h({},e,t.target.value)))}var o=d(Object(p.useState)(y),2),c=o[0],u=o[1],e=c.account,o=c.password;return React.createElement(l.Modal,{title:"开发者模拟登陆",visible:t,maskClosable:!1,onOk:function(){a(!0);var e=r&&r(c);e&&e.then&&e.then(function(r){l.message.success("模拟登陆成功"),localStorage.setItem("accountInfo",JSON.stringify(c)),a(!1),setTimeout(function(){var e=r||{},t=e.tdToken,e=e.userId;m.set("_td_token_",t,{path:"/"}),m.set("_uid_",e,{path:"/"}),n()},500)}).catch(function(e){throw a(!1),e})},onCancel:n,confirmLoading:i},React.createElement(l.Form,{labelCol:{span:5},wrapperCol:{span:18}},React.createElement(l.Form.Item,{label:"用户名:"},React.createElement(l.Input,{type:"text",placeholder:"请输入用户名",value:e||void 0,onChange:function(e){return s("account",e)}})),React.createElement(l.Form.Item,{label:"密码:"},React.createElement(l.Input,{type:"text",placeholder:"请输入用户名",value:o||void 0,onChange:function(e){return s("password",e)}}))))}}}]);
|