tntd 1.4.7 → 1.4.10

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.
Files changed (85) hide show
  1. package/components/DevelopmentLogin/LoginModal.js +2 -2
  2. package/components/Layout/HeaderTabs.js +98 -73
  3. package/dist/1.tntd.js +1 -1
  4. package/dist/stats.json +98 -98
  5. package/dist/tntd.js +1 -1
  6. package/es/DevelopmentLogin/LoginModal.js +2 -2
  7. package/es/Layout/HeaderTabs.js +19 -15
  8. package/lib/ArrayInput/icon.js +31 -27
  9. package/lib/ArrayInput/index.js +298 -211
  10. package/lib/AuthContext.js +13 -2
  11. package/lib/Columns/index.js +100 -71
  12. package/lib/DevelopmentLogin/LoginModal.js +141 -79
  13. package/lib/DevelopmentLogin/index.js +55 -28
  14. package/lib/Ellipsis/Svg/CopySVG.js +71 -23
  15. package/lib/Ellipsis/Svg/TickSVG.js +49 -17
  16. package/lib/Ellipsis/index.js +154 -148
  17. package/lib/Handle/index.js +109 -72
  18. package/lib/Icon/fonts/iconfont.js +43 -1
  19. package/lib/Icon/iconList.js +8 -119
  20. package/lib/Icon/index.js +45 -13
  21. package/lib/Img/Contain.js +81 -49
  22. package/lib/Img/Cover.js +136 -88
  23. package/lib/Img/index.js +89 -36
  24. package/lib/Layout/ActionsContext.js +11 -2
  25. package/lib/Layout/AppList.js +256 -262
  26. package/lib/Layout/Application.js +135 -119
  27. package/lib/Layout/Avatar.js +137 -137
  28. package/lib/Layout/CompatibleLanguage.js +195 -214
  29. package/lib/Layout/EnterpriseLayout/Avatar.js +168 -156
  30. package/lib/Layout/EnterpriseLayout/Language.js +100 -75
  31. package/lib/Layout/EnterpriseLayout/Theme.js +94 -96
  32. package/lib/Layout/EnterpriseLayout/index.js +45 -32
  33. package/lib/Layout/GlobalNavigation/NavigationPopup.js +407 -335
  34. package/lib/Layout/GlobalNavigation/index.js +158 -110
  35. package/lib/Layout/Header.js +116 -165
  36. package/lib/Layout/HeaderActions.js +129 -132
  37. package/lib/Layout/HeaderNavs.js +113 -90
  38. package/lib/Layout/HeaderTabs.js +282 -312
  39. package/lib/Layout/Iconfont.js +15 -2
  40. package/lib/Layout/Language.js +102 -63
  41. package/lib/Layout/Layout.js +261 -272
  42. package/lib/Layout/Logo.js +87 -132
  43. package/lib/Layout/OrgAppList.js +319 -440
  44. package/lib/Layout/SideMenu.js +343 -429
  45. package/lib/Layout/Theme.js +124 -95
  46. package/lib/Layout/checkAuth.js +35 -21
  47. package/lib/Layout/createActions.js +51 -38
  48. package/lib/Layout/images/index.js +41 -33
  49. package/lib/Layout/index.js +161 -110
  50. package/lib/Layout/paaslayout/CompactSideMenu.js +178 -200
  51. package/lib/Layout/paaslayout/Header.js +90 -84
  52. package/lib/Layout/paaslayout/Logo.js +32 -27
  53. package/lib/Layout/paaslayout/SideMenu.js +174 -161
  54. package/lib/Layout/paaslayout/index.js +261 -240
  55. package/lib/Layout/storage.js +78 -20
  56. package/lib/Layout/utils.js +143 -93
  57. package/lib/LoadingButton/index.js +67 -25
  58. package/lib/Modal/index.js +108 -83
  59. package/lib/Page/Box.js +81 -56
  60. package/lib/Page/index.js +173 -151
  61. package/lib/Page/utils.js +30 -12
  62. package/lib/QueryForm/Field/Checkbox.js +33 -11
  63. package/lib/QueryForm/Field/Select.js +99 -63
  64. package/lib/QueryForm/Field/SelectInput.js +114 -69
  65. package/lib/QueryForm/Field/fieldsMap.js +52 -30
  66. package/lib/QueryForm/Field/index.js +158 -76
  67. package/lib/QueryForm/createActions.js +65 -50
  68. package/lib/QueryForm/index.js +383 -304
  69. package/lib/QueryForm/useForm.js +17 -6
  70. package/lib/QueryListScene/List.js +366 -290
  71. package/lib/QueryListScene/QueryForm.js +161 -93
  72. package/lib/QueryListScene/QueryListScene.js +87 -33
  73. package/lib/QueryListScene/Title.js +20 -10
  74. package/lib/QueryListScene/Toolbar.js +31 -8
  75. package/lib/QueryListScene/createActions.js +79 -64
  76. package/lib/QueryListScene/index.js +40 -23
  77. package/lib/QueryListScene/useActions.js +17 -6
  78. package/lib/Select/DropDownWrap.js +124 -60
  79. package/lib/Select/index.js +561 -425
  80. package/lib/Table/ResizableTable/index.js +121 -77
  81. package/lib/Table/index.js +51 -19
  82. package/lib/Title/index.js +52 -34
  83. package/lib/index.js +159 -19
  84. package/lib/locale.js +63 -48
  85. package/package.json +1 -1
package/dist/stats.json CHANGED
@@ -5,9 +5,9 @@
5
5
  "entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.\nEntrypoints:\n main (600 KiB)\n tntd.css\n tntd.js\n"
6
6
  ],
7
7
  "version": "4.46.0",
8
- "hash": "6663dbe2cf6a223a85d5",
9
- "time": 26376,
10
- "builtAt": 1652779562208,
8
+ "hash": "603c3a699732ae74f12b",
9
+ "time": 27228,
10
+ "builtAt": 1658116898638,
11
11
  "publicPath": "",
12
12
  "outputPath": "/Users/wangxiaofei/git/tntd/dist",
13
13
  "assetsByChunkName": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  {
37
37
  "name": "1.tntd.js",
38
- "size": 6995,
38
+ "size": 6989,
39
39
  "chunks": [
40
40
  1
41
41
  ],
@@ -137,7 +137,7 @@
137
137
  },
138
138
  {
139
139
  "name": "tntd.js",
140
- "size": 601198,
140
+ "size": 601275,
141
141
  "chunks": [
142
142
  0
143
143
  ],
@@ -184,7 +184,7 @@
184
184
  "rendered": true,
185
185
  "initial": true,
186
186
  "entry": true,
187
- "size": 890762,
187
+ "size": 890904,
188
188
  "names": [
189
189
  "main"
190
190
  ],
@@ -192,7 +192,7 @@
192
192
  "tntd.css",
193
193
  "tntd.js"
194
194
  ],
195
- "hash": "f312ac7605a22d34312b",
195
+ "hash": "8467c64b3e73cbd2e5b0",
196
196
  "siblings": [],
197
197
  "parents": [],
198
198
  "children": [
@@ -1662,7 +1662,7 @@
1662
1662
  "moduleName": "./components/index.js + 88 modules",
1663
1663
  "type": "harmony import specifier",
1664
1664
  "userRequest": "react",
1665
- "loc": "82:18-26"
1665
+ "loc": "83:9-14"
1666
1666
  },
1667
1667
  {
1668
1668
  "moduleId": 87,
@@ -1671,7 +1671,7 @@
1671
1671
  "moduleName": "./components/index.js + 88 modules",
1672
1672
  "type": "harmony import specifier",
1673
1673
  "userRequest": "react",
1674
- "loc": "83:9-14"
1674
+ "loc": "83:18-26"
1675
1675
  },
1676
1676
  {
1677
1677
  "moduleId": 87,
@@ -1707,7 +1707,7 @@
1707
1707
  "moduleName": "./components/index.js + 88 modules",
1708
1708
  "type": "harmony import specifier",
1709
1709
  "userRequest": "react",
1710
- "loc": "87:19-27"
1710
+ "loc": "88:2-11"
1711
1711
  },
1712
1712
  {
1713
1713
  "moduleId": 87,
@@ -1716,7 +1716,7 @@
1716
1716
  "moduleName": "./components/index.js + 88 modules",
1717
1717
  "type": "harmony import specifier",
1718
1718
  "userRequest": "react",
1719
- "loc": "88:2-11"
1719
+ "loc": "88:19-27"
1720
1720
  },
1721
1721
  {
1722
1722
  "moduleId": 87,
@@ -1752,7 +1752,7 @@
1752
1752
  "moduleName": "./components/index.js + 88 modules",
1753
1753
  "type": "harmony import specifier",
1754
1754
  "userRequest": "react",
1755
- "loc": "92:19-27"
1755
+ "loc": "93:19-27"
1756
1756
  },
1757
1757
  {
1758
1758
  "moduleId": 87,
@@ -1788,7 +1788,7 @@
1788
1788
  "moduleName": "./components/index.js + 88 modules",
1789
1789
  "type": "harmony import specifier",
1790
1790
  "userRequest": "react",
1791
- "loc": "97:19-27"
1791
+ "loc": "98:16-26"
1792
1792
  },
1793
1793
  {
1794
1794
  "moduleId": 87,
@@ -1797,7 +1797,7 @@
1797
1797
  "moduleName": "./components/index.js + 88 modules",
1798
1798
  "type": "harmony import specifier",
1799
1799
  "userRequest": "react",
1800
- "loc": "98:16-26"
1800
+ "loc": "98:19-27"
1801
1801
  },
1802
1802
  {
1803
1803
  "moduleId": 87,
@@ -1851,7 +1851,7 @@
1851
1851
  "moduleName": "./components/index.js + 88 modules",
1852
1852
  "type": "harmony import specifier",
1853
1853
  "userRequest": "react",
1854
- "loc": "105:16-22"
1854
+ "loc": "106:11-16"
1855
1855
  },
1856
1856
  {
1857
1857
  "moduleId": 87,
@@ -1860,7 +1860,7 @@
1860
1860
  "moduleName": "./components/index.js + 88 modules",
1861
1861
  "type": "harmony import specifier",
1862
1862
  "userRequest": "react",
1863
- "loc": "106:11-16"
1863
+ "loc": "106:16-22"
1864
1864
  },
1865
1865
  {
1866
1866
  "moduleId": 87,
@@ -2490,7 +2490,7 @@
2490
2490
  "moduleName": "./components/index.js + 88 modules",
2491
2491
  "type": "harmony import specifier",
2492
2492
  "userRequest": "react",
2493
- "loc": "212:2-11"
2493
+ "loc": "213:2-11"
2494
2494
  },
2495
2495
  {
2496
2496
  "moduleId": 87,
@@ -2508,7 +2508,7 @@
2508
2508
  "moduleName": "./components/index.js + 88 modules",
2509
2509
  "type": "harmony import specifier",
2510
2510
  "userRequest": "react",
2511
- "loc": "217:2-11"
2511
+ "loc": "217:13-18"
2512
2512
  },
2513
2513
  {
2514
2514
  "moduleId": 87,
@@ -2517,7 +2517,7 @@
2517
2517
  "moduleName": "./components/index.js + 88 modules",
2518
2518
  "type": "harmony import specifier",
2519
2519
  "userRequest": "react",
2520
- "loc": "217:13-18"
2520
+ "loc": "218:2-11"
2521
2521
  },
2522
2522
  {
2523
2523
  "moduleId": 87,
@@ -2526,7 +2526,7 @@
2526
2526
  "moduleName": "./components/index.js + 88 modules",
2527
2527
  "type": "harmony import specifier",
2528
2528
  "userRequest": "react",
2529
- "loc": "218:2-11"
2529
+ "loc": "218:13-18"
2530
2530
  },
2531
2531
  {
2532
2532
  "moduleId": 87,
@@ -2535,7 +2535,7 @@
2535
2535
  "moduleName": "./components/index.js + 88 modules",
2536
2536
  "type": "harmony import specifier",
2537
2537
  "userRequest": "react",
2538
- "loc": "218:13-18"
2538
+ "loc": "219:2-11"
2539
2539
  },
2540
2540
  {
2541
2541
  "moduleId": 87,
@@ -2553,7 +2553,7 @@
2553
2553
  "moduleName": "./components/index.js + 88 modules",
2554
2554
  "type": "harmony import specifier",
2555
2555
  "userRequest": "react",
2556
- "loc": "222:2-11"
2556
+ "loc": "223:2-11"
2557
2557
  },
2558
2558
  {
2559
2559
  "moduleId": 87,
@@ -2909,9 +2909,9 @@
2909
2909
  "chunks": [
2910
2910
  0
2911
2911
  ],
2912
- "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
2912
+ "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
2913
2913
  "issuerId": null,
2914
- "issuerName": "./components/QueryForm/index.js",
2914
+ "issuerName": "./components/Table/ResizableTable/index.js",
2915
2915
  "issuerPath": [
2916
2916
  {
2917
2917
  "id": null,
@@ -2920,8 +2920,8 @@
2920
2920
  },
2921
2921
  {
2922
2922
  "id": null,
2923
- "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
2924
- "name": "./components/QueryForm/index.js"
2923
+ "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
2924
+ "name": "./components/Table/ResizableTable/index.js"
2925
2925
  }
2926
2926
  ],
2927
2927
  "failed": false,
@@ -5020,9 +5020,9 @@
5020
5020
  "chunks": [
5021
5021
  0
5022
5022
  ],
5023
- "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
5023
+ "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
5024
5024
  "issuerId": null,
5025
- "issuerName": "./components/QueryForm/index.js",
5025
+ "issuerName": "./components/Table/ResizableTable/index.js",
5026
5026
  "issuerPath": [
5027
5027
  {
5028
5028
  "id": null,
@@ -5031,8 +5031,8 @@
5031
5031
  },
5032
5032
  {
5033
5033
  "id": null,
5034
- "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
5035
- "name": "./components/QueryForm/index.js"
5034
+ "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
5035
+ "name": "./components/Table/ResizableTable/index.js"
5036
5036
  }
5037
5037
  ],
5038
5038
  "failed": false,
@@ -5488,7 +5488,7 @@
5488
5488
  "moduleName": "./components/index.js + 88 modules",
5489
5489
  "type": "harmony import specifier",
5490
5490
  "userRequest": "lodash",
5491
- "loc": "82:48-51"
5491
+ "loc": "82:67-70"
5492
5492
  },
5493
5493
  {
5494
5494
  "moduleId": 87,
@@ -5497,7 +5497,7 @@
5497
5497
  "moduleName": "./components/index.js + 88 modules",
5498
5498
  "type": "harmony import specifier",
5499
5499
  "userRequest": "lodash",
5500
- "loc": "82:67-70"
5500
+ "loc": "83:48-51"
5501
5501
  },
5502
5502
  {
5503
5503
  "moduleId": 87,
@@ -5821,7 +5821,7 @@
5821
5821
  "moduleName": "./components/index.js + 88 modules",
5822
5822
  "type": "harmony import specifier",
5823
5823
  "userRequest": "lodash",
5824
- "loc": "213:40-43"
5824
+ "loc": "214:40-43"
5825
5825
  },
5826
5826
  {
5827
5827
  "moduleId": 87,
@@ -5913,9 +5913,9 @@
5913
5913
  "chunks": [
5914
5914
  0
5915
5915
  ],
5916
- "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
5916
+ "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
5917
5917
  "issuerId": null,
5918
- "issuerName": "./components/QueryForm/index.js",
5918
+ "issuerName": "./components/Table/ResizableTable/index.js",
5919
5919
  "issuerPath": [
5920
5920
  {
5921
5921
  "id": null,
@@ -5924,8 +5924,8 @@
5924
5924
  },
5925
5925
  {
5926
5926
  "id": null,
5927
- "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
5928
- "name": "./components/QueryForm/index.js"
5927
+ "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
5928
+ "name": "./components/Table/ResizableTable/index.js"
5929
5929
  }
5930
5930
  ],
5931
5931
  "failed": false,
@@ -6363,7 +6363,7 @@
6363
6363
  "moduleName": "./components/index.js + 88 modules",
6364
6364
  "type": "harmony import specifier",
6365
6365
  "userRequest": "classnames",
6366
- "loc": "226:15-17"
6366
+ "loc": "227:15-17"
6367
6367
  },
6368
6368
  {
6369
6369
  "moduleId": 87,
@@ -6372,7 +6372,7 @@
6372
6372
  "moduleName": "./components/index.js + 88 modules",
6373
6373
  "type": "harmony import specifier",
6374
6374
  "userRequest": "classnames",
6375
- "loc": "236:17-19"
6375
+ "loc": "237:17-19"
6376
6376
  },
6377
6377
  {
6378
6378
  "moduleId": 87,
@@ -7780,9 +7780,9 @@
7780
7780
  "chunks": [
7781
7781
  0
7782
7782
  ],
7783
- "issuer": "/Users/wangxiaofei/git/tntd/node_modules/react-resizable/build/Resizable.js",
7784
- "issuerId": 15,
7785
- "issuerName": "./node_modules/react-resizable/build/Resizable.js",
7783
+ "issuer": "/Users/wangxiaofei/git/tntd/node_modules/react-resizable/build/ResizableBox.js",
7784
+ "issuerId": 85,
7785
+ "issuerName": "./node_modules/react-resizable/build/ResizableBox.js",
7786
7786
  "issuerPath": [
7787
7787
  {
7788
7788
  "id": null,
@@ -7800,9 +7800,9 @@
7800
7800
  "name": "./node_modules/react-resizable/index.js"
7801
7801
  },
7802
7802
  {
7803
- "id": 15,
7804
- "identifier": "/Users/wangxiaofei/git/tntd/node_modules/react-resizable/build/Resizable.js",
7805
- "name": "./node_modules/react-resizable/build/Resizable.js"
7803
+ "id": 85,
7804
+ "identifier": "/Users/wangxiaofei/git/tntd/node_modules/react-resizable/build/ResizableBox.js",
7805
+ "name": "./node_modules/react-resizable/build/ResizableBox.js"
7806
7806
  }
7807
7807
  ],
7808
7808
  "failed": false,
@@ -12767,7 +12767,7 @@
12767
12767
  "name": "./components/index.js + 88 modules",
12768
12768
  "index": 0,
12769
12769
  "index2": 187,
12770
- "size": 398580,
12770
+ "size": 398722,
12771
12771
  "cacheable": true,
12772
12772
  "built": true,
12773
12773
  "optional": false,
@@ -13213,7 +13213,7 @@
13213
13213
  "moduleName": "./components/Layout/HeaderTabs.js",
13214
13214
  "type": "harmony import specifier",
13215
13215
  "userRequest": "../Icon",
13216
- "loc": "248:61-65"
13216
+ "loc": "252:95-99"
13217
13217
  },
13218
13218
  {
13219
13219
  "moduleId": null,
@@ -13222,7 +13222,7 @@
13222
13222
  "moduleName": "./components/Layout/HeaderTabs.js",
13223
13223
  "type": "harmony import specifier",
13224
13224
  "userRequest": "../Icon",
13225
- "loc": "254:25-29"
13225
+ "loc": "258:25-29"
13226
13226
  },
13227
13227
  {
13228
13228
  "moduleId": null,
@@ -13231,7 +13231,7 @@
13231
13231
  "moduleName": "./components/Layout/HeaderTabs.js",
13232
13232
  "type": "harmony import specifier",
13233
13233
  "userRequest": "../Icon",
13234
- "loc": "258:26-30"
13234
+ "loc": "262:26-30"
13235
13235
  }
13236
13236
  ],
13237
13237
  "usedExports": [
@@ -15768,7 +15768,7 @@
15768
15768
  "name": "./components/Layout/HeaderTabs.js",
15769
15769
  "index": 108,
15770
15770
  "index2": 106,
15771
- "size": 16138,
15771
+ "size": 16280,
15772
15772
  "cacheable": true,
15773
15773
  "built": true,
15774
15774
  "optional": false,
@@ -15822,7 +15822,7 @@
15822
15822
  ],
15823
15823
  "optimizationBailout": [],
15824
15824
  "depth": 2,
15825
- "source": "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _templateObject3() {\n var data = _taggedTemplateLiteral([\"\\n position: relative;\\n margin: 0;\\n padding: 0 20px 0 10px;\\n cursor: pointer;\\n display: inline-block;\\n line-height: \", \";\\n /* transition: background-color .5; */\\n width: 130px;\\n color: rgba(255,255,255,.6);\\n\\n .tnt-icon[type=close] {\\n display: none;\\n position: absolute;\\n right: 0;\\n top: 0;\\n font-size: 10px;\\n padding: 0 10px;\\n cursor: pointer;\\n z-index: 1;\\n }\\n\\n &:not(:last-child):after {\\n position: absolute;\\n content: \\\"\\\";\\n right: 0;\\n top: 6px;\\n height: 24px;\\n width: 1px;\\n // opacity: .5;\\n // background: #fff;\\n background: #E1E6EE;\\n opacity: .5;\\n // .tnt-themeS1 & {\\n // background: #E1E6EE;\\n // opacity: 1;\\n // }\\n }\\n\\n &.active,\\n &.activeTabPreSibling {\\n &:after {\\n display: none;\\n }\\n }\\n\\n a {\\n font-size: 14px;\\n color: \", \";//rgba(255,255,255,.6);\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n transition: none;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n display: inline-block;\\n line-height: 36px;\\n width: 100%;\\n // &:hover {\\n // color: rgba(255,255,255,.8);\\n // }\\n // .tnt-themeS1 & {\\n // color: \", \";\\n // }\\n }\\n\\n &:hover,\\n &.active {\\n .tnt-icon[type=close] {\\n display: unset;\\n color: #455064;\\n // .tnt-themeS1 & {\\n // color: #455064;\\n // }\\n }\\n }\\n\\n &.active {\\n background: #F1F2F5;\\n border-radius: 2px 2px 0 0;\\n color: \", \";\\n font-weight: 600;\\n\\n a {\\n color: \", \";\\n }\\n }\\n\"]);\n\n _templateObject3 = function _templateObject3() {\n return data;\n };\n\n return data;\n}\n\nfunction _templateObject2() {\n var data = _taggedTemplateLiteral([\"\\n margin: 14px 0 0;\\n padding: 0;\\n list-style: none;\\n text-align: left;\\n height: 36px;\\n line-height: 36px;\\n flex: 1;\\n white-space: nowrap;\\n padding-right: 40px;\\n transition: transform .25s linear;\\n position:absolute;\\n\"]);\n\n _templateObject2 = function _templateObject2() {\n return data;\n };\n\n return data;\n}\n\nfunction _templateObject() {\n var data = _taggedTemplateLiteral([\"\\n display: flex;\\n flex: 1;\\n overflow: hidden;\\n position: relative;\\n margin-right: 12px;\\n margin-left: 4px;\\n\\n .tnt-layout-header-tabs-arrows {\\n position: absolute;\\n right: 0;\\n bottom: 0;\\n font-size: 16px;\\n line-height: 36px;\\n height: 36px;\\n background: #fff !important;\\n color: rgba(255,255,255,.8) !important;\\n .tnt-icon {\\n cursor: pointer;\\n color: rgba(139,145,158,1);\\n &[disabled] {\\n color: rgba(139, 145, 158, .5);\\n pointer-events: none;\\n cursor: not-allowed;\\n }\\n }\\n // background: #191D29;\\n // .tnt-icon {\\n // cursor: pointer;\\n // &[disabled] {\\n // color: rgba(139, 145, 158, .5);\\n // pointer-events: none;\\n // cursor: not-allowed;\\n // }\\n // }\\n // .tnt-themeS1 & {\\n // background: #fff;\\n // .tnt-icon {\\n // color: rgba(139,145,158,1);\\n // }\\n // }\\n // \\u591A\\u7B7E\\u9875\\u7684\\u7BAD\\u5934\\u6837\\u5F0F\\n // .tnt-themeS3 & {\\n // background: \", \"; //#1D4295;\\n // .tnt-icon {\\n // color: rgba(255, 255, 255, .5);\\n // &[disabled] {\\n // color: rgba(139, 145, 158, .5);\\n // pointer-events: none;\\n // cursor: not-allowed;\\n // }\\n // }\\n // }\\n }\\n\"]);\n\n _templateObject = function _templateObject() {\n return data;\n };\n\n return data;\n}\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport { useState, useEffect, useRef } from 'react';\nimport styled, { withTheme } from 'styled-components';\nimport cn from 'classnames';\nimport { get } from 'lodash';\nimport Icon from '../Icon';\nvar TabsContainer = styled.div(_templateObject(), function (props) {\n return \"\".concat(props.theme.blueBgColor);\n});\nvar Tabs = styled.ul(_templateObject2());\nvar TabItem = styled.li(_templateObject3(), function (props) {\n return props.theme.size === 'large' ? '46px' : '36px';\n}, function (props) {\n return props.theme.headerActionsColor;\n}, function (props) {\n return props.theme.headerActionsColor;\n}, function (props) {\n return props.theme.primaryTextColor;\n}, function (props) {\n return props.theme.primaryTextColor;\n});\nexport var HeaderTabs = withTheme(function (_ref) {\n var theme = _ref.theme,\n className = _ref.className,\n _ref$tabs = _ref.tabs,\n tabs = _ref$tabs === void 0 ? [] : _ref$tabs,\n onTabChange = _ref.onTabChange,\n onTabSelect = _ref.onTabSelect,\n onTabClose = _ref.onTabClose,\n appListVisible = _ref.appListVisible,\n orgListVisible = _ref.orgListVisible,\n orgAppListVisible = _ref.orgAppListVisible,\n props = _objectWithoutProperties(_ref, [\"theme\", \"className\", \"tabs\", \"onTabChange\", \"onTabSelect\", \"onTabClose\", \"appListVisible\", \"orgListVisible\", \"orgAppListVisible\"]);\n\n var _useState = useState(props.selectedKey || get(tabs, '0.key')),\n _useState2 = _slicedToArray(_useState, 2),\n selectedKey = _useState2[0],\n setSelectedKey = _useState2[1];\n\n var _useState3 = useState(tabs || []),\n _useState4 = _slicedToArray(_useState3, 2),\n tabItems = _useState4[0],\n setTabItems = _useState4[1];\n\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n arrowVisible = _useState6[0],\n setArrowVisible = _useState6[1];\n\n var _useState7 = useState({\n start: true,\n end: true\n }),\n _useState8 = _slicedToArray(_useState7, 2),\n tabsPositionFlags = _useState8[0],\n setTabsPositionFlags = _useState8[1];\n\n var tabsRef = useRef();\n\n var getTabsDom = function getTabsDom() {\n return tabsRef.current;\n };\n\n var onTabClick = function onTabClick(tab, index) {\n setSelectedKey(tab.key);\n onTabSelect == null ? void 0 : onTabSelect(tab);\n\n if (selectedKey !== tab.key) {\n onTabChange == null ? void 0 : onTabChange(tab);\n }\n };\n\n var closeTabHandle = function closeTabHandle(tab, index, evt) {\n evt.stopPropagation();\n var newTabItems = tabItems.filter(function (_ref2) {\n var key = _ref2.key;\n return key !== tab.key;\n });\n var newSelectedKey = selectedKey;\n setTabItems(newTabItems);\n\n if (tab.key === selectedKey) {\n var _newTabItems$, _newTabItems;\n\n newSelectedKey = index === 0 ? (_newTabItems$ = newTabItems[0]) == null ? void 0 : _newTabItems$.key : (_newTabItems = newTabItems[index - 1]) == null ? void 0 : _newTabItems.key;\n setSelectedKey(newSelectedKey);\n }\n\n onTabClose == null ? void 0 : onTabClose(tab, newTabItems, newTabItems.find(function (_ref3) {\n var key = _ref3.key;\n return key === newSelectedKey;\n }));\n };\n\n var onMoveToLeft = function onMoveToLeft() {\n var tabsDom = getTabsDom();\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 32;\n var x = Math.abs(+tabsDom.style.transform.replace(/[^\\d.-]/g, ''));\n var index = Math.ceil(x / 130);\n var trueX = index * 130;\n var newX = Math.min(0, -(trueX - parentWidth));\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n var width = tabItems.length * 130;\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n var onMoveToRight = function onMoveToRight() {\n var tabsDom = getTabsDom();\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 32;\n var width = tabItems.length * 130;\n var x = Math.abs(+tabsDom.style.transform.replace(/[^\\d.-]/g, ''));\n var index = Math.floor(x / 130);\n var trueX = index * 130;\n var newX = Math.max(-(width - parentWidth), -(trueX + parentWidth));\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n var translateTabsDom = function translateTabsDom(tabs, selectedKey) {\n if (!selectedKey) return;\n var index = tabs.indexOf(tabs.find(function (_ref4) {\n var key = _ref4.key;\n return key === selectedKey;\n }));\n if (index === -1) return;\n var tabsDom = getTabsDom();\n var x = -+tabsDom.style.transform.replace(/[^\\d.-]/g, '');\n var bbox = {\n left: index * 130,\n right: (index + 1) * 130\n };\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 36;\n var width = tabItems.length * 130;\n var tailX = x + parentWidth; //当前滑动窗口尾部坐标\n\n var newX = -x;\n\n if (bbox.left < x) {\n newX = -bbox.left;\n } else if (bbox.right >= tailX) {\n newX = parentWidth - bbox.right;\n }\n\n if (newX + width < parentWidth) {\n newX = -(width - parentWidth);\n }\n\n newX = Math.min(0, newX);\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n useEffect(function () {\n setSelectedKey(props.selectedKey || get(tabs, '0.key')); // const t = [{'code':'tagdata','enName':'tagdata','icon':'layer-color','menuName':'打标数据管理打标数据管理打标数据管理','path':'/orion/tag/datalist','key':'tagdata','name':'打标数据管理打标数据管理打标数据管理'},{'code':'taglist','enName':'taglist','icon':'home','menuName':'标签管理','path':'http://baidu.com/orion/tag/list','key':'taglist','name':'标签管理'},{'code':'relation1','enName':'dadicasesearch1','icon':'home','menuName':'案件检索1','path':'/orion/case/relation1','key':'relation1','name':'案件检索1'},{'code':'dadicasesearch-0','enName':'dadicasesearch','icon':'home','menuName':'案件检索-0','path':'/orion/case/relation0','key':'dadicasesearch-0','name':'案件检索-0'},{'code':'dadicasesearch-1','enName':'dadicasesearch','icon':'home','menuName':'案件检索-1','path':'/orion/case/relation1','key':'dadicasesearch-1','name':'案件检索-1'},{'code':'dadicasesearch-2','enName':'dadicasesearch','icon':'home','menuName':'案件检索-2','path':'/orion/case/relation2','key':'dadicasesearch-2','name':'案件检索-2'},{'code':'dadicasesearch-3','enName':'dadicasesearch','icon':'home','menuName':'案件检索-3','path':'/orion/case/relation3','key':'dadicasesearch-3','name':'案件检索-3'},{'code':'dadicasesearch-4','enName':'dadicasesearch','icon':'home','menuName':'案件检索-4','path':'/orion/case/relation4','key':'dadicasesearch-4','name':'案件检索-4'},{'code':'dadicasesearch-5','enName':'dadicasesearch','icon':'home','menuName':'案件检索-5','path':'/orion/case/relation5','key':'dadicasesearch-5','name':'案件检索-5'},{'code':'dadicasesearch-6','enName':'dadicasesearch','icon':'home','menuName':'案件检索-6','path':'/orion/case/relation6','key':'dadicasesearch-6','name':'案件检索-6'},{'code':'dadicasesearch-7','enName':'dadicasesearch','icon':'home','menuName':'案件检索-7','path':'/orion/case/relation7','key':'dadicasesearch-7','name':'案件检索-7'},{'code':'dadicasesearch-8','enName':'dadicasesearch','icon':'home','menuName':'案件检索-8','path':'/orion/case/relation8','key':'dadicasesearch-8','name':'案件检索-8'}] ;\n\n setTabItems(tabs);\n }, [tabs, props.selectedKey]);\n useEffect(function () {}, [props.orgAppListVisible]);\n useEffect(function () {\n var tabsDom = getTabsDom();\n setArrowVisible(tabsDom.offsetWidth - tabsDom.parentNode.offsetWidth > 0);\n }, [tabItems]);\n useEffect(function () {\n translateTabsDom(tabItems, selectedKey);\n }, [tabItems, selectedKey, appListVisible, orgListVisible, orgAppListVisible]);\n return React.createElement(TabsContainer, _extends({}, props, {\n className: cn('tnt-layout-header-tabs', _defineProperty({}, className, className))\n }), React.createElement(Tabs, {\n className: \"tnt-layout-header-tabs-content\",\n ref: tabsRef\n }, tabItems.map(function (tab, index) {\n var _tabItems;\n\n return React.createElement(TabItem, {\n key: tab.key,\n theme: theme,\n className: cn({\n active: selectedKey === tab.key,\n activeTabPreSibling: ((_tabItems = tabItems[index + 1]) == null ? void 0 : _tabItems.key) === selectedKey\n }),\n onClick: function onClick() {\n return onTabClick(tab, index);\n }\n }, React.createElement(\"a\", {\n href: tab.key,\n onClick: function onClick(evt) {\n return evt.preventDefault();\n }\n }, tab.name), tabItems.length > 1 && React.createElement(Icon, {\n type: \"close\",\n onClick: closeTabHandle.bind(null, tab, index)\n }));\n })), arrowVisible && React.createElement(\"div\", {\n className: \"tnt-layout-header-tabs-arrows\"\n }, React.createElement(Icon, {\n type: \"left\",\n onClick: onMoveToLeft,\n disabled: !tabsPositionFlags.start\n }), React.createElement(Icon, {\n type: \"right\",\n onClick: onMoveToRight,\n disabled: !tabsPositionFlags.end\n })));\n});\nexport default HeaderTabs;"
15825
+ "source": "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _templateObject3() {\n var data = _taggedTemplateLiteral([\"\\n position: relative;\\n margin: 0;\\n padding: 0 20px 0 10px;\\n cursor: pointer;\\n display: inline-block;\\n line-height: \", \";\\n /* transition: background-color .5; */\\n width: 130px;\\n color: rgba(255,255,255,.6);\\n\\n .tnt-icon[type=close] {\\n display: none;\\n position: absolute;\\n right: 0;\\n top: 0;\\n font-size: 10px;\\n padding: 0 10px;\\n cursor: pointer;\\n z-index: 1;\\n }\\n\\n &:not(:last-child):after {\\n position: absolute;\\n content: \\\"\\\";\\n right: 0;\\n top: 6px;\\n height: 24px;\\n width: 1px;\\n // opacity: .5;\\n // background: #fff;\\n background: #E1E6EE;\\n opacity: .5;\\n // .tnt-themeS1 & {\\n // background: #E1E6EE;\\n // opacity: 1;\\n // }\\n }\\n\\n &.active,\\n &.activeTabPreSibling {\\n &:after {\\n display: none;\\n }\\n }\\n\\n a {\\n font-size: 14px;\\n color: \", \";//rgba(255,255,255,.6);\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n transition: none;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n display: inline-block;\\n line-height: 36px;\\n width: 100%;\\n // &:hover {\\n // color: rgba(255,255,255,.8);\\n // }\\n // .tnt-themeS1 & {\\n // color: \", \";\\n // }\\n }\\n\\n &:hover,\\n &.active {\\n .tnt-icon[type=close] {\\n display: unset;\\n color: #455064;\\n // .tnt-themeS1 & {\\n // color: #455064;\\n // }\\n }\\n }\\n\\n &.active {\\n background: #F1F2F5;\\n border-radius: 2px 2px 0 0;\\n color: \", \";\\n font-weight: 600;\\n\\n a {\\n color: \", \";\\n }\\n }\\n\"]);\n\n _templateObject3 = function _templateObject3() {\n return data;\n };\n\n return data;\n}\n\nfunction _templateObject2() {\n var data = _taggedTemplateLiteral([\"\\n margin: 14px 0 0;\\n padding: 0;\\n list-style: none;\\n text-align: left;\\n height: 36px;\\n line-height: 36px;\\n flex: 1;\\n white-space: nowrap;\\n padding-right: 40px;\\n transition: transform 0.25s linear;\\n position: absolute;\\n\"]);\n\n _templateObject2 = function _templateObject2() {\n return data;\n };\n\n return data;\n}\n\nfunction _templateObject() {\n var data = _taggedTemplateLiteral([\"\\n display: flex;\\n flex: 1;\\n overflow: hidden;\\n position: relative;\\n margin-right: 12px;\\n margin-left: 4px;\\n\\n .tnt-layout-header-tabs-arrows {\\n position: absolute;\\n right: 0;\\n bottom: 0;\\n font-size: 16px;\\n line-height: 36px;\\n height: 36px;\\n background: #fff !important;\\n color: rgba(255,255,255,.8) !important;\\n .tnt-icon {\\n cursor: pointer;\\n color: rgba(139,145,158,1);\\n &[disabled] {\\n color: rgba(139, 145, 158, .5);\\n pointer-events: none;\\n cursor: not-allowed;\\n }\\n }\\n // background: #191D29;\\n // .tnt-icon {\\n // cursor: pointer;\\n // &[disabled] {\\n // color: rgba(139, 145, 158, .5);\\n // pointer-events: none;\\n // cursor: not-allowed;\\n // }\\n // }\\n // .tnt-themeS1 & {\\n // background: #fff;\\n // .tnt-icon {\\n // color: rgba(139,145,158,1);\\n // }\\n // }\\n // \\u591A\\u7B7E\\u9875\\u7684\\u7BAD\\u5934\\u6837\\u5F0F\\n // .tnt-themeS3 & {\\n // background: \", \"; //#1D4295;\\n // .tnt-icon {\\n // color: rgba(255, 255, 255, .5);\\n // &[disabled] {\\n // color: rgba(139, 145, 158, .5);\\n // pointer-events: none;\\n // cursor: not-allowed;\\n // }\\n // }\\n // }\\n }\\n\"]);\n\n _templateObject = function _templateObject() {\n return data;\n };\n\n return data;\n}\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport { useState, useEffect, useRef } from \"react\";\nimport styled, { withTheme } from \"styled-components\";\nimport cn from \"classnames\";\nimport { get } from \"lodash\";\nimport Icon from \"../Icon\";\nvar TabsContainer = styled.div(_templateObject(), function (props) {\n return \"\".concat(props.theme.blueBgColor);\n});\nvar Tabs = styled.ul(_templateObject2());\nvar TabItem = styled.li(_templateObject3(), function (props) {\n return props.theme.size === \"large\" ? \"46px\" : \"36px\";\n}, function (props) {\n return props.theme.headerActionsColor;\n}, function (props) {\n return props.theme.headerActionsColor;\n}, function (props) {\n return props.theme.primaryTextColor;\n}, function (props) {\n return props.theme.primaryTextColor;\n});\nexport var HeaderTabs = withTheme(function (_ref) {\n var theme = _ref.theme,\n className = _ref.className,\n _ref$tabs = _ref.tabs,\n tabs = _ref$tabs === void 0 ? [] : _ref$tabs,\n onTabChange = _ref.onTabChange,\n onTabSelect = _ref.onTabSelect,\n onTabClose = _ref.onTabClose,\n appListVisible = _ref.appListVisible,\n orgListVisible = _ref.orgListVisible,\n orgAppListVisible = _ref.orgAppListVisible,\n language = _ref.language,\n props = _objectWithoutProperties(_ref, [\"theme\", \"className\", \"tabs\", \"onTabChange\", \"onTabSelect\", \"onTabClose\", \"appListVisible\", \"orgListVisible\", \"orgAppListVisible\", \"language\"]);\n\n var _useState = useState(props.selectedKey || get(tabs, \"0.key\")),\n _useState2 = _slicedToArray(_useState, 2),\n selectedKey = _useState2[0],\n setSelectedKey = _useState2[1];\n\n var _useState3 = useState(tabs || []),\n _useState4 = _slicedToArray(_useState3, 2),\n tabItems = _useState4[0],\n setTabItems = _useState4[1];\n\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n arrowVisible = _useState6[0],\n setArrowVisible = _useState6[1];\n\n var _useState7 = useState({\n start: true,\n end: true\n }),\n _useState8 = _slicedToArray(_useState7, 2),\n tabsPositionFlags = _useState8[0],\n setTabsPositionFlags = _useState8[1];\n\n var tabsRef = useRef();\n\n var getTabsDom = function getTabsDom() {\n return tabsRef.current;\n };\n\n var onTabClick = function onTabClick(tab, index) {\n setSelectedKey(tab.key);\n onTabSelect == null ? void 0 : onTabSelect(tab);\n\n if (selectedKey !== tab.key) {\n onTabChange == null ? void 0 : onTabChange(tab);\n }\n };\n\n var closeTabHandle = function closeTabHandle(tab, index, evt) {\n evt.stopPropagation();\n var newTabItems = tabItems.filter(function (_ref2) {\n var key = _ref2.key;\n return key !== tab.key;\n });\n var newSelectedKey = selectedKey;\n setTabItems(newTabItems);\n\n if (tab.key === selectedKey) {\n var _newTabItems$, _newTabItems;\n\n newSelectedKey = index === 0 ? (_newTabItems$ = newTabItems[0]) == null ? void 0 : _newTabItems$.key : (_newTabItems = newTabItems[index - 1]) == null ? void 0 : _newTabItems.key;\n setSelectedKey(newSelectedKey);\n }\n\n onTabClose == null ? void 0 : onTabClose(tab, newTabItems, newTabItems.find(function (_ref3) {\n var key = _ref3.key;\n return key === newSelectedKey;\n }));\n };\n\n var onMoveToLeft = function onMoveToLeft() {\n var tabsDom = getTabsDom();\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 32;\n var x = Math.abs(+tabsDom.style.transform.replace(/[^\\d.-]/g, \"\"));\n var index = Math.ceil(x / 130);\n var trueX = index * 130;\n var newX = Math.min(0, -(trueX - parentWidth));\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n var width = tabItems.length * 130;\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n var onMoveToRight = function onMoveToRight() {\n var tabsDom = getTabsDom();\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 32;\n var width = tabItems.length * 130;\n var x = Math.abs(+tabsDom.style.transform.replace(/[^\\d.-]/g, \"\"));\n var index = Math.floor(x / 130);\n var trueX = index * 130;\n var newX = Math.max(-(width - parentWidth), -(trueX + parentWidth));\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n var translateTabsDom = function translateTabsDom(tabs, selectedKey) {\n if (!selectedKey) return;\n var index = tabs.indexOf(tabs.find(function (_ref4) {\n var key = _ref4.key;\n return key === selectedKey;\n }));\n if (index === -1) return;\n var tabsDom = getTabsDom();\n var x = -+tabsDom.style.transform.replace(/[^\\d.-]/g, \"\");\n var bbox = {\n left: index * 130,\n right: (index + 1) * 130\n };\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 36;\n var width = tabItems.length * 130;\n var tailX = x + parentWidth; //当前滑动窗口尾部坐标\n\n var newX = -x;\n\n if (bbox.left < x) {\n newX = -bbox.left;\n } else if (bbox.right >= tailX) {\n newX = parentWidth - bbox.right;\n }\n\n if (newX + width < parentWidth) {\n newX = -(width - parentWidth);\n }\n\n newX = Math.min(0, newX);\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n useEffect(function () {\n setSelectedKey(props.selectedKey || get(tabs, \"0.key\")); // const t = [{'code':'tagdata','enName':'tagdata','icon':'layer-color','menuName':'打标数据管理打标数据管理打标数据管理','path':'/orion/tag/datalist','key':'tagdata','name':'打标数据管理打标数据管理打标数据管理'},{'code':'taglist','enName':'taglist','icon':'home','menuName':'标签管理','path':'http://baidu.com/orion/tag/list','key':'taglist','name':'标签管理'},{'code':'relation1','enName':'dadicasesearch1','icon':'home','menuName':'案件检索1','path':'/orion/case/relation1','key':'relation1','name':'案件检索1'},{'code':'dadicasesearch-0','enName':'dadicasesearch','icon':'home','menuName':'案件检索-0','path':'/orion/case/relation0','key':'dadicasesearch-0','name':'案件检索-0'},{'code':'dadicasesearch-1','enName':'dadicasesearch','icon':'home','menuName':'案件检索-1','path':'/orion/case/relation1','key':'dadicasesearch-1','name':'案件检索-1'},{'code':'dadicasesearch-2','enName':'dadicasesearch','icon':'home','menuName':'案件检索-2','path':'/orion/case/relation2','key':'dadicasesearch-2','name':'案件检索-2'},{'code':'dadicasesearch-3','enName':'dadicasesearch','icon':'home','menuName':'案件检索-3','path':'/orion/case/relation3','key':'dadicasesearch-3','name':'案件检索-3'},{'code':'dadicasesearch-4','enName':'dadicasesearch','icon':'home','menuName':'案件检索-4','path':'/orion/case/relation4','key':'dadicasesearch-4','name':'案件检索-4'},{'code':'dadicasesearch-5','enName':'dadicasesearch','icon':'home','menuName':'案件检索-5','path':'/orion/case/relation5','key':'dadicasesearch-5','name':'案件检索-5'},{'code':'dadicasesearch-6','enName':'dadicasesearch','icon':'home','menuName':'案件检索-6','path':'/orion/case/relation6','key':'dadicasesearch-6','name':'案件检索-6'},{'code':'dadicasesearch-7','enName':'dadicasesearch','icon':'home','menuName':'案件检索-7','path':'/orion/case/relation7','key':'dadicasesearch-7','name':'案件检索-7'},{'code':'dadicasesearch-8','enName':'dadicasesearch','icon':'home','menuName':'案件检索-8','path':'/orion/case/relation8','key':'dadicasesearch-8','name':'案件检索-8'}] ;\n\n setTabItems(tabs);\n }, [tabs, props.selectedKey]);\n useEffect(function () {}, [props.orgAppListVisible]);\n useEffect(function () {\n var tabsDom = getTabsDom();\n setArrowVisible(tabsDom.offsetWidth - tabsDom.parentNode.offsetWidth > 0);\n }, [tabItems]);\n useEffect(function () {\n translateTabsDom(tabItems, selectedKey);\n }, [tabItems, selectedKey, appListVisible, orgListVisible, orgAppListVisible]);\n return React.createElement(TabsContainer, _extends({}, props, {\n className: cn(\"tnt-layout-header-tabs\", _defineProperty({}, className, className))\n }), React.createElement(Tabs, {\n className: \"tnt-layout-header-tabs-content\",\n ref: tabsRef\n }, tabItems.map(function (tab, index) {\n var _tabItems;\n\n return React.createElement(TabItem, {\n key: tab.key,\n theme: theme,\n className: cn({\n active: selectedKey === tab.key,\n activeTabPreSibling: ((_tabItems = tabItems[index + 1]) == null ? void 0 : _tabItems.key) === selectedKey\n }),\n onClick: function onClick() {\n return onTabClick(tab, index);\n }\n }, React.createElement(\"a\", {\n href: tab.key,\n onClick: function onClick(evt) {\n return evt.preventDefault();\n }\n }, {\n cn: tab.name,\n en: tab.enName || tab.name\n }[language || \"cn\"]), tab.closable !== false && tabItems.length > 1 && React.createElement(Icon, {\n type: \"close\",\n onClick: closeTabHandle.bind(null, tab, index)\n }));\n })), arrowVisible && React.createElement(\"div\", {\n className: \"tnt-layout-header-tabs-arrows\"\n }, React.createElement(Icon, {\n type: \"left\",\n onClick: onMoveToLeft,\n disabled: !tabsPositionFlags.start\n }), React.createElement(Icon, {\n type: \"right\",\n onClick: onMoveToRight,\n disabled: !tabsPositionFlags.end\n })));\n});\nexport default HeaderTabs;"
15826
15826
  },
15827
15827
  {
15828
15828
  "id": null,
@@ -21096,7 +21096,7 @@
21096
21096
  "files": [
21097
21097
  "1.tntd.js"
21098
21098
  ],
21099
- "hash": "cff068146fd7022523ec",
21099
+ "hash": "04d0a35e883db5b75273",
21100
21100
  "siblings": [],
21101
21101
  "parents": [
21102
21102
  0
@@ -21380,7 +21380,7 @@
21380
21380
  "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./components/DevelopmentLogin/index.js (referenced with import())"
21381
21381
  ],
21382
21382
  "depth": 2,
21383
- "source": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useState } from 'react';\nimport { Modal, Input, Form, message } from 'antd';\nimport Cookies from 'universal-cookie';\nvar cookies = new Cookies(); // 默认\n\nvar accountInfoDefault = {\n account: 'admin',\n password: 'Td@123456'\n};\nexport default (function (_ref) {\n var visible = _ref.visible,\n close = _ref.close,\n signIn = _ref.signIn;\n\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n confirmLoading = _useState2[0],\n setConfirmLoading = _useState2[1]; // 如果storage中已存在,则取storage\n\n\n var storageAccountInfo = localStorage.getItem('accountInfo');\n\n if (storageAccountInfo) {\n try {\n accountInfoDefault = JSON.parse(storageAccountInfo);\n } catch (e) {}\n }\n\n var _useState3 = useState(accountInfoDefault),\n _useState4 = _slicedToArray(_useState3, 2),\n accountInfo = _useState4[0],\n setAccountInfo = _useState4[1];\n\n var account = accountInfo.account,\n password = accountInfo.password;\n\n var onSubmit = function onSubmit() {\n setConfirmLoading(true);\n var returnVal = signIn && signIn(accountInfo);\n\n if (returnVal && returnVal.then) {\n returnVal.then(function (res) {\n message.success('模拟登陆成功');\n localStorage.setItem('accountInfo', JSON.stringify(accountInfo));\n setConfirmLoading(false);\n setTimeout(function () {\n var _ref2 = res || {},\n token = _ref2.tdToken,\n userId = _ref2.userId;\n\n cookies.set('_td_token_', token, {\n path: '/'\n });\n cookies.set('_uid_', userId, {\n path: '/'\n });\n close();\n }, 500);\n })[\"catch\"](function (err) {\n setConfirmLoading(false);\n throw err;\n });\n }\n };\n\n var changeFieldValue = function changeFieldValue(key, evt) {\n setAccountInfo(_objectSpread({}, accountInfo, _defineProperty({}, key, evt.target.value)));\n };\n\n return React.createElement(Modal, {\n title: \"\\u5F00\\u53D1\\u8005\\u6A21\\u62DF\\u767B\\u9646\",\n visible: visible,\n maskClosable: false,\n onOk: onSubmit,\n onCancel: close,\n confirmLoading: confirmLoading\n }, React.createElement(Form, {\n labelCol: {\n span: 5\n },\n wrapperCol: {\n span: 18\n }\n }, React.createElement(Form.Item, {\n label: \"\\u7528\\u6237\\u540D\\uFF1A\"\n }, React.createElement(Input, {\n type: \"text\",\n placeholder: \"\\u8BF7\\u8F93\\u5165\\u7528\\u6237\\u540D\",\n value: account || undefined,\n onChange: function onChange(evt) {\n return changeFieldValue('account', evt);\n }\n })), React.createElement(Form.Item, {\n label: \"\\u5BC6\\u7801\\uFF1A\"\n }, React.createElement(Input, {\n type: \"text\",\n placeholder: \"\\u8BF7\\u8F93\\u5165\\u7528\\u6237\\u540D\",\n value: password || undefined,\n onChange: function onChange(evt) {\n return changeFieldValue('password', evt);\n }\n }))));\n});"
21383
+ "source": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useState } from 'react';\nimport { Modal, Input, Form, message } from 'antd';\nimport Cookies from 'universal-cookie';\nvar cookies = new Cookies(); // 默认\n\nvar accountInfoDefault = {\n account: undefined,\n password: undefined\n};\nexport default (function (_ref) {\n var visible = _ref.visible,\n close = _ref.close,\n signIn = _ref.signIn;\n\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n confirmLoading = _useState2[0],\n setConfirmLoading = _useState2[1]; // 如果storage中已存在,则取storage\n\n\n var storageAccountInfo = localStorage.getItem('accountInfo');\n\n if (storageAccountInfo) {\n try {\n accountInfoDefault = JSON.parse(storageAccountInfo);\n } catch (e) {}\n }\n\n var _useState3 = useState(accountInfoDefault),\n _useState4 = _slicedToArray(_useState3, 2),\n accountInfo = _useState4[0],\n setAccountInfo = _useState4[1];\n\n var account = accountInfo.account,\n password = accountInfo.password;\n\n var onSubmit = function onSubmit() {\n setConfirmLoading(true);\n var returnVal = signIn && signIn(accountInfo);\n\n if (returnVal && returnVal.then) {\n returnVal.then(function (res) {\n message.success('模拟登陆成功');\n localStorage.setItem('accountInfo', JSON.stringify(accountInfo));\n setConfirmLoading(false);\n setTimeout(function () {\n var _ref2 = res || {},\n token = _ref2.tdToken,\n userId = _ref2.userId;\n\n cookies.set('_td_token_', token, {\n path: '/'\n });\n cookies.set('_uid_', userId, {\n path: '/'\n });\n close();\n }, 500);\n })[\"catch\"](function (err) {\n setConfirmLoading(false);\n throw err;\n });\n }\n };\n\n var changeFieldValue = function changeFieldValue(key, evt) {\n setAccountInfo(_objectSpread({}, accountInfo, _defineProperty({}, key, evt.target.value)));\n };\n\n return React.createElement(Modal, {\n title: \"\\u5F00\\u53D1\\u8005\\u6A21\\u62DF\\u767B\\u9646\",\n visible: visible,\n maskClosable: false,\n onOk: onSubmit,\n onCancel: close,\n confirmLoading: confirmLoading\n }, React.createElement(Form, {\n labelCol: {\n span: 5\n },\n wrapperCol: {\n span: 18\n }\n }, React.createElement(Form.Item, {\n label: \"\\u7528\\u6237\\u540D\\uFF1A\"\n }, React.createElement(Input, {\n type: \"text\",\n placeholder: \"\\u8BF7\\u8F93\\u5165\\u7528\\u6237\\u540D\",\n value: account || undefined,\n onChange: function onChange(evt) {\n return changeFieldValue('account', evt);\n }\n })), React.createElement(Form.Item, {\n label: \"\\u5BC6\\u7801\\uFF1A\"\n }, React.createElement(Input, {\n type: \"text\",\n placeholder: \"\\u8BF7\\u8F93\\u5165\\u7528\\u6237\\u540D\",\n value: password || undefined,\n onChange: function onChange(evt) {\n return changeFieldValue('password', evt);\n }\n }))));\n});"
21384
21384
  },
21385
21385
  {
21386
21386
  "id": null,
@@ -23109,7 +23109,7 @@
23109
23109
  "moduleName": "./components/index.js + 88 modules",
23110
23110
  "type": "harmony import specifier",
23111
23111
  "userRequest": "react",
23112
- "loc": "82:18-26"
23112
+ "loc": "83:9-14"
23113
23113
  },
23114
23114
  {
23115
23115
  "moduleId": 87,
@@ -23118,7 +23118,7 @@
23118
23118
  "moduleName": "./components/index.js + 88 modules",
23119
23119
  "type": "harmony import specifier",
23120
23120
  "userRequest": "react",
23121
- "loc": "83:9-14"
23121
+ "loc": "83:18-26"
23122
23122
  },
23123
23123
  {
23124
23124
  "moduleId": 87,
@@ -23154,7 +23154,7 @@
23154
23154
  "moduleName": "./components/index.js + 88 modules",
23155
23155
  "type": "harmony import specifier",
23156
23156
  "userRequest": "react",
23157
- "loc": "87:19-27"
23157
+ "loc": "88:2-11"
23158
23158
  },
23159
23159
  {
23160
23160
  "moduleId": 87,
@@ -23163,7 +23163,7 @@
23163
23163
  "moduleName": "./components/index.js + 88 modules",
23164
23164
  "type": "harmony import specifier",
23165
23165
  "userRequest": "react",
23166
- "loc": "88:2-11"
23166
+ "loc": "88:19-27"
23167
23167
  },
23168
23168
  {
23169
23169
  "moduleId": 87,
@@ -23199,7 +23199,7 @@
23199
23199
  "moduleName": "./components/index.js + 88 modules",
23200
23200
  "type": "harmony import specifier",
23201
23201
  "userRequest": "react",
23202
- "loc": "92:19-27"
23202
+ "loc": "93:19-27"
23203
23203
  },
23204
23204
  {
23205
23205
  "moduleId": 87,
@@ -23235,7 +23235,7 @@
23235
23235
  "moduleName": "./components/index.js + 88 modules",
23236
23236
  "type": "harmony import specifier",
23237
23237
  "userRequest": "react",
23238
- "loc": "97:19-27"
23238
+ "loc": "98:16-26"
23239
23239
  },
23240
23240
  {
23241
23241
  "moduleId": 87,
@@ -23244,7 +23244,7 @@
23244
23244
  "moduleName": "./components/index.js + 88 modules",
23245
23245
  "type": "harmony import specifier",
23246
23246
  "userRequest": "react",
23247
- "loc": "98:16-26"
23247
+ "loc": "98:19-27"
23248
23248
  },
23249
23249
  {
23250
23250
  "moduleId": 87,
@@ -23298,7 +23298,7 @@
23298
23298
  "moduleName": "./components/index.js + 88 modules",
23299
23299
  "type": "harmony import specifier",
23300
23300
  "userRequest": "react",
23301
- "loc": "105:16-22"
23301
+ "loc": "106:11-16"
23302
23302
  },
23303
23303
  {
23304
23304
  "moduleId": 87,
@@ -23307,7 +23307,7 @@
23307
23307
  "moduleName": "./components/index.js + 88 modules",
23308
23308
  "type": "harmony import specifier",
23309
23309
  "userRequest": "react",
23310
- "loc": "106:11-16"
23310
+ "loc": "106:16-22"
23311
23311
  },
23312
23312
  {
23313
23313
  "moduleId": 87,
@@ -23937,7 +23937,7 @@
23937
23937
  "moduleName": "./components/index.js + 88 modules",
23938
23938
  "type": "harmony import specifier",
23939
23939
  "userRequest": "react",
23940
- "loc": "212:2-11"
23940
+ "loc": "213:2-11"
23941
23941
  },
23942
23942
  {
23943
23943
  "moduleId": 87,
@@ -23955,7 +23955,7 @@
23955
23955
  "moduleName": "./components/index.js + 88 modules",
23956
23956
  "type": "harmony import specifier",
23957
23957
  "userRequest": "react",
23958
- "loc": "217:2-11"
23958
+ "loc": "217:13-18"
23959
23959
  },
23960
23960
  {
23961
23961
  "moduleId": 87,
@@ -23964,7 +23964,7 @@
23964
23964
  "moduleName": "./components/index.js + 88 modules",
23965
23965
  "type": "harmony import specifier",
23966
23966
  "userRequest": "react",
23967
- "loc": "217:13-18"
23967
+ "loc": "218:2-11"
23968
23968
  },
23969
23969
  {
23970
23970
  "moduleId": 87,
@@ -23973,7 +23973,7 @@
23973
23973
  "moduleName": "./components/index.js + 88 modules",
23974
23974
  "type": "harmony import specifier",
23975
23975
  "userRequest": "react",
23976
- "loc": "218:2-11"
23976
+ "loc": "218:13-18"
23977
23977
  },
23978
23978
  {
23979
23979
  "moduleId": 87,
@@ -23982,7 +23982,7 @@
23982
23982
  "moduleName": "./components/index.js + 88 modules",
23983
23983
  "type": "harmony import specifier",
23984
23984
  "userRequest": "react",
23985
- "loc": "218:13-18"
23985
+ "loc": "219:2-11"
23986
23986
  },
23987
23987
  {
23988
23988
  "moduleId": 87,
@@ -24000,7 +24000,7 @@
24000
24000
  "moduleName": "./components/index.js + 88 modules",
24001
24001
  "type": "harmony import specifier",
24002
24002
  "userRequest": "react",
24003
- "loc": "222:2-11"
24003
+ "loc": "223:2-11"
24004
24004
  },
24005
24005
  {
24006
24006
  "moduleId": 87,
@@ -24356,9 +24356,9 @@
24356
24356
  "chunks": [
24357
24357
  0
24358
24358
  ],
24359
- "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
24359
+ "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
24360
24360
  "issuerId": null,
24361
- "issuerName": "./components/QueryForm/index.js",
24361
+ "issuerName": "./components/Table/ResizableTable/index.js",
24362
24362
  "issuerPath": [
24363
24363
  {
24364
24364
  "id": null,
@@ -24367,8 +24367,8 @@
24367
24367
  },
24368
24368
  {
24369
24369
  "id": null,
24370
- "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
24371
- "name": "./components/QueryForm/index.js"
24370
+ "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
24371
+ "name": "./components/Table/ResizableTable/index.js"
24372
24372
  }
24373
24373
  ],
24374
24374
  "failed": false,
@@ -26467,9 +26467,9 @@
26467
26467
  "chunks": [
26468
26468
  0
26469
26469
  ],
26470
- "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
26470
+ "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
26471
26471
  "issuerId": null,
26472
- "issuerName": "./components/QueryForm/index.js",
26472
+ "issuerName": "./components/Table/ResizableTable/index.js",
26473
26473
  "issuerPath": [
26474
26474
  {
26475
26475
  "id": null,
@@ -26478,8 +26478,8 @@
26478
26478
  },
26479
26479
  {
26480
26480
  "id": null,
26481
- "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
26482
- "name": "./components/QueryForm/index.js"
26481
+ "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
26482
+ "name": "./components/Table/ResizableTable/index.js"
26483
26483
  }
26484
26484
  ],
26485
26485
  "failed": false,
@@ -26935,7 +26935,7 @@
26935
26935
  "moduleName": "./components/index.js + 88 modules",
26936
26936
  "type": "harmony import specifier",
26937
26937
  "userRequest": "lodash",
26938
- "loc": "82:48-51"
26938
+ "loc": "82:67-70"
26939
26939
  },
26940
26940
  {
26941
26941
  "moduleId": 87,
@@ -26944,7 +26944,7 @@
26944
26944
  "moduleName": "./components/index.js + 88 modules",
26945
26945
  "type": "harmony import specifier",
26946
26946
  "userRequest": "lodash",
26947
- "loc": "82:67-70"
26947
+ "loc": "83:48-51"
26948
26948
  },
26949
26949
  {
26950
26950
  "moduleId": 87,
@@ -27268,7 +27268,7 @@
27268
27268
  "moduleName": "./components/index.js + 88 modules",
27269
27269
  "type": "harmony import specifier",
27270
27270
  "userRequest": "lodash",
27271
- "loc": "213:40-43"
27271
+ "loc": "214:40-43"
27272
27272
  },
27273
27273
  {
27274
27274
  "moduleId": 87,
@@ -27360,9 +27360,9 @@
27360
27360
  "chunks": [
27361
27361
  0
27362
27362
  ],
27363
- "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
27363
+ "issuer": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
27364
27364
  "issuerId": null,
27365
- "issuerName": "./components/QueryForm/index.js",
27365
+ "issuerName": "./components/Table/ResizableTable/index.js",
27366
27366
  "issuerPath": [
27367
27367
  {
27368
27368
  "id": null,
@@ -27371,8 +27371,8 @@
27371
27371
  },
27372
27372
  {
27373
27373
  "id": null,
27374
- "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/QueryForm/index.js",
27375
- "name": "./components/QueryForm/index.js"
27374
+ "identifier": "/Users/wangxiaofei/git/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/wangxiaofei/git/tntd/components/Table/ResizableTable/index.js",
27375
+ "name": "./components/Table/ResizableTable/index.js"
27376
27376
  }
27377
27377
  ],
27378
27378
  "failed": false,
@@ -27810,7 +27810,7 @@
27810
27810
  "moduleName": "./components/index.js + 88 modules",
27811
27811
  "type": "harmony import specifier",
27812
27812
  "userRequest": "classnames",
27813
- "loc": "226:15-17"
27813
+ "loc": "227:15-17"
27814
27814
  },
27815
27815
  {
27816
27816
  "moduleId": 87,
@@ -27819,7 +27819,7 @@
27819
27819
  "moduleName": "./components/index.js + 88 modules",
27820
27820
  "type": "harmony import specifier",
27821
27821
  "userRequest": "classnames",
27822
- "loc": "236:17-19"
27822
+ "loc": "237:17-19"
27823
27823
  },
27824
27824
  {
27825
27825
  "moduleId": 87,
@@ -29227,9 +29227,9 @@
29227
29227
  "chunks": [
29228
29228
  0
29229
29229
  ],
29230
- "issuer": "/Users/wangxiaofei/git/tntd/node_modules/react-resizable/build/Resizable.js",
29231
- "issuerId": 15,
29232
- "issuerName": "./node_modules/react-resizable/build/Resizable.js",
29230
+ "issuer": "/Users/wangxiaofei/git/tntd/node_modules/react-resizable/build/ResizableBox.js",
29231
+ "issuerId": 85,
29232
+ "issuerName": "./node_modules/react-resizable/build/ResizableBox.js",
29233
29233
  "issuerPath": [
29234
29234
  {
29235
29235
  "id": null,
@@ -29247,9 +29247,9 @@
29247
29247
  "name": "./node_modules/react-resizable/index.js"
29248
29248
  },
29249
29249
  {
29250
- "id": 15,
29251
- "identifier": "/Users/wangxiaofei/git/tntd/node_modules/react-resizable/build/Resizable.js",
29252
- "name": "./node_modules/react-resizable/build/Resizable.js"
29250
+ "id": 85,
29251
+ "identifier": "/Users/wangxiaofei/git/tntd/node_modules/react-resizable/build/ResizableBox.js",
29252
+ "name": "./node_modules/react-resizable/build/ResizableBox.js"
29253
29253
  }
29254
29254
  ],
29255
29255
  "failed": false,
@@ -34214,7 +34214,7 @@
34214
34214
  "name": "./components/index.js + 88 modules",
34215
34215
  "index": 0,
34216
34216
  "index2": 187,
34217
- "size": 398580,
34217
+ "size": 398722,
34218
34218
  "cacheable": true,
34219
34219
  "built": true,
34220
34220
  "optional": false,
@@ -34660,7 +34660,7 @@
34660
34660
  "moduleName": "./components/Layout/HeaderTabs.js",
34661
34661
  "type": "harmony import specifier",
34662
34662
  "userRequest": "../Icon",
34663
- "loc": "248:61-65"
34663
+ "loc": "252:95-99"
34664
34664
  },
34665
34665
  {
34666
34666
  "moduleId": null,
@@ -34669,7 +34669,7 @@
34669
34669
  "moduleName": "./components/Layout/HeaderTabs.js",
34670
34670
  "type": "harmony import specifier",
34671
34671
  "userRequest": "../Icon",
34672
- "loc": "254:25-29"
34672
+ "loc": "258:25-29"
34673
34673
  },
34674
34674
  {
34675
34675
  "moduleId": null,
@@ -34678,7 +34678,7 @@
34678
34678
  "moduleName": "./components/Layout/HeaderTabs.js",
34679
34679
  "type": "harmony import specifier",
34680
34680
  "userRequest": "../Icon",
34681
- "loc": "258:26-30"
34681
+ "loc": "262:26-30"
34682
34682
  }
34683
34683
  ],
34684
34684
  "usedExports": [
@@ -37215,7 +37215,7 @@
37215
37215
  "name": "./components/Layout/HeaderTabs.js",
37216
37216
  "index": 108,
37217
37217
  "index2": 106,
37218
- "size": 16138,
37218
+ "size": 16280,
37219
37219
  "cacheable": true,
37220
37220
  "built": true,
37221
37221
  "optional": false,
@@ -37269,7 +37269,7 @@
37269
37269
  ],
37270
37270
  "optimizationBailout": [],
37271
37271
  "depth": 2,
37272
- "source": "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _templateObject3() {\n var data = _taggedTemplateLiteral([\"\\n position: relative;\\n margin: 0;\\n padding: 0 20px 0 10px;\\n cursor: pointer;\\n display: inline-block;\\n line-height: \", \";\\n /* transition: background-color .5; */\\n width: 130px;\\n color: rgba(255,255,255,.6);\\n\\n .tnt-icon[type=close] {\\n display: none;\\n position: absolute;\\n right: 0;\\n top: 0;\\n font-size: 10px;\\n padding: 0 10px;\\n cursor: pointer;\\n z-index: 1;\\n }\\n\\n &:not(:last-child):after {\\n position: absolute;\\n content: \\\"\\\";\\n right: 0;\\n top: 6px;\\n height: 24px;\\n width: 1px;\\n // opacity: .5;\\n // background: #fff;\\n background: #E1E6EE;\\n opacity: .5;\\n // .tnt-themeS1 & {\\n // background: #E1E6EE;\\n // opacity: 1;\\n // }\\n }\\n\\n &.active,\\n &.activeTabPreSibling {\\n &:after {\\n display: none;\\n }\\n }\\n\\n a {\\n font-size: 14px;\\n color: \", \";//rgba(255,255,255,.6);\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n transition: none;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n display: inline-block;\\n line-height: 36px;\\n width: 100%;\\n // &:hover {\\n // color: rgba(255,255,255,.8);\\n // }\\n // .tnt-themeS1 & {\\n // color: \", \";\\n // }\\n }\\n\\n &:hover,\\n &.active {\\n .tnt-icon[type=close] {\\n display: unset;\\n color: #455064;\\n // .tnt-themeS1 & {\\n // color: #455064;\\n // }\\n }\\n }\\n\\n &.active {\\n background: #F1F2F5;\\n border-radius: 2px 2px 0 0;\\n color: \", \";\\n font-weight: 600;\\n\\n a {\\n color: \", \";\\n }\\n }\\n\"]);\n\n _templateObject3 = function _templateObject3() {\n return data;\n };\n\n return data;\n}\n\nfunction _templateObject2() {\n var data = _taggedTemplateLiteral([\"\\n margin: 14px 0 0;\\n padding: 0;\\n list-style: none;\\n text-align: left;\\n height: 36px;\\n line-height: 36px;\\n flex: 1;\\n white-space: nowrap;\\n padding-right: 40px;\\n transition: transform .25s linear;\\n position:absolute;\\n\"]);\n\n _templateObject2 = function _templateObject2() {\n return data;\n };\n\n return data;\n}\n\nfunction _templateObject() {\n var data = _taggedTemplateLiteral([\"\\n display: flex;\\n flex: 1;\\n overflow: hidden;\\n position: relative;\\n margin-right: 12px;\\n margin-left: 4px;\\n\\n .tnt-layout-header-tabs-arrows {\\n position: absolute;\\n right: 0;\\n bottom: 0;\\n font-size: 16px;\\n line-height: 36px;\\n height: 36px;\\n background: #fff !important;\\n color: rgba(255,255,255,.8) !important;\\n .tnt-icon {\\n cursor: pointer;\\n color: rgba(139,145,158,1);\\n &[disabled] {\\n color: rgba(139, 145, 158, .5);\\n pointer-events: none;\\n cursor: not-allowed;\\n }\\n }\\n // background: #191D29;\\n // .tnt-icon {\\n // cursor: pointer;\\n // &[disabled] {\\n // color: rgba(139, 145, 158, .5);\\n // pointer-events: none;\\n // cursor: not-allowed;\\n // }\\n // }\\n // .tnt-themeS1 & {\\n // background: #fff;\\n // .tnt-icon {\\n // color: rgba(139,145,158,1);\\n // }\\n // }\\n // \\u591A\\u7B7E\\u9875\\u7684\\u7BAD\\u5934\\u6837\\u5F0F\\n // .tnt-themeS3 & {\\n // background: \", \"; //#1D4295;\\n // .tnt-icon {\\n // color: rgba(255, 255, 255, .5);\\n // &[disabled] {\\n // color: rgba(139, 145, 158, .5);\\n // pointer-events: none;\\n // cursor: not-allowed;\\n // }\\n // }\\n // }\\n }\\n\"]);\n\n _templateObject = function _templateObject() {\n return data;\n };\n\n return data;\n}\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport { useState, useEffect, useRef } from 'react';\nimport styled, { withTheme } from 'styled-components';\nimport cn from 'classnames';\nimport { get } from 'lodash';\nimport Icon from '../Icon';\nvar TabsContainer = styled.div(_templateObject(), function (props) {\n return \"\".concat(props.theme.blueBgColor);\n});\nvar Tabs = styled.ul(_templateObject2());\nvar TabItem = styled.li(_templateObject3(), function (props) {\n return props.theme.size === 'large' ? '46px' : '36px';\n}, function (props) {\n return props.theme.headerActionsColor;\n}, function (props) {\n return props.theme.headerActionsColor;\n}, function (props) {\n return props.theme.primaryTextColor;\n}, function (props) {\n return props.theme.primaryTextColor;\n});\nexport var HeaderTabs = withTheme(function (_ref) {\n var theme = _ref.theme,\n className = _ref.className,\n _ref$tabs = _ref.tabs,\n tabs = _ref$tabs === void 0 ? [] : _ref$tabs,\n onTabChange = _ref.onTabChange,\n onTabSelect = _ref.onTabSelect,\n onTabClose = _ref.onTabClose,\n appListVisible = _ref.appListVisible,\n orgListVisible = _ref.orgListVisible,\n orgAppListVisible = _ref.orgAppListVisible,\n props = _objectWithoutProperties(_ref, [\"theme\", \"className\", \"tabs\", \"onTabChange\", \"onTabSelect\", \"onTabClose\", \"appListVisible\", \"orgListVisible\", \"orgAppListVisible\"]);\n\n var _useState = useState(props.selectedKey || get(tabs, '0.key')),\n _useState2 = _slicedToArray(_useState, 2),\n selectedKey = _useState2[0],\n setSelectedKey = _useState2[1];\n\n var _useState3 = useState(tabs || []),\n _useState4 = _slicedToArray(_useState3, 2),\n tabItems = _useState4[0],\n setTabItems = _useState4[1];\n\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n arrowVisible = _useState6[0],\n setArrowVisible = _useState6[1];\n\n var _useState7 = useState({\n start: true,\n end: true\n }),\n _useState8 = _slicedToArray(_useState7, 2),\n tabsPositionFlags = _useState8[0],\n setTabsPositionFlags = _useState8[1];\n\n var tabsRef = useRef();\n\n var getTabsDom = function getTabsDom() {\n return tabsRef.current;\n };\n\n var onTabClick = function onTabClick(tab, index) {\n setSelectedKey(tab.key);\n onTabSelect == null ? void 0 : onTabSelect(tab);\n\n if (selectedKey !== tab.key) {\n onTabChange == null ? void 0 : onTabChange(tab);\n }\n };\n\n var closeTabHandle = function closeTabHandle(tab, index, evt) {\n evt.stopPropagation();\n var newTabItems = tabItems.filter(function (_ref2) {\n var key = _ref2.key;\n return key !== tab.key;\n });\n var newSelectedKey = selectedKey;\n setTabItems(newTabItems);\n\n if (tab.key === selectedKey) {\n var _newTabItems$, _newTabItems;\n\n newSelectedKey = index === 0 ? (_newTabItems$ = newTabItems[0]) == null ? void 0 : _newTabItems$.key : (_newTabItems = newTabItems[index - 1]) == null ? void 0 : _newTabItems.key;\n setSelectedKey(newSelectedKey);\n }\n\n onTabClose == null ? void 0 : onTabClose(tab, newTabItems, newTabItems.find(function (_ref3) {\n var key = _ref3.key;\n return key === newSelectedKey;\n }));\n };\n\n var onMoveToLeft = function onMoveToLeft() {\n var tabsDom = getTabsDom();\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 32;\n var x = Math.abs(+tabsDom.style.transform.replace(/[^\\d.-]/g, ''));\n var index = Math.ceil(x / 130);\n var trueX = index * 130;\n var newX = Math.min(0, -(trueX - parentWidth));\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n var width = tabItems.length * 130;\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n var onMoveToRight = function onMoveToRight() {\n var tabsDom = getTabsDom();\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 32;\n var width = tabItems.length * 130;\n var x = Math.abs(+tabsDom.style.transform.replace(/[^\\d.-]/g, ''));\n var index = Math.floor(x / 130);\n var trueX = index * 130;\n var newX = Math.max(-(width - parentWidth), -(trueX + parentWidth));\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n var translateTabsDom = function translateTabsDom(tabs, selectedKey) {\n if (!selectedKey) return;\n var index = tabs.indexOf(tabs.find(function (_ref4) {\n var key = _ref4.key;\n return key === selectedKey;\n }));\n if (index === -1) return;\n var tabsDom = getTabsDom();\n var x = -+tabsDom.style.transform.replace(/[^\\d.-]/g, '');\n var bbox = {\n left: index * 130,\n right: (index + 1) * 130\n };\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 36;\n var width = tabItems.length * 130;\n var tailX = x + parentWidth; //当前滑动窗口尾部坐标\n\n var newX = -x;\n\n if (bbox.left < x) {\n newX = -bbox.left;\n } else if (bbox.right >= tailX) {\n newX = parentWidth - bbox.right;\n }\n\n if (newX + width < parentWidth) {\n newX = -(width - parentWidth);\n }\n\n newX = Math.min(0, newX);\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n useEffect(function () {\n setSelectedKey(props.selectedKey || get(tabs, '0.key')); // const t = [{'code':'tagdata','enName':'tagdata','icon':'layer-color','menuName':'打标数据管理打标数据管理打标数据管理','path':'/orion/tag/datalist','key':'tagdata','name':'打标数据管理打标数据管理打标数据管理'},{'code':'taglist','enName':'taglist','icon':'home','menuName':'标签管理','path':'http://baidu.com/orion/tag/list','key':'taglist','name':'标签管理'},{'code':'relation1','enName':'dadicasesearch1','icon':'home','menuName':'案件检索1','path':'/orion/case/relation1','key':'relation1','name':'案件检索1'},{'code':'dadicasesearch-0','enName':'dadicasesearch','icon':'home','menuName':'案件检索-0','path':'/orion/case/relation0','key':'dadicasesearch-0','name':'案件检索-0'},{'code':'dadicasesearch-1','enName':'dadicasesearch','icon':'home','menuName':'案件检索-1','path':'/orion/case/relation1','key':'dadicasesearch-1','name':'案件检索-1'},{'code':'dadicasesearch-2','enName':'dadicasesearch','icon':'home','menuName':'案件检索-2','path':'/orion/case/relation2','key':'dadicasesearch-2','name':'案件检索-2'},{'code':'dadicasesearch-3','enName':'dadicasesearch','icon':'home','menuName':'案件检索-3','path':'/orion/case/relation3','key':'dadicasesearch-3','name':'案件检索-3'},{'code':'dadicasesearch-4','enName':'dadicasesearch','icon':'home','menuName':'案件检索-4','path':'/orion/case/relation4','key':'dadicasesearch-4','name':'案件检索-4'},{'code':'dadicasesearch-5','enName':'dadicasesearch','icon':'home','menuName':'案件检索-5','path':'/orion/case/relation5','key':'dadicasesearch-5','name':'案件检索-5'},{'code':'dadicasesearch-6','enName':'dadicasesearch','icon':'home','menuName':'案件检索-6','path':'/orion/case/relation6','key':'dadicasesearch-6','name':'案件检索-6'},{'code':'dadicasesearch-7','enName':'dadicasesearch','icon':'home','menuName':'案件检索-7','path':'/orion/case/relation7','key':'dadicasesearch-7','name':'案件检索-7'},{'code':'dadicasesearch-8','enName':'dadicasesearch','icon':'home','menuName':'案件检索-8','path':'/orion/case/relation8','key':'dadicasesearch-8','name':'案件检索-8'}] ;\n\n setTabItems(tabs);\n }, [tabs, props.selectedKey]);\n useEffect(function () {}, [props.orgAppListVisible]);\n useEffect(function () {\n var tabsDom = getTabsDom();\n setArrowVisible(tabsDom.offsetWidth - tabsDom.parentNode.offsetWidth > 0);\n }, [tabItems]);\n useEffect(function () {\n translateTabsDom(tabItems, selectedKey);\n }, [tabItems, selectedKey, appListVisible, orgListVisible, orgAppListVisible]);\n return React.createElement(TabsContainer, _extends({}, props, {\n className: cn('tnt-layout-header-tabs', _defineProperty({}, className, className))\n }), React.createElement(Tabs, {\n className: \"tnt-layout-header-tabs-content\",\n ref: tabsRef\n }, tabItems.map(function (tab, index) {\n var _tabItems;\n\n return React.createElement(TabItem, {\n key: tab.key,\n theme: theme,\n className: cn({\n active: selectedKey === tab.key,\n activeTabPreSibling: ((_tabItems = tabItems[index + 1]) == null ? void 0 : _tabItems.key) === selectedKey\n }),\n onClick: function onClick() {\n return onTabClick(tab, index);\n }\n }, React.createElement(\"a\", {\n href: tab.key,\n onClick: function onClick(evt) {\n return evt.preventDefault();\n }\n }, tab.name), tabItems.length > 1 && React.createElement(Icon, {\n type: \"close\",\n onClick: closeTabHandle.bind(null, tab, index)\n }));\n })), arrowVisible && React.createElement(\"div\", {\n className: \"tnt-layout-header-tabs-arrows\"\n }, React.createElement(Icon, {\n type: \"left\",\n onClick: onMoveToLeft,\n disabled: !tabsPositionFlags.start\n }), React.createElement(Icon, {\n type: \"right\",\n onClick: onMoveToRight,\n disabled: !tabsPositionFlags.end\n })));\n});\nexport default HeaderTabs;"
37272
+ "source": "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _templateObject3() {\n var data = _taggedTemplateLiteral([\"\\n position: relative;\\n margin: 0;\\n padding: 0 20px 0 10px;\\n cursor: pointer;\\n display: inline-block;\\n line-height: \", \";\\n /* transition: background-color .5; */\\n width: 130px;\\n color: rgba(255,255,255,.6);\\n\\n .tnt-icon[type=close] {\\n display: none;\\n position: absolute;\\n right: 0;\\n top: 0;\\n font-size: 10px;\\n padding: 0 10px;\\n cursor: pointer;\\n z-index: 1;\\n }\\n\\n &:not(:last-child):after {\\n position: absolute;\\n content: \\\"\\\";\\n right: 0;\\n top: 6px;\\n height: 24px;\\n width: 1px;\\n // opacity: .5;\\n // background: #fff;\\n background: #E1E6EE;\\n opacity: .5;\\n // .tnt-themeS1 & {\\n // background: #E1E6EE;\\n // opacity: 1;\\n // }\\n }\\n\\n &.active,\\n &.activeTabPreSibling {\\n &:after {\\n display: none;\\n }\\n }\\n\\n a {\\n font-size: 14px;\\n color: \", \";//rgba(255,255,255,.6);\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n transition: none;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n display: inline-block;\\n line-height: 36px;\\n width: 100%;\\n // &:hover {\\n // color: rgba(255,255,255,.8);\\n // }\\n // .tnt-themeS1 & {\\n // color: \", \";\\n // }\\n }\\n\\n &:hover,\\n &.active {\\n .tnt-icon[type=close] {\\n display: unset;\\n color: #455064;\\n // .tnt-themeS1 & {\\n // color: #455064;\\n // }\\n }\\n }\\n\\n &.active {\\n background: #F1F2F5;\\n border-radius: 2px 2px 0 0;\\n color: \", \";\\n font-weight: 600;\\n\\n a {\\n color: \", \";\\n }\\n }\\n\"]);\n\n _templateObject3 = function _templateObject3() {\n return data;\n };\n\n return data;\n}\n\nfunction _templateObject2() {\n var data = _taggedTemplateLiteral([\"\\n margin: 14px 0 0;\\n padding: 0;\\n list-style: none;\\n text-align: left;\\n height: 36px;\\n line-height: 36px;\\n flex: 1;\\n white-space: nowrap;\\n padding-right: 40px;\\n transition: transform 0.25s linear;\\n position: absolute;\\n\"]);\n\n _templateObject2 = function _templateObject2() {\n return data;\n };\n\n return data;\n}\n\nfunction _templateObject() {\n var data = _taggedTemplateLiteral([\"\\n display: flex;\\n flex: 1;\\n overflow: hidden;\\n position: relative;\\n margin-right: 12px;\\n margin-left: 4px;\\n\\n .tnt-layout-header-tabs-arrows {\\n position: absolute;\\n right: 0;\\n bottom: 0;\\n font-size: 16px;\\n line-height: 36px;\\n height: 36px;\\n background: #fff !important;\\n color: rgba(255,255,255,.8) !important;\\n .tnt-icon {\\n cursor: pointer;\\n color: rgba(139,145,158,1);\\n &[disabled] {\\n color: rgba(139, 145, 158, .5);\\n pointer-events: none;\\n cursor: not-allowed;\\n }\\n }\\n // background: #191D29;\\n // .tnt-icon {\\n // cursor: pointer;\\n // &[disabled] {\\n // color: rgba(139, 145, 158, .5);\\n // pointer-events: none;\\n // cursor: not-allowed;\\n // }\\n // }\\n // .tnt-themeS1 & {\\n // background: #fff;\\n // .tnt-icon {\\n // color: rgba(139,145,158,1);\\n // }\\n // }\\n // \\u591A\\u7B7E\\u9875\\u7684\\u7BAD\\u5934\\u6837\\u5F0F\\n // .tnt-themeS3 & {\\n // background: \", \"; //#1D4295;\\n // .tnt-icon {\\n // color: rgba(255, 255, 255, .5);\\n // &[disabled] {\\n // color: rgba(139, 145, 158, .5);\\n // pointer-events: none;\\n // cursor: not-allowed;\\n // }\\n // }\\n // }\\n }\\n\"]);\n\n _templateObject = function _templateObject() {\n return data;\n };\n\n return data;\n}\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nimport { useState, useEffect, useRef } from \"react\";\nimport styled, { withTheme } from \"styled-components\";\nimport cn from \"classnames\";\nimport { get } from \"lodash\";\nimport Icon from \"../Icon\";\nvar TabsContainer = styled.div(_templateObject(), function (props) {\n return \"\".concat(props.theme.blueBgColor);\n});\nvar Tabs = styled.ul(_templateObject2());\nvar TabItem = styled.li(_templateObject3(), function (props) {\n return props.theme.size === \"large\" ? \"46px\" : \"36px\";\n}, function (props) {\n return props.theme.headerActionsColor;\n}, function (props) {\n return props.theme.headerActionsColor;\n}, function (props) {\n return props.theme.primaryTextColor;\n}, function (props) {\n return props.theme.primaryTextColor;\n});\nexport var HeaderTabs = withTheme(function (_ref) {\n var theme = _ref.theme,\n className = _ref.className,\n _ref$tabs = _ref.tabs,\n tabs = _ref$tabs === void 0 ? [] : _ref$tabs,\n onTabChange = _ref.onTabChange,\n onTabSelect = _ref.onTabSelect,\n onTabClose = _ref.onTabClose,\n appListVisible = _ref.appListVisible,\n orgListVisible = _ref.orgListVisible,\n orgAppListVisible = _ref.orgAppListVisible,\n language = _ref.language,\n props = _objectWithoutProperties(_ref, [\"theme\", \"className\", \"tabs\", \"onTabChange\", \"onTabSelect\", \"onTabClose\", \"appListVisible\", \"orgListVisible\", \"orgAppListVisible\", \"language\"]);\n\n var _useState = useState(props.selectedKey || get(tabs, \"0.key\")),\n _useState2 = _slicedToArray(_useState, 2),\n selectedKey = _useState2[0],\n setSelectedKey = _useState2[1];\n\n var _useState3 = useState(tabs || []),\n _useState4 = _slicedToArray(_useState3, 2),\n tabItems = _useState4[0],\n setTabItems = _useState4[1];\n\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n arrowVisible = _useState6[0],\n setArrowVisible = _useState6[1];\n\n var _useState7 = useState({\n start: true,\n end: true\n }),\n _useState8 = _slicedToArray(_useState7, 2),\n tabsPositionFlags = _useState8[0],\n setTabsPositionFlags = _useState8[1];\n\n var tabsRef = useRef();\n\n var getTabsDom = function getTabsDom() {\n return tabsRef.current;\n };\n\n var onTabClick = function onTabClick(tab, index) {\n setSelectedKey(tab.key);\n onTabSelect == null ? void 0 : onTabSelect(tab);\n\n if (selectedKey !== tab.key) {\n onTabChange == null ? void 0 : onTabChange(tab);\n }\n };\n\n var closeTabHandle = function closeTabHandle(tab, index, evt) {\n evt.stopPropagation();\n var newTabItems = tabItems.filter(function (_ref2) {\n var key = _ref2.key;\n return key !== tab.key;\n });\n var newSelectedKey = selectedKey;\n setTabItems(newTabItems);\n\n if (tab.key === selectedKey) {\n var _newTabItems$, _newTabItems;\n\n newSelectedKey = index === 0 ? (_newTabItems$ = newTabItems[0]) == null ? void 0 : _newTabItems$.key : (_newTabItems = newTabItems[index - 1]) == null ? void 0 : _newTabItems.key;\n setSelectedKey(newSelectedKey);\n }\n\n onTabClose == null ? void 0 : onTabClose(tab, newTabItems, newTabItems.find(function (_ref3) {\n var key = _ref3.key;\n return key === newSelectedKey;\n }));\n };\n\n var onMoveToLeft = function onMoveToLeft() {\n var tabsDom = getTabsDom();\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 32;\n var x = Math.abs(+tabsDom.style.transform.replace(/[^\\d.-]/g, \"\"));\n var index = Math.ceil(x / 130);\n var trueX = index * 130;\n var newX = Math.min(0, -(trueX - parentWidth));\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n var width = tabItems.length * 130;\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n var onMoveToRight = function onMoveToRight() {\n var tabsDom = getTabsDom();\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 32;\n var width = tabItems.length * 130;\n var x = Math.abs(+tabsDom.style.transform.replace(/[^\\d.-]/g, \"\"));\n var index = Math.floor(x / 130);\n var trueX = index * 130;\n var newX = Math.max(-(width - parentWidth), -(trueX + parentWidth));\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n var translateTabsDom = function translateTabsDom(tabs, selectedKey) {\n if (!selectedKey) return;\n var index = tabs.indexOf(tabs.find(function (_ref4) {\n var key = _ref4.key;\n return key === selectedKey;\n }));\n if (index === -1) return;\n var tabsDom = getTabsDom();\n var x = -+tabsDom.style.transform.replace(/[^\\d.-]/g, \"\");\n var bbox = {\n left: index * 130,\n right: (index + 1) * 130\n };\n var parentBBox = tabsDom.parentNode.getBoundingClientRect();\n var parentWidth = parentBBox.width - 36;\n var width = tabItems.length * 130;\n var tailX = x + parentWidth; //当前滑动窗口尾部坐标\n\n var newX = -x;\n\n if (bbox.left < x) {\n newX = -bbox.left;\n } else if (bbox.right >= tailX) {\n newX = parentWidth - bbox.right;\n }\n\n if (newX + width < parentWidth) {\n newX = -(width - parentWidth);\n }\n\n newX = Math.min(0, newX);\n tabsDom.style.transform = \"translateX(\".concat(newX, \"px)\");\n setTabsPositionFlags({\n start: newX < 0,\n end: Math.abs(newX) < width - parentWidth\n });\n };\n\n useEffect(function () {\n setSelectedKey(props.selectedKey || get(tabs, \"0.key\")); // const t = [{'code':'tagdata','enName':'tagdata','icon':'layer-color','menuName':'打标数据管理打标数据管理打标数据管理','path':'/orion/tag/datalist','key':'tagdata','name':'打标数据管理打标数据管理打标数据管理'},{'code':'taglist','enName':'taglist','icon':'home','menuName':'标签管理','path':'http://baidu.com/orion/tag/list','key':'taglist','name':'标签管理'},{'code':'relation1','enName':'dadicasesearch1','icon':'home','menuName':'案件检索1','path':'/orion/case/relation1','key':'relation1','name':'案件检索1'},{'code':'dadicasesearch-0','enName':'dadicasesearch','icon':'home','menuName':'案件检索-0','path':'/orion/case/relation0','key':'dadicasesearch-0','name':'案件检索-0'},{'code':'dadicasesearch-1','enName':'dadicasesearch','icon':'home','menuName':'案件检索-1','path':'/orion/case/relation1','key':'dadicasesearch-1','name':'案件检索-1'},{'code':'dadicasesearch-2','enName':'dadicasesearch','icon':'home','menuName':'案件检索-2','path':'/orion/case/relation2','key':'dadicasesearch-2','name':'案件检索-2'},{'code':'dadicasesearch-3','enName':'dadicasesearch','icon':'home','menuName':'案件检索-3','path':'/orion/case/relation3','key':'dadicasesearch-3','name':'案件检索-3'},{'code':'dadicasesearch-4','enName':'dadicasesearch','icon':'home','menuName':'案件检索-4','path':'/orion/case/relation4','key':'dadicasesearch-4','name':'案件检索-4'},{'code':'dadicasesearch-5','enName':'dadicasesearch','icon':'home','menuName':'案件检索-5','path':'/orion/case/relation5','key':'dadicasesearch-5','name':'案件检索-5'},{'code':'dadicasesearch-6','enName':'dadicasesearch','icon':'home','menuName':'案件检索-6','path':'/orion/case/relation6','key':'dadicasesearch-6','name':'案件检索-6'},{'code':'dadicasesearch-7','enName':'dadicasesearch','icon':'home','menuName':'案件检索-7','path':'/orion/case/relation7','key':'dadicasesearch-7','name':'案件检索-7'},{'code':'dadicasesearch-8','enName':'dadicasesearch','icon':'home','menuName':'案件检索-8','path':'/orion/case/relation8','key':'dadicasesearch-8','name':'案件检索-8'}] ;\n\n setTabItems(tabs);\n }, [tabs, props.selectedKey]);\n useEffect(function () {}, [props.orgAppListVisible]);\n useEffect(function () {\n var tabsDom = getTabsDom();\n setArrowVisible(tabsDom.offsetWidth - tabsDom.parentNode.offsetWidth > 0);\n }, [tabItems]);\n useEffect(function () {\n translateTabsDom(tabItems, selectedKey);\n }, [tabItems, selectedKey, appListVisible, orgListVisible, orgAppListVisible]);\n return React.createElement(TabsContainer, _extends({}, props, {\n className: cn(\"tnt-layout-header-tabs\", _defineProperty({}, className, className))\n }), React.createElement(Tabs, {\n className: \"tnt-layout-header-tabs-content\",\n ref: tabsRef\n }, tabItems.map(function (tab, index) {\n var _tabItems;\n\n return React.createElement(TabItem, {\n key: tab.key,\n theme: theme,\n className: cn({\n active: selectedKey === tab.key,\n activeTabPreSibling: ((_tabItems = tabItems[index + 1]) == null ? void 0 : _tabItems.key) === selectedKey\n }),\n onClick: function onClick() {\n return onTabClick(tab, index);\n }\n }, React.createElement(\"a\", {\n href: tab.key,\n onClick: function onClick(evt) {\n return evt.preventDefault();\n }\n }, {\n cn: tab.name,\n en: tab.enName || tab.name\n }[language || \"cn\"]), tab.closable !== false && tabItems.length > 1 && React.createElement(Icon, {\n type: \"close\",\n onClick: closeTabHandle.bind(null, tab, index)\n }));\n })), arrowVisible && React.createElement(\"div\", {\n className: \"tnt-layout-header-tabs-arrows\"\n }, React.createElement(Icon, {\n type: \"left\",\n onClick: onMoveToLeft,\n disabled: !tabsPositionFlags.start\n }), React.createElement(Icon, {\n type: \"right\",\n onClick: onMoveToRight,\n disabled: !tabsPositionFlags.end\n })));\n});\nexport default HeaderTabs;"
37273
37273
  },
37274
37274
  {
37275
37275
  "id": null,
@@ -42224,7 +42224,7 @@
42224
42224
  "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./components/DevelopmentLogin/index.js (referenced with import())"
42225
42225
  ],
42226
42226
  "depth": 2,
42227
- "source": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useState } from 'react';\nimport { Modal, Input, Form, message } from 'antd';\nimport Cookies from 'universal-cookie';\nvar cookies = new Cookies(); // 默认\n\nvar accountInfoDefault = {\n account: 'admin',\n password: 'Td@123456'\n};\nexport default (function (_ref) {\n var visible = _ref.visible,\n close = _ref.close,\n signIn = _ref.signIn;\n\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n confirmLoading = _useState2[0],\n setConfirmLoading = _useState2[1]; // 如果storage中已存在,则取storage\n\n\n var storageAccountInfo = localStorage.getItem('accountInfo');\n\n if (storageAccountInfo) {\n try {\n accountInfoDefault = JSON.parse(storageAccountInfo);\n } catch (e) {}\n }\n\n var _useState3 = useState(accountInfoDefault),\n _useState4 = _slicedToArray(_useState3, 2),\n accountInfo = _useState4[0],\n setAccountInfo = _useState4[1];\n\n var account = accountInfo.account,\n password = accountInfo.password;\n\n var onSubmit = function onSubmit() {\n setConfirmLoading(true);\n var returnVal = signIn && signIn(accountInfo);\n\n if (returnVal && returnVal.then) {\n returnVal.then(function (res) {\n message.success('模拟登陆成功');\n localStorage.setItem('accountInfo', JSON.stringify(accountInfo));\n setConfirmLoading(false);\n setTimeout(function () {\n var _ref2 = res || {},\n token = _ref2.tdToken,\n userId = _ref2.userId;\n\n cookies.set('_td_token_', token, {\n path: '/'\n });\n cookies.set('_uid_', userId, {\n path: '/'\n });\n close();\n }, 500);\n })[\"catch\"](function (err) {\n setConfirmLoading(false);\n throw err;\n });\n }\n };\n\n var changeFieldValue = function changeFieldValue(key, evt) {\n setAccountInfo(_objectSpread({}, accountInfo, _defineProperty({}, key, evt.target.value)));\n };\n\n return React.createElement(Modal, {\n title: \"\\u5F00\\u53D1\\u8005\\u6A21\\u62DF\\u767B\\u9646\",\n visible: visible,\n maskClosable: false,\n onOk: onSubmit,\n onCancel: close,\n confirmLoading: confirmLoading\n }, React.createElement(Form, {\n labelCol: {\n span: 5\n },\n wrapperCol: {\n span: 18\n }\n }, React.createElement(Form.Item, {\n label: \"\\u7528\\u6237\\u540D\\uFF1A\"\n }, React.createElement(Input, {\n type: \"text\",\n placeholder: \"\\u8BF7\\u8F93\\u5165\\u7528\\u6237\\u540D\",\n value: account || undefined,\n onChange: function onChange(evt) {\n return changeFieldValue('account', evt);\n }\n })), React.createElement(Form.Item, {\n label: \"\\u5BC6\\u7801\\uFF1A\"\n }, React.createElement(Input, {\n type: \"text\",\n placeholder: \"\\u8BF7\\u8F93\\u5165\\u7528\\u6237\\u540D\",\n value: password || undefined,\n onChange: function onChange(evt) {\n return changeFieldValue('password', evt);\n }\n }))));\n});"
42227
+ "source": "function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useState } from 'react';\nimport { Modal, Input, Form, message } from 'antd';\nimport Cookies from 'universal-cookie';\nvar cookies = new Cookies(); // 默认\n\nvar accountInfoDefault = {\n account: undefined,\n password: undefined\n};\nexport default (function (_ref) {\n var visible = _ref.visible,\n close = _ref.close,\n signIn = _ref.signIn;\n\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n confirmLoading = _useState2[0],\n setConfirmLoading = _useState2[1]; // 如果storage中已存在,则取storage\n\n\n var storageAccountInfo = localStorage.getItem('accountInfo');\n\n if (storageAccountInfo) {\n try {\n accountInfoDefault = JSON.parse(storageAccountInfo);\n } catch (e) {}\n }\n\n var _useState3 = useState(accountInfoDefault),\n _useState4 = _slicedToArray(_useState3, 2),\n accountInfo = _useState4[0],\n setAccountInfo = _useState4[1];\n\n var account = accountInfo.account,\n password = accountInfo.password;\n\n var onSubmit = function onSubmit() {\n setConfirmLoading(true);\n var returnVal = signIn && signIn(accountInfo);\n\n if (returnVal && returnVal.then) {\n returnVal.then(function (res) {\n message.success('模拟登陆成功');\n localStorage.setItem('accountInfo', JSON.stringify(accountInfo));\n setConfirmLoading(false);\n setTimeout(function () {\n var _ref2 = res || {},\n token = _ref2.tdToken,\n userId = _ref2.userId;\n\n cookies.set('_td_token_', token, {\n path: '/'\n });\n cookies.set('_uid_', userId, {\n path: '/'\n });\n close();\n }, 500);\n })[\"catch\"](function (err) {\n setConfirmLoading(false);\n throw err;\n });\n }\n };\n\n var changeFieldValue = function changeFieldValue(key, evt) {\n setAccountInfo(_objectSpread({}, accountInfo, _defineProperty({}, key, evt.target.value)));\n };\n\n return React.createElement(Modal, {\n title: \"\\u5F00\\u53D1\\u8005\\u6A21\\u62DF\\u767B\\u9646\",\n visible: visible,\n maskClosable: false,\n onOk: onSubmit,\n onCancel: close,\n confirmLoading: confirmLoading\n }, React.createElement(Form, {\n labelCol: {\n span: 5\n },\n wrapperCol: {\n span: 18\n }\n }, React.createElement(Form.Item, {\n label: \"\\u7528\\u6237\\u540D\\uFF1A\"\n }, React.createElement(Input, {\n type: \"text\",\n placeholder: \"\\u8BF7\\u8F93\\u5165\\u7528\\u6237\\u540D\",\n value: account || undefined,\n onChange: function onChange(evt) {\n return changeFieldValue('account', evt);\n }\n })), React.createElement(Form.Item, {\n label: \"\\u5BC6\\u7801\\uFF1A\"\n }, React.createElement(Input, {\n type: \"text\",\n placeholder: \"\\u8BF7\\u8F93\\u5165\\u7528\\u6237\\u540D\",\n value: password || undefined,\n onChange: function onChange(evt) {\n return changeFieldValue('password', evt);\n }\n }))));\n});"
42228
42228
  },
42229
42229
  {
42230
42230
  "id": null,