tntd 1.4.14 → 1.4.16

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.
@@ -15,7 +15,11 @@ const tolerance = 0; // In px. Depends on the font you are using
15
15
 
16
16
  const isEllipsisActive = (e) => {
17
17
  if(e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight){
18
- e.parentNode.setAttribute('style','overflow:visible');
18
+ let styleStr = 'overflow:visible; ';
19
+ if(!e?.parentNode?.getAttribute('style')?.includes('width')){
20
+ styleStr+='width:100%;';
21
+ }
22
+ e.parentNode.setAttribute('style',styleStr);
19
23
  }
20
24
  return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight;
21
25
  };
@@ -1,38 +1,68 @@
1
+ import themeSymbol1 from './theme/theme1.svg';
2
+ import themeSymbol2 from './theme/theme2.svg';
3
+
4
+ import empty from './avatar/empty.png';
5
+ import female1 from './avatar/female1.png';
6
+ import female2 from './avatar/female2.png';
7
+ import female3 from './avatar/female3.png';
8
+ import female4 from './avatar/female4.png';
9
+ import female5 from './avatar/female5.png';
10
+ import female6 from './avatar/female6.png';
11
+ import male1 from './avatar/male1.png';
12
+ import male2 from './avatar/male2.png';
13
+ import male3 from './avatar/male3.png';
14
+ import male4 from './avatar/male4.png';
15
+ import male5 from './avatar/male5.png';
16
+ import male6 from './avatar/male6.png';
17
+ import orion from './logo/orion.svg';
18
+ import turing from './logo/turing.svg';
19
+ import dataocean from './logo/dataocean.svg';
20
+ import convert from './logo/convert.svg';
21
+ import baldur from './logo/baldur.svg';
22
+ import indicator from './logo/indicator.svg';
23
+ import dispatch from './logo/dispatch.svg';
24
+ import feature from './logo/model.svg';
25
+ import model from './logo/model.svg';
26
+ import storage from './logo/storage.svg';
27
+ import bi from './logo/bi.svg';
28
+ import logo from './logo/default.svg';
29
+
30
+
1
31
  export default {
2
32
  // theme
3
- themeSymbol1: require('./theme/theme1.svg'),
4
- themeSymbol2: require('./theme/theme2.svg'),
33
+ themeSymbol1,
34
+ themeSymbol2,
5
35
 
6
36
  // Avatar
7
- empty: require('./avatar/empty.png'),
8
- female1: require('./avatar/female1.png'),
9
- female2: require('./avatar/female2.png'),
10
- female3: require('./avatar/female3.png'),
11
- female4: require('./avatar/female4.png'),
12
- female5: require('./avatar/female5.png'),
13
- female6: require('./avatar/female6.png'),
14
- male1: require('./avatar/male1.png'),
15
- male2: require('./avatar/male2.png'),
16
- male3: require('./avatar/male3.png'),
17
- male4: require('./avatar/male4.png'),
18
- male5: require('./avatar/male5.png'),
19
- male6: require('./avatar/male6.png'),
37
+ empty,
38
+ female1,
39
+ female2,
40
+ female3,
41
+ female4,
42
+ female5,
43
+ female6,
44
+ male1,
45
+ male2,
46
+ male3,
47
+ male4,
48
+ male5,
49
+ male6
20
50
  };
21
51
 
22
- export const defaultLogo = require('./logo/default.svg');
52
+ export const defaultLogo = logo;
23
53
 
24
54
  export const logoImgMap = {
25
- default: defaultLogo,
55
+ default: logo,
26
56
  bridge: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIxLjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IuWbvuWxgl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxMDI0IDEwMjQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMTJEMDkzO3N0cm9rZS13aWR0aDoyMDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9Cgkuc3Qxe2ZpbGw6I0ZGQTMwMDt9Cgkuc3Qye2ZpbGw6IzNDODFGRjt9Cgkuc3Qze2ZpbGw6IzBBQ0M4Njt9Cgkuc3Q0e2ZpbGw6IzNEREFGRjt9Cjwvc3R5bGU+CjxnPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MCIgZD0iTTUxMiw1MTIiLz4KCTwvZz4KPC9nPgo8Zz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01MTIsNTEyIi8+Cgk8L2c+CjwvZz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMTEzLjQsNTQ0Yy0yOSwwLTU4LTExLjEtODAuMi0zMy4yYy00NC4zLTQ0LjMtNDQuMy0xMTYuMSwwLTE2MC40TDM1MC40LDMzLjJjNDQuMy00NC4zLDExNi4xLTQ0LjMsMTYwLjQsMAoJCQlzNDQuMywxMTYuMSwwLDE2MC40TDE5My42LDUxMC44QzE3MS40LDUzMywxNDIuNCw1NDQsMTEzLjQsNTQ0eiIvPgoJPC9nPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTIwMS40LDkzNi41Yy0yOSwwLTU4LTExLjEtODAuMi0zMy4yYy00NC4zLTQ0LjMtNDQuMy0xMTYuMSwwLTE2MC40bDYyMS43LTYyMS43CgkJCWM0NC4zLTQ0LjMsMTE2LjEtNDQuMywxNjAuNCwwYzQ0LjMsNDQuMyw0NC4zLDExNi4xLDAsMTYwLjRMMjgxLjYsOTAzLjNDMjU5LjQsOTI1LjQsMjMwLjQsOTM2LjUsMjAxLjQsOTM2LjV6Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QzIiBkPSJNNTkzLjQsMTAyNGMtMjksMC01OC0xMS4xLTgwLjItMzMuMmMtNDQuMy00NC4zLTQ0LjMtMTE2LjEsMC0xNjAuNGwzMTcuMi0zMTcuMgoJCQljNDQuMy00NC4zLDExNi4xLTQ0LjMsMTYwLjQsMGM0NC4zLDQ0LjMsNDQuMywxMTYuMSwwLDE2MC40TDY3My42LDk5MC44QzY1MS40LDEwMTIuOSw2MjIuNCwxMDI0LDU5My40LDEwMjR6Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNODI2LjQsMzEzLjRDNzYzLjgsMzEzLjQsNzEzLDI2Mi42LDcxMywyMDBWMTk4YzAtNjIuNiw1MC44LTExMy40LDExMy40LTExMy40UzkzOS44LDEzNS40LDkzOS44LDE5OHYxLjkKCQkJQzkzOS44LDI2Mi42LDg4OS4xLDMxMy40LDgyNi40LDMxMy40eiIvPgoJPC9nPgo8L2c+Cjwvc3ZnPgo=',
27
- orion: require('./logo/orion.svg'),
28
- turing: require('./logo/turing.svg'),
29
- dataocean: require('./logo/dataocean.svg'),
30
- convert: require('./logo/convert.svg'),
31
- baldur: require('./logo/baldur.svg'),
32
- indicator: require('./logo/indicator.svg'),
33
- dispatch: require('./logo/dispatch.svg'),
34
- feature: require('./logo/model.svg'),
35
- model: require('./logo/model.svg'),
36
- storage: require('./logo/storage.svg'),
37
- bi: require('./logo/bi.svg')
57
+ orion,
58
+ turing,
59
+ dataocean,
60
+ convert,
61
+ baldur,
62
+ indicator,
63
+ dispatch,
64
+ feature,
65
+ model,
66
+ storage,
67
+ bi
38
68
  };
package/dist/1.tntd.js CHANGED
@@ -1,12 +1,12 @@
1
- (window.webpackJsonptntd=window.webpackJsonptntd||[]).push([[1],{88:function(e,t,r){"use strict";
1
+ (window.webpackJsonptntd=window.webpackJsonptntd||[]).push([[1],{75:function(e,t,r){"use strict";
2
2
  /*!
3
3
  * cookie
4
4
  * Copyright(c) 2012-2014 Roman Shtylman
5
5
  * Copyright(c) 2015 Douglas Christopher Wilson
6
6
  * MIT Licensed
7
- */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},t=t||{},n=e.split(p),o=t.decode||u,i=0;i<n.length;i++){var a,s=n[i],c=s.indexOf("=");c<0||(a=s.substr(0,c).trim(),'"'==(s=s.substr(++c,s.length).trim())[0]&&(s=s.slice(1,-1)),null==r[a]&&(r[a]=function(t,e){try{return e(t)}catch(e){return t}}(s,o)))}return r},t.serialize=function(e,t,r){var n=r||{},r=n.encode||i;if("function"!=typeof r)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");t=r(t);if(t&&!a.test(t))throw new TypeError("argument val is invalid");var o=e+"="+t;if(null!=n.maxAge){t=+n.maxAge;if(isNaN(t))throw new Error("maxAge should be a Number");o+="; Max-Age="+Math.floor(t)}if(n.domain){if(!a.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!a.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(o+="; HttpOnly");n.secure&&(o+="; Secure");if(n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o};var u=decodeURIComponent,i=encodeURIComponent,p=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},89:function(e,t,r){"use strict";
7
+ */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},t=t||{},n=e.split(p),o=t.decode||u,i=0;i<n.length;i++){var a,s=n[i],c=s.indexOf("=");c<0||(a=s.substr(0,c).trim(),'"'==(s=s.substr(++c,s.length).trim())[0]&&(s=s.slice(1,-1)),null==r[a]&&(r[a]=function(t,e){try{return e(t)}catch(e){return t}}(s,o)))}return r},t.serialize=function(e,t,r){var n=r||{},r=n.encode||i;if("function"!=typeof r)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");t=r(t);if(t&&!a.test(t))throw new TypeError("argument val is invalid");var o=e+"="+t;if(null!=n.maxAge){t=+n.maxAge;if(isNaN(t))throw new Error("maxAge should be a Number");o+="; Max-Age="+Math.floor(t)}if(n.domain){if(!a.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!a.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(o+="; HttpOnly");n.secure&&(o+="; Secure");if(n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o};var u=decodeURIComponent,i=encodeURIComponent,p=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},76:function(e,t,r){"use strict";
8
8
  /*
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 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)}}))))}}}]);
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}},77:function(e,t,r){"use strict";r.r(t);var p=r(0),l=r(1),o=r(75);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(76);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)}}))))}}}]);