eoss-ui 0.8.4 → 0.8.5

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 (271) hide show
  1. package/lib/button-group.js +46 -45
  2. package/lib/button.js +46 -45
  3. package/lib/calogin.js +322 -290
  4. package/lib/checkbox-group.js +46 -45
  5. package/lib/data-table-form.js +46 -45
  6. package/lib/data-table.js +46 -45
  7. package/lib/date-picker.js +46 -45
  8. package/lib/dialog.js +46 -45
  9. package/lib/eoss-ui.common.js +997 -954
  10. package/lib/flow-group.js +46 -45
  11. package/lib/flow-list.js +46 -45
  12. package/lib/flow.js +403 -388
  13. package/lib/form.js +46 -45
  14. package/lib/handle-user.js +46 -45
  15. package/lib/handler.js +46 -45
  16. package/lib/icon.js +46 -45
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +46 -45
  19. package/lib/input.js +46 -45
  20. package/lib/login.js +46 -45
  21. package/lib/main.js +346 -344
  22. package/lib/nav.js +46 -45
  23. package/lib/page.js +46 -45
  24. package/lib/pagination.js +46 -45
  25. package/lib/player.js +46 -45
  26. package/lib/qr-code.js +59 -58
  27. package/lib/radio-group.js +46 -45
  28. package/lib/retrial-auth.js +46 -45
  29. package/lib/select-ganged.js +46 -45
  30. package/lib/select.js +46 -45
  31. package/lib/selector-panel.js +46 -45
  32. package/lib/selector.js +46 -45
  33. package/lib/sizer.js +46 -45
  34. package/lib/steps.js +46 -45
  35. package/lib/switch.js +46 -45
  36. package/lib/table-form.js +46 -45
  37. package/lib/tabs.js +46 -45
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/theme-chalk/login.css +1 -1
  40. package/lib/tips.js +46 -45
  41. package/lib/tree-group.js +46 -45
  42. package/lib/tree.js +46 -45
  43. package/lib/upload.js +46 -45
  44. package/lib/utils/util.js +46 -45
  45. package/lib/wujie.js +46 -45
  46. package/lib/wxlogin.js +46 -45
  47. package/package.json +1 -1
  48. package/packages/button/index.js +5 -5
  49. package/packages/button/src/main.vue +418 -418
  50. package/packages/button-group/index.js +5 -5
  51. package/packages/calendar/index.js +5 -5
  52. package/packages/calogin/index.js +5 -5
  53. package/packages/calogin/src/plugin.js +915 -915
  54. package/packages/card/index.js +5 -5
  55. package/packages/card/src/main.vue +156 -156
  56. package/packages/cascader/index.js +5 -5
  57. package/packages/cascader/src/main.vue +168 -168
  58. package/packages/checkbox-group/index.js +5 -5
  59. package/packages/checkbox-group/src/main.vue +333 -333
  60. package/packages/clients/index.js +5 -5
  61. package/packages/data-table/index.js +5 -5
  62. package/packages/data-table/src/children.vue +46 -46
  63. package/packages/data-table/src/main.vue +1876 -1876
  64. package/packages/data-table/src/sizer.vue +195 -195
  65. package/packages/data-table-form/index.js +5 -5
  66. package/packages/data-table-form/src/checkbox.vue +101 -101
  67. package/packages/data-table-form/src/colgroup.vue +17 -17
  68. package/packages/data-table-form/src/main.vue +181 -181
  69. package/packages/data-table-form/src/radio.vue +65 -65
  70. package/packages/data-table-form/src/table.vue +233 -233
  71. package/packages/data-table-form/src/tbody.vue +336 -336
  72. package/packages/data-table-form/src/thead.vue +68 -68
  73. package/packages/date-picker/index.js +5 -5
  74. package/packages/date-picker/src/main.vue +236 -236
  75. package/packages/dialog/index.js +5 -5
  76. package/packages/enable-drag/index.js +5 -5
  77. package/packages/enterprise/index.js +5 -5
  78. package/packages/enterprise/src/main.vue +66 -66
  79. package/packages/error-page/index.js +5 -5
  80. package/packages/error-page/src/main.vue +44 -44
  81. package/packages/flow/index.js +5 -5
  82. package/packages/flow/src/component/FreeCirculation.vue +245 -245
  83. package/packages/flow/src/component/TimeLimit.vue +190 -190
  84. package/packages/flow/src/main.vue +4165 -4165
  85. package/packages/flow/src/processForm.vue +259 -228
  86. package/packages/flow-group/index.js +5 -5
  87. package/packages/flow-group/src/main.vue +750 -750
  88. package/packages/flow-list/index.js +5 -5
  89. package/packages/form/index.js +5 -5
  90. package/packages/handle-user/index.js +5 -5
  91. package/packages/handle-user/src/main.vue +137 -137
  92. package/packages/handler/index.js +5 -5
  93. package/packages/handler/src/main.vue +499 -499
  94. package/packages/icon/index.js +5 -5
  95. package/packages/icons/index.js +5 -5
  96. package/packages/icons/src/main.vue +81 -81
  97. package/packages/input/index.js +5 -5
  98. package/packages/input/src/main.vue +356 -356
  99. package/packages/input-number/index.js +5 -5
  100. package/packages/input-number/src/main.vue +106 -106
  101. package/packages/label/index.js +5 -5
  102. package/packages/label/src/main.vue +457 -457
  103. package/packages/layout/index.js +5 -5
  104. package/packages/layout/src/item.vue +152 -152
  105. package/packages/layout/src/main.vue +31 -31
  106. package/packages/login/index.js +5 -5
  107. package/packages/login/src/main.vue +2088 -2088
  108. package/packages/main/index.js +5 -5
  109. package/packages/main/src/default/message.vue +249 -249
  110. package/packages/main/src/default/notice.vue +157 -157
  111. package/packages/main/src/default/userinfo.vue +513 -513
  112. package/packages/main/src/main.vue +1 -1
  113. package/packages/main/src/simplicity/index.vue +2335 -2335
  114. package/packages/main/src/simplicity/lists.vue +84 -84
  115. package/packages/main/src/simplicity/router-page.vue +45 -45
  116. package/packages/main/src/simplicity/userinfo.vue +408 -408
  117. package/packages/main/src/simplicityTop/index.vue +2626 -2625
  118. package/packages/main/src/simplicityTop/userinfo.vue +408 -408
  119. package/packages/menu/index.js +5 -5
  120. package/packages/nav/index.js +5 -5
  121. package/packages/notify/index.js +5 -5
  122. package/packages/notify/src/main.vue +538 -538
  123. package/packages/page/index.js +5 -5
  124. package/packages/page/src/main.vue +167 -167
  125. package/packages/pagination/index.js +5 -5
  126. package/packages/pagination/src/main.vue +96 -96
  127. package/packages/player/index.js +5 -5
  128. package/packages/player/src/main.vue +194 -194
  129. package/packages/qr-code/index.js +5 -5
  130. package/packages/qr-code/src/main.vue +170 -170
  131. package/packages/radio-group/index.js +6 -6
  132. package/packages/radio-group/src/main.vue +319 -319
  133. package/packages/retrial-auth/index.js +5 -5
  134. package/packages/retrial-auth/src/main.vue +299 -299
  135. package/packages/select/index.js +5 -5
  136. package/packages/select-ganged/index.js +5 -5
  137. package/packages/select-ganged/src/main.vue +724 -724
  138. package/packages/selector/index.js +5 -5
  139. package/packages/selector-panel/index.js +5 -5
  140. package/packages/selector-panel/src/tree.vue +129 -129
  141. package/packages/sizer/index.js +5 -5
  142. package/packages/sizer/src/main.vue +254 -254
  143. package/packages/steps/index.js +5 -5
  144. package/packages/steps/src/main.vue +181 -181
  145. package/packages/switch/index.js +5 -5
  146. package/packages/table-form/index.js +5 -5
  147. package/packages/tabs/index.js +5 -5
  148. package/packages/tabs/src/main.vue +788 -788
  149. package/packages/tabs-panel/index.js +5 -5
  150. package/packages/tabs-panel/src/main.vue +29 -29
  151. package/packages/theme-chalk/gulpfile.js +25 -0
  152. package/packages/theme-chalk/src/base.scss +261 -261
  153. package/packages/theme-chalk/src/button-group.scss +176 -176
  154. package/packages/theme-chalk/src/button.scss +24 -24
  155. package/packages/theme-chalk/src/calendar.scss +113 -113
  156. package/packages/theme-chalk/src/card.scss +99 -99
  157. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  158. package/packages/theme-chalk/src/clients.scss +87 -87
  159. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  160. package/packages/theme-chalk/src/date-picker.scss +7 -7
  161. package/packages/theme-chalk/src/dialog.scss +77 -77
  162. package/packages/theme-chalk/src/enable-drag.scss +181 -181
  163. package/packages/theme-chalk/src/enterprise.scss +5 -5
  164. package/packages/theme-chalk/src/error-page.scss +18 -18
  165. package/packages/theme-chalk/src/flow-group.scss +110 -110
  166. package/packages/theme-chalk/src/handle-user.scss +40 -40
  167. package/packages/theme-chalk/src/icons.scss +99 -99
  168. package/packages/theme-chalk/src/input.scss +9 -9
  169. package/packages/theme-chalk/src/label.scss +24 -24
  170. package/packages/theme-chalk/src/layout.scss +46 -46
  171. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  172. package/packages/theme-chalk/src/nav.scss +111 -111
  173. package/packages/theme-chalk/src/page.scss +3 -3
  174. package/packages/theme-chalk/src/pagination.scss +29 -29
  175. package/packages/theme-chalk/src/player.scss +9 -9
  176. package/packages/theme-chalk/src/qr-code.scss +17 -17
  177. package/packages/theme-chalk/src/radio-group.scss +9 -9
  178. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  179. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  180. package/packages/theme-chalk/src/select.scss +8 -8
  181. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  182. package/packages/theme-chalk/src/sizer.scss +36 -36
  183. package/packages/theme-chalk/src/steps.scss +88 -88
  184. package/packages/theme-chalk/src/switch.scss +3 -3
  185. package/packages/theme-chalk/src/table-form.scss +1 -1
  186. package/packages/theme-chalk/src/tabs.scss +87 -87
  187. package/packages/theme-chalk/src/tips.scss +7 -7
  188. package/packages/theme-chalk/src/toolbar.scss +179 -179
  189. package/packages/theme-chalk/src/tree-group.scss +72 -72
  190. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  191. package/packages/tips/index.js +5 -5
  192. package/packages/toolbar/index.js +5 -5
  193. package/packages/toolbar/src/main.vue +430 -430
  194. package/packages/tree/index.js +5 -5
  195. package/packages/tree-group/index.js +5 -5
  196. package/packages/upload/index.js +5 -5
  197. package/packages/upload/src/main.vue +1344 -1344
  198. package/packages/upload/src/picture.js +15 -15
  199. package/packages/wujie/index.js +5 -5
  200. package/packages/wxlogin/index.js +5 -5
  201. package/packages/wxlogin/src/main.vue +128 -128
  202. package/src/config/image.js +2 -2
  203. package/src/index.js +1 -1
  204. package/src/utils/bus.js +3 -3
  205. package/src/utils/date-util.js +312 -312
  206. package/src/utils/http.js +50 -50
  207. package/src/utils/store.js +21 -21
  208. package/src/utils/util.js +49 -48
  209. package/src/utils/webSocket.js +107 -107
  210. package/packages/theme-chalk/lib/base.css +0 -1
  211. package/packages/theme-chalk/lib/button-group.css +0 -1
  212. package/packages/theme-chalk/lib/button.css +0 -1
  213. package/packages/theme-chalk/lib/calendar.css +0 -1
  214. package/packages/theme-chalk/lib/calogin.css +0 -0
  215. package/packages/theme-chalk/lib/card.css +0 -1
  216. package/packages/theme-chalk/lib/cascader.css +0 -0
  217. package/packages/theme-chalk/lib/checkbox-group.css +0 -1
  218. package/packages/theme-chalk/lib/clients.css +0 -1
  219. package/packages/theme-chalk/lib/data-table-form.css +0 -1
  220. package/packages/theme-chalk/lib/data-table.css +0 -1
  221. package/packages/theme-chalk/lib/date-picker.css +0 -1
  222. package/packages/theme-chalk/lib/dialog.css +0 -1
  223. package/packages/theme-chalk/lib/enable-drag.css +0 -1
  224. package/packages/theme-chalk/lib/enterprise.css +0 -1
  225. package/packages/theme-chalk/lib/error-page.css +0 -1
  226. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  227. package/packages/theme-chalk/lib/flow-group.css +0 -1
  228. package/packages/theme-chalk/lib/flow-list.css +0 -1
  229. package/packages/theme-chalk/lib/flow.css +0 -1
  230. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  231. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  232. package/packages/theme-chalk/lib/form.css +0 -1
  233. package/packages/theme-chalk/lib/handle-user.css +0 -1
  234. package/packages/theme-chalk/lib/handler.css +0 -1
  235. package/packages/theme-chalk/lib/icon.css +0 -1
  236. package/packages/theme-chalk/lib/icons.css +0 -1
  237. package/packages/theme-chalk/lib/index.css +0 -1
  238. package/packages/theme-chalk/lib/input-number.css +0 -0
  239. package/packages/theme-chalk/lib/input.css +0 -1
  240. package/packages/theme-chalk/lib/label.css +0 -1
  241. package/packages/theme-chalk/lib/layout.css +0 -1
  242. package/packages/theme-chalk/lib/login.css +0 -1
  243. package/packages/theme-chalk/lib/main.css +0 -1
  244. package/packages/theme-chalk/lib/menu.css +0 -1
  245. package/packages/theme-chalk/lib/nav.css +0 -1
  246. package/packages/theme-chalk/lib/notify.css +0 -0
  247. package/packages/theme-chalk/lib/page.css +0 -1
  248. package/packages/theme-chalk/lib/pagination.css +0 -1
  249. package/packages/theme-chalk/lib/player.css +0 -1
  250. package/packages/theme-chalk/lib/qr-code.css +0 -1
  251. package/packages/theme-chalk/lib/radio-group.css +0 -1
  252. package/packages/theme-chalk/lib/retrial-auth.css +0 -1
  253. package/packages/theme-chalk/lib/select-ganged.css +0 -1
  254. package/packages/theme-chalk/lib/select.css +0 -1
  255. package/packages/theme-chalk/lib/selector-panel.css +0 -1
  256. package/packages/theme-chalk/lib/selector.css +0 -1
  257. package/packages/theme-chalk/lib/simplicity-top.css +0 -1
  258. package/packages/theme-chalk/lib/simplicity.css +0 -1
  259. package/packages/theme-chalk/lib/sizer.css +0 -1
  260. package/packages/theme-chalk/lib/steps.css +0 -1
  261. package/packages/theme-chalk/lib/switch.css +0 -1
  262. package/packages/theme-chalk/lib/table-form.css +0 -0
  263. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  264. package/packages/theme-chalk/lib/tabs.css +0 -1
  265. package/packages/theme-chalk/lib/tips.css +0 -1
  266. package/packages/theme-chalk/lib/toolbar.css +0 -1
  267. package/packages/theme-chalk/lib/tree-group.css +0 -1
  268. package/packages/theme-chalk/lib/tree.css +0 -1
  269. package/packages/theme-chalk/lib/upload.css +0 -1
  270. package/packages/theme-chalk/lib/wujie.css +0 -0
  271. package/packages/theme-chalk/lib/wxlogin.css +0 -1
@@ -286,6 +286,7 @@ var lodash = __webpack_require__(12);
286
286
 
287
287
 
288
288
  var win = window.__WUJIE_RAW_WINDOW__ ? window.__WUJIE_RAW_WINDOW__ : window;
289
+ var winTop = getWinTop();
289
290
  var isIE = /MSIE|Trident/.test(navigator.userAgent);
290
291
  var parser = new external_ua_parser_js_["UAParser"]();
291
292
  var $hueStep = 2;
@@ -833,19 +834,19 @@ var busEmit = function busEmit(that, _ref3) {
833
834
  return;
834
835
  }
835
836
  if (isIE) {
836
- if (win.top !== win.self) {
837
- win.top.postMessage({ method: method, query: args, args: args }, '*');
837
+ if (winTop !== win.self) {
838
+ winTop.postMessage({ method: method, query: args, args: args }, '*');
838
839
  return;
839
840
  }
840
841
  var bus = that ? that.bus || that.$root.Bus || that.$root.$bus : null;
841
842
  bus && (Array.isArray(args) ? bus.$emit.apply(bus, [method].concat(args)) : bus.$emit(method, args));
842
843
  } else {
843
- if (win.top !== win.self) {
844
+ if (winTop !== win.self) {
844
845
  var _bus2 = win.$wujie ? win.$wujie.bus : null;
845
846
  if (_bus2) {
846
847
  Array.isArray(args) ? _bus2.$emit.apply(_bus2, [method].concat(args)) : _bus2.$emit(method, args);
847
848
  } else {
848
- win.top.postMessage({ method: method, query: args, args: args }, '*');
849
+ winTop.postMessage({ method: method, query: args, args: args }, '*');
849
850
  }
850
851
  return;
851
852
  }
@@ -1083,7 +1084,7 @@ var delUrlParam = function delUrlParam(_ref4) {
1083
1084
 
1084
1085
  var pUrl = '';
1085
1086
  try {
1086
- pUrl = win.top.location.href;
1087
+ pUrl = winTop.location.href;
1087
1088
  } catch (error) {
1088
1089
  pUrl = win.location.href;
1089
1090
  }
@@ -2537,7 +2538,7 @@ var isLogined = function () {
2537
2538
  pathname = '';
2538
2539
 
2539
2540
  try {
2540
- pathname = win.top.location.pathname;
2541
+ pathname = winTop.location.pathname;
2541
2542
  } catch (error) {
2542
2543
  pathname = win.location.pathname;
2543
2544
  }
@@ -2603,12 +2604,12 @@ var isLogined = function () {
2603
2604
  });
2604
2605
  try {
2605
2606
  var url = delUrlParam({
2606
- url: win.top.location.href,
2607
+ url: winTop.location.href,
2607
2608
  key: ['serverId', 'authType', 'code', 'sessionId']
2608
2609
  });
2609
- win.top.location.href = url;
2610
+ winTop.location.href = url;
2610
2611
  setTimeout(function () {
2611
- win.top.location.reload();
2612
+ winTop.location.reload();
2612
2613
  }, 200);
2613
2614
  } catch (error) {
2614
2615
  var _url2 = delUrlParam({
@@ -2627,8 +2628,8 @@ var isLogined = function () {
2627
2628
  break;
2628
2629
  case 3:
2629
2630
  try {
2630
- var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2631
- win.top.location.href = href;
2631
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(winTop.location.href));
2632
+ winTop.location.href = href;
2632
2633
  } catch (error) {
2633
2634
  var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2634
2635
  win.location.href = _href;
@@ -2642,18 +2643,18 @@ var isLogined = function () {
2642
2643
  sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2643
2644
  try {
2644
2645
  if (loginPage) {
2645
- win.top.location.replace(loginPage);
2646
+ winTop.location.replace(loginPage);
2646
2647
  } else if (document.referrer) {
2647
2648
  var referrerUrl = new URL(document.referrer);
2648
- if (referrerUrl.host !== win.top.location.host) {
2649
- win.top.location.replace(document.referrer);
2650
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2651
- win.top.location.href = './login.html';
2649
+ if (referrerUrl.host !== winTop.location.host) {
2650
+ winTop.location.replace(document.referrer);
2651
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2652
+ winTop.location.href = './login.html';
2652
2653
  } else {
2653
2654
  next('/login');
2654
2655
  }
2655
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2656
- win.top.location.href = './login.html';
2656
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2657
+ winTop.location.href = './login.html';
2657
2658
  } else {
2658
2659
  next('/login');
2659
2660
  }
@@ -2672,18 +2673,18 @@ var isLogined = function () {
2672
2673
  callback: function callback() {
2673
2674
  try {
2674
2675
  if (loginPage) {
2675
- win.top.location.replace(loginPage);
2676
+ winTop.location.replace(loginPage);
2676
2677
  } else if (document.referrer) {
2677
2678
  var referrerUrl = new URL(document.referrer);
2678
- if (referrerUrl.host !== win.top.location.host) {
2679
- win.top.location.replace(document.referrer);
2680
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2681
- win.top.location.href = './login.html';
2679
+ if (referrerUrl.host !== winTop.location.host) {
2680
+ winTop.location.replace(document.referrer);
2681
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2682
+ winTop.location.href = './login.html';
2682
2683
  } else {
2683
2684
  next('/login');
2684
2685
  }
2685
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2686
- win.top.location.href = './login.html';
2686
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2687
+ winTop.location.href = './login.html';
2687
2688
  } else {
2688
2689
  next('/login');
2689
2690
  }
@@ -2712,19 +2713,19 @@ var isLogined = function () {
2712
2713
  } else {
2713
2714
  try {
2714
2715
  if (loginPage) {
2715
- win.top.location.replace(loginPage);
2716
+ winTop.location.replace(loginPage);
2716
2717
  } else if (document.referrer) {
2717
2718
  referrerUrl = new URL(document.referrer);
2718
2719
 
2719
- if (referrerUrl.host !== win.top.location.host) {
2720
- win.top.location.replace(document.referrer);
2721
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2722
- win.top.location.href = './login.html';
2720
+ if (referrerUrl.host !== winTop.location.host) {
2721
+ winTop.location.replace(document.referrer);
2722
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2723
+ winTop.location.href = './login.html';
2723
2724
  } else {
2724
2725
  next('/login');
2725
2726
  }
2726
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2727
- win.top.location.href = './login.html';
2727
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2728
+ winTop.location.href = './login.html';
2728
2729
  } else {
2729
2730
  next('/login');
2730
2731
  }
@@ -2856,7 +2857,7 @@ var util_loading = function loading($loading, res) {
2856
2857
  }
2857
2858
  if (isObject(res)) {
2858
2859
  var config = extend({}, {
2859
- target: win.top.document.body,
2860
+ target: winTop.document.body,
2860
2861
  fullscreen: true,
2861
2862
  background: 'rgba(0, 0, 0, 0.65)',
2862
2863
  spinner: 'el-icon-loading',
@@ -2865,7 +2866,7 @@ var util_loading = function loading($loading, res) {
2865
2866
  return $loading(config);
2866
2867
  } else {
2867
2868
  var _loading = $loading({
2868
- target: win.top.document.body,
2869
+ target: winTop.document.body,
2869
2870
  fullscreen: true,
2870
2871
  background: 'rgba(0, 0, 0, 0.65)',
2871
2872
  spinner: 'el-icon-loading',
@@ -3011,7 +3012,7 @@ var util_responses = function responses(data) {
3011
3012
  removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
3012
3013
  var href = '';
3013
3014
  try {
3014
- href = win.top.location.href;
3015
+ href = winTop.location.href;
3015
3016
  } catch (error) {
3016
3017
  href = win.location.href;
3017
3018
  }
@@ -3036,7 +3037,7 @@ var util_responses = function responses(data) {
3036
3037
  if (loginPage) {
3037
3038
  var src = void 0;
3038
3039
  if (!startWith(loginPage, ['http', '/'], true)) {
3039
- var pathname = win.top.location.pathname;
3040
+ var pathname = winTop.location.pathname;
3040
3041
  if (pathname !== '/') {
3041
3042
  pathname = pathname.split('/');
3042
3043
  pathname.splice(pathname.length - 1);
@@ -3048,16 +3049,16 @@ var util_responses = function responses(data) {
3048
3049
  } else {
3049
3050
  src = loginPage;
3050
3051
  }
3051
- win.top.location.href = src;
3052
- } else if (win.top.location.href.indexOf('main.html') > -1) {
3053
- win.top.location.href = './login.html';
3052
+ winTop.location.href = src;
3053
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
3054
+ winTop.location.href = './login.html';
3054
3055
  } else {
3055
- var hash = win.top.location.hash;
3056
+ var hash = winTop.location.hash;
3056
3057
  if (hash) {
3057
- var len = win.top.location.href.indexOf(hash);
3058
- win.top.location.href = win.location.href.slice(0, len) + '#/login';
3058
+ var len = winTop.location.href.indexOf(hash);
3059
+ winTop.location.href = win.location.href.slice(0, len) + '#/login';
3059
3060
  } else {
3060
- win.top.location.href = '/login.html';
3061
+ winTop.location.href = '/login.html';
3061
3062
  }
3062
3063
  }
3063
3064
  } catch (error) {
@@ -3876,9 +3877,9 @@ var removeCookie = function removeCookie(key) {
3876
3877
 
3877
3878
  var winTopOpen = function winTopOpen(config) {
3878
3879
  if (isIE) {
3879
- if (win.top !== win.self) {
3880
+ if (winTop !== win.self) {
3880
3881
  try {
3881
- win.top.windowOpen(config);
3882
+ winTop.windowOpen(config);
3882
3883
  } catch (error) {
3883
3884
  win.postMessage({ method: 'windowOpen', query: config }, '*');
3884
3885
  }
package/lib/button.js CHANGED
@@ -287,6 +287,7 @@ var lodash = __webpack_require__(12);
287
287
 
288
288
 
289
289
  var win = window.__WUJIE_RAW_WINDOW__ ? window.__WUJIE_RAW_WINDOW__ : window;
290
+ var winTop = getWinTop();
290
291
  var isIE = /MSIE|Trident/.test(navigator.userAgent);
291
292
  var parser = new external_ua_parser_js_["UAParser"]();
292
293
  var $hueStep = 2;
@@ -834,19 +835,19 @@ var busEmit = function busEmit(that, _ref3) {
834
835
  return;
835
836
  }
836
837
  if (isIE) {
837
- if (win.top !== win.self) {
838
- win.top.postMessage({ method: method, query: args, args: args }, '*');
838
+ if (winTop !== win.self) {
839
+ winTop.postMessage({ method: method, query: args, args: args }, '*');
839
840
  return;
840
841
  }
841
842
  var bus = that ? that.bus || that.$root.Bus || that.$root.$bus : null;
842
843
  bus && (Array.isArray(args) ? bus.$emit.apply(bus, [method].concat(args)) : bus.$emit(method, args));
843
844
  } else {
844
- if (win.top !== win.self) {
845
+ if (winTop !== win.self) {
845
846
  var _bus2 = win.$wujie ? win.$wujie.bus : null;
846
847
  if (_bus2) {
847
848
  Array.isArray(args) ? _bus2.$emit.apply(_bus2, [method].concat(args)) : _bus2.$emit(method, args);
848
849
  } else {
849
- win.top.postMessage({ method: method, query: args, args: args }, '*');
850
+ winTop.postMessage({ method: method, query: args, args: args }, '*');
850
851
  }
851
852
  return;
852
853
  }
@@ -1084,7 +1085,7 @@ var delUrlParam = function delUrlParam(_ref4) {
1084
1085
 
1085
1086
  var pUrl = '';
1086
1087
  try {
1087
- pUrl = win.top.location.href;
1088
+ pUrl = winTop.location.href;
1088
1089
  } catch (error) {
1089
1090
  pUrl = win.location.href;
1090
1091
  }
@@ -2538,7 +2539,7 @@ var isLogined = function () {
2538
2539
  pathname = '';
2539
2540
 
2540
2541
  try {
2541
- pathname = win.top.location.pathname;
2542
+ pathname = winTop.location.pathname;
2542
2543
  } catch (error) {
2543
2544
  pathname = win.location.pathname;
2544
2545
  }
@@ -2604,12 +2605,12 @@ var isLogined = function () {
2604
2605
  });
2605
2606
  try {
2606
2607
  var url = delUrlParam({
2607
- url: win.top.location.href,
2608
+ url: winTop.location.href,
2608
2609
  key: ['serverId', 'authType', 'code', 'sessionId']
2609
2610
  });
2610
- win.top.location.href = url;
2611
+ winTop.location.href = url;
2611
2612
  setTimeout(function () {
2612
- win.top.location.reload();
2613
+ winTop.location.reload();
2613
2614
  }, 200);
2614
2615
  } catch (error) {
2615
2616
  var _url2 = delUrlParam({
@@ -2628,8 +2629,8 @@ var isLogined = function () {
2628
2629
  break;
2629
2630
  case 3:
2630
2631
  try {
2631
- var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2632
- win.top.location.href = href;
2632
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(winTop.location.href));
2633
+ winTop.location.href = href;
2633
2634
  } catch (error) {
2634
2635
  var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2635
2636
  win.location.href = _href;
@@ -2643,18 +2644,18 @@ var isLogined = function () {
2643
2644
  sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2644
2645
  try {
2645
2646
  if (loginPage) {
2646
- win.top.location.replace(loginPage);
2647
+ winTop.location.replace(loginPage);
2647
2648
  } else if (document.referrer) {
2648
2649
  var referrerUrl = new URL(document.referrer);
2649
- if (referrerUrl.host !== win.top.location.host) {
2650
- win.top.location.replace(document.referrer);
2651
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2652
- win.top.location.href = './login.html';
2650
+ if (referrerUrl.host !== winTop.location.host) {
2651
+ winTop.location.replace(document.referrer);
2652
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2653
+ winTop.location.href = './login.html';
2653
2654
  } else {
2654
2655
  next('/login');
2655
2656
  }
2656
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2657
- win.top.location.href = './login.html';
2657
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2658
+ winTop.location.href = './login.html';
2658
2659
  } else {
2659
2660
  next('/login');
2660
2661
  }
@@ -2673,18 +2674,18 @@ var isLogined = function () {
2673
2674
  callback: function callback() {
2674
2675
  try {
2675
2676
  if (loginPage) {
2676
- win.top.location.replace(loginPage);
2677
+ winTop.location.replace(loginPage);
2677
2678
  } else if (document.referrer) {
2678
2679
  var referrerUrl = new URL(document.referrer);
2679
- if (referrerUrl.host !== win.top.location.host) {
2680
- win.top.location.replace(document.referrer);
2681
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2682
- win.top.location.href = './login.html';
2680
+ if (referrerUrl.host !== winTop.location.host) {
2681
+ winTop.location.replace(document.referrer);
2682
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2683
+ winTop.location.href = './login.html';
2683
2684
  } else {
2684
2685
  next('/login');
2685
2686
  }
2686
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2687
- win.top.location.href = './login.html';
2687
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2688
+ winTop.location.href = './login.html';
2688
2689
  } else {
2689
2690
  next('/login');
2690
2691
  }
@@ -2713,19 +2714,19 @@ var isLogined = function () {
2713
2714
  } else {
2714
2715
  try {
2715
2716
  if (loginPage) {
2716
- win.top.location.replace(loginPage);
2717
+ winTop.location.replace(loginPage);
2717
2718
  } else if (document.referrer) {
2718
2719
  referrerUrl = new URL(document.referrer);
2719
2720
 
2720
- if (referrerUrl.host !== win.top.location.host) {
2721
- win.top.location.replace(document.referrer);
2722
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2723
- win.top.location.href = './login.html';
2721
+ if (referrerUrl.host !== winTop.location.host) {
2722
+ winTop.location.replace(document.referrer);
2723
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2724
+ winTop.location.href = './login.html';
2724
2725
  } else {
2725
2726
  next('/login');
2726
2727
  }
2727
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2728
- win.top.location.href = './login.html';
2728
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2729
+ winTop.location.href = './login.html';
2729
2730
  } else {
2730
2731
  next('/login');
2731
2732
  }
@@ -2857,7 +2858,7 @@ var util_loading = function loading($loading, res) {
2857
2858
  }
2858
2859
  if (isObject(res)) {
2859
2860
  var config = extend({}, {
2860
- target: win.top.document.body,
2861
+ target: winTop.document.body,
2861
2862
  fullscreen: true,
2862
2863
  background: 'rgba(0, 0, 0, 0.65)',
2863
2864
  spinner: 'el-icon-loading',
@@ -2866,7 +2867,7 @@ var util_loading = function loading($loading, res) {
2866
2867
  return $loading(config);
2867
2868
  } else {
2868
2869
  var _loading = $loading({
2869
- target: win.top.document.body,
2870
+ target: winTop.document.body,
2870
2871
  fullscreen: true,
2871
2872
  background: 'rgba(0, 0, 0, 0.65)',
2872
2873
  spinner: 'el-icon-loading',
@@ -3012,7 +3013,7 @@ var util_responses = function responses(data) {
3012
3013
  removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
3013
3014
  var href = '';
3014
3015
  try {
3015
- href = win.top.location.href;
3016
+ href = winTop.location.href;
3016
3017
  } catch (error) {
3017
3018
  href = win.location.href;
3018
3019
  }
@@ -3037,7 +3038,7 @@ var util_responses = function responses(data) {
3037
3038
  if (loginPage) {
3038
3039
  var src = void 0;
3039
3040
  if (!startWith(loginPage, ['http', '/'], true)) {
3040
- var pathname = win.top.location.pathname;
3041
+ var pathname = winTop.location.pathname;
3041
3042
  if (pathname !== '/') {
3042
3043
  pathname = pathname.split('/');
3043
3044
  pathname.splice(pathname.length - 1);
@@ -3049,16 +3050,16 @@ var util_responses = function responses(data) {
3049
3050
  } else {
3050
3051
  src = loginPage;
3051
3052
  }
3052
- win.top.location.href = src;
3053
- } else if (win.top.location.href.indexOf('main.html') > -1) {
3054
- win.top.location.href = './login.html';
3053
+ winTop.location.href = src;
3054
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
3055
+ winTop.location.href = './login.html';
3055
3056
  } else {
3056
- var hash = win.top.location.hash;
3057
+ var hash = winTop.location.hash;
3057
3058
  if (hash) {
3058
- var len = win.top.location.href.indexOf(hash);
3059
- win.top.location.href = win.location.href.slice(0, len) + '#/login';
3059
+ var len = winTop.location.href.indexOf(hash);
3060
+ winTop.location.href = win.location.href.slice(0, len) + '#/login';
3060
3061
  } else {
3061
- win.top.location.href = '/login.html';
3062
+ winTop.location.href = '/login.html';
3062
3063
  }
3063
3064
  }
3064
3065
  } catch (error) {
@@ -3877,9 +3878,9 @@ var removeCookie = function removeCookie(key) {
3877
3878
 
3878
3879
  var winTopOpen = function winTopOpen(config) {
3879
3880
  if (isIE) {
3880
- if (win.top !== win.self) {
3881
+ if (winTop !== win.self) {
3881
3882
  try {
3882
- win.top.windowOpen(config);
3883
+ winTop.windowOpen(config);
3883
3884
  } catch (error) {
3884
3885
  win.postMessage({ method: 'windowOpen', query: config }, '*');
3885
3886
  }