eoss-ui 0.8.3 → 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 (52) hide show
  1. package/lib/button-group.js +46 -45
  2. package/lib/button.js +46 -45
  3. package/lib/calogin.js +89 -57
  4. package/lib/checkbox-group.js +46 -45
  5. package/lib/data-table-form.js +46 -45
  6. package/lib/data-table.js +95 -69
  7. package/lib/date-picker.js +46 -45
  8. package/lib/dialog.js +46 -45
  9. package/lib/eoss-ui.common.js +401 -333
  10. package/lib/flow-group.js +46 -45
  11. package/lib/flow-list.js +46 -45
  12. package/lib/flow.js +285 -270
  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 +63 -61
  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 +46 -45
  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/tips.js +46 -45
  39. package/lib/tree-group.js +46 -45
  40. package/lib/tree.js +46 -45
  41. package/lib/upload.js +46 -45
  42. package/lib/utils/util.js +46 -45
  43. package/lib/wujie.js +46 -45
  44. package/lib/wxlogin.js +46 -45
  45. package/package.json +1 -1
  46. package/packages/calogin/src/plugin.js +3 -3
  47. package/packages/data-table/src/main.vue +49 -20
  48. package/packages/flow/src/processForm.vue +259 -228
  49. package/packages/main/src/main.vue +1 -1
  50. package/packages/main/src/simplicityTop/index.vue +6 -5
  51. package/src/index.js +1 -1
  52. package/src/utils/util.js +49 -48
@@ -606,6 +606,7 @@ export default {
606
606
  },
607
607
  data() {
608
608
  return {
609
+ winTop: util.getWinTop(),
609
610
  appCodes: 'indexUrl',
610
611
  tabActiveName: '',
611
612
  count: 0,
@@ -1041,7 +1042,7 @@ export default {
1041
1042
  },
1042
1043
  mounted() {
1043
1044
  // this.handleListener();
1044
- window.top.jumpMenu = window.top.jumpTopMenu = this.handleSelect;
1045
+ window.jumpMenu = this.wintop.jumpTopMenu = this.handleSelect;
1045
1046
  this.queryChildMenuData();
1046
1047
  },
1047
1048
  methods: {
@@ -1960,9 +1961,9 @@ export default {
1960
1961
  ) {
1961
1962
  if (
1962
1963
  this.appCodes == 'indexUrl' &&
1963
- window.top.refreshList
1964
+ this.wintop.refreshList
1964
1965
  ) {
1965
- window.top.refreshList(key);
1966
+ this.wintop.refreshList(key);
1966
1967
  }
1967
1968
  if (this.appCodes == 'wdtxpengding_make') {
1968
1969
  this.handleRefresh(1);
@@ -2097,8 +2098,8 @@ export default {
2097
2098
  this.getNums();
2098
2099
  }
2099
2100
  // console.log(arg, 'arg');
2100
- if (window.top.refreshList) {
2101
- window.top.refreshList();
2101
+ if (this.wintop.refreshList) {
2102
+ this.wintop.refreshList();
2102
2103
  }
2103
2104
  if (arg != undefined) {
2104
2105
  let tab = this.currentPage;
package/src/index.js CHANGED
@@ -125,7 +125,7 @@ if (typeof window !== 'undefined' && window.Vue) {
125
125
  }
126
126
 
127
127
  export default {
128
- version: '0.8.3',
128
+ version: '0.8.5',
129
129
  install,
130
130
  Button,
131
131
  ButtonGroup,
package/src/utils/util.js CHANGED
@@ -16,6 +16,7 @@ import WebSocket from './webSocket';
16
16
  import { UAParser } from 'ua-parser-js';
17
17
 
18
18
  const win = window.__WUJIE_RAW_WINDOW__ ? window.__WUJIE_RAW_WINDOW__ : window;
19
+ const winTop = getWinTop();
19
20
  const isIE = /MSIE|Trident/.test(navigator.userAgent);
20
21
  const parser = new UAParser();
21
22
  const $hueStep = 2;
@@ -590,8 +591,8 @@ const busEmit = function (that, { method, args, opener }) {
590
591
  return;
591
592
  }
592
593
  if (isIE) {
593
- if (win.top !== win.self) {
594
- win.top.postMessage({ method, query: args, args }, '*');
594
+ if (winTop !== win.self) {
595
+ winTop.postMessage({ method, query: args, args }, '*');
595
596
  return;
596
597
  }
597
598
  const bus = that ? that.bus || that.$root.Bus || that.$root.$bus : null;
@@ -600,14 +601,14 @@ const busEmit = function (that, { method, args, opener }) {
600
601
  ? bus.$emit(method, ...args)
601
602
  : bus.$emit(method, args));
602
603
  } else {
603
- if (win.top !== win.self) {
604
+ if (winTop !== win.self) {
604
605
  const bus = win.$wujie ? win.$wujie.bus : null;
605
606
  if (bus) {
606
607
  Array.isArray(args)
607
608
  ? bus.$emit(method, ...args)
608
609
  : bus.$emit(method, args);
609
610
  } else {
610
- win.top.postMessage({ method, query: args, args }, '*');
611
+ winTop.postMessage({ method, query: args, args }, '*');
611
612
  }
612
613
  return;
613
614
  }
@@ -869,7 +870,7 @@ const debounce = function (callback, wait) {
869
870
  const delUrlParam = function ({ url, key }) {
870
871
  let pUrl = '';
871
872
  try {
872
- pUrl = win.top.location.href;
873
+ pUrl = winTop.location.href;
873
874
  } catch (error) {
874
875
  pUrl = win.location.href;
875
876
  }
@@ -2359,7 +2360,7 @@ const isLogined = async function ({
2359
2360
  }
2360
2361
  let pathname = '';
2361
2362
  try {
2362
- pathname = win.top.location.pathname;
2363
+ pathname = winTop.location.pathname;
2363
2364
  } catch (error) {
2364
2365
  pathname = win.location.pathname;
2365
2366
  }
@@ -2415,12 +2416,12 @@ const isLogined = async function ({
2415
2416
  });
2416
2417
  try {
2417
2418
  let url = delUrlParam({
2418
- url: win.top.location.href,
2419
+ url: winTop.location.href,
2419
2420
  key: ['serverId', 'authType', 'code', 'sessionId']
2420
2421
  });
2421
- win.top.location.href = url;
2422
+ winTop.location.href = url;
2422
2423
  setTimeout(() => {
2423
- win.top.location.reload();
2424
+ winTop.location.reload();
2424
2425
  }, 200);
2425
2426
  } catch (error) {
2426
2427
  let url = delUrlParam({
@@ -2441,9 +2442,9 @@ const isLogined = async function ({
2441
2442
  try {
2442
2443
  const href = results.authorizeUrl.replace(
2443
2444
  '{redirectUri}',
2444
- encodeURIComponent(win.top.location.href)
2445
+ encodeURIComponent(winTop.location.href)
2445
2446
  );
2446
- win.top.location.href = href;
2447
+ winTop.location.href = href;
2447
2448
  } catch (error) {
2448
2449
  const href = results.authorizeUrl.replace(
2449
2450
  '{redirectUri}',
@@ -2468,25 +2469,25 @@ const isLogined = async function ({
2468
2469
  );
2469
2470
  try {
2470
2471
  if (loginPage) {
2471
- win.top.location.replace(loginPage);
2472
+ winTop.location.replace(loginPage);
2472
2473
  } else if (document.referrer) {
2473
2474
  const referrerUrl = new URL(document.referrer);
2474
- if (referrerUrl.host !== win.top.location.host) {
2475
- win.top.location.replace(document.referrer);
2475
+ if (referrerUrl.host !== winTop.location.host) {
2476
+ winTop.location.replace(document.referrer);
2476
2477
  } else if (
2477
- win.top.location.href.indexOf('main.html') > -1 ||
2478
- win.top.location.href.indexOf('index.html') > -1 ||
2478
+ winTop.location.href.indexOf('main.html') > -1 ||
2479
+ winTop.location.href.indexOf('index.html') > -1 ||
2479
2480
  document.referrer.indexOf('main.html') > -1 ||
2480
2481
  document.referrer.indexOf('index.html') > -1
2481
2482
  ) {
2482
- win.top.location.href = './login.html';
2483
+ winTop.location.href = './login.html';
2483
2484
  } else {
2484
2485
  next('/login');
2485
2486
  }
2486
2487
  } else if (
2487
- win.top.location.href.indexOf('main.html') > -1
2488
+ winTop.location.href.indexOf('main.html') > -1
2488
2489
  ) {
2489
- win.top.location.href = './login.html';
2490
+ winTop.location.href = './login.html';
2490
2491
  } else {
2491
2492
  next('/login');
2492
2493
  }
@@ -2506,23 +2507,23 @@ const isLogined = async function ({
2506
2507
  callback: () => {
2507
2508
  try {
2508
2509
  if (loginPage) {
2509
- win.top.location.replace(loginPage);
2510
+ winTop.location.replace(loginPage);
2510
2511
  } else if (document.referrer) {
2511
2512
  const referrerUrl = new URL(document.referrer);
2512
- if (referrerUrl.host !== win.top.location.host) {
2513
- win.top.location.replace(document.referrer);
2513
+ if (referrerUrl.host !== winTop.location.host) {
2514
+ winTop.location.replace(document.referrer);
2514
2515
  } else if (
2515
- win.top.location.href.indexOf('main.html') > -1 ||
2516
- win.top.location.href.indexOf('index.html') > -1 ||
2516
+ winTop.location.href.indexOf('main.html') > -1 ||
2517
+ winTop.location.href.indexOf('index.html') > -1 ||
2517
2518
  document.referrer.indexOf('main.html') > -1 ||
2518
2519
  document.referrer.indexOf('index.html') > -1
2519
2520
  ) {
2520
- win.top.location.href = './login.html';
2521
+ winTop.location.href = './login.html';
2521
2522
  } else {
2522
2523
  next('/login');
2523
2524
  }
2524
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2525
- win.top.location.href = './login.html';
2525
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2526
+ winTop.location.href = './login.html';
2526
2527
  } else {
2527
2528
  next('/login');
2528
2529
  }
@@ -2558,23 +2559,23 @@ const isLogined = async function ({
2558
2559
  } else {
2559
2560
  try {
2560
2561
  if (loginPage) {
2561
- win.top.location.replace(loginPage);
2562
+ winTop.location.replace(loginPage);
2562
2563
  } else if (document.referrer) {
2563
2564
  const referrerUrl = new URL(document.referrer);
2564
- if (referrerUrl.host !== win.top.location.host) {
2565
- win.top.location.replace(document.referrer);
2565
+ if (referrerUrl.host !== winTop.location.host) {
2566
+ winTop.location.replace(document.referrer);
2566
2567
  } else if (
2567
- win.top.location.href.indexOf('main.html') > -1 ||
2568
- win.top.location.href.indexOf('index.html') > -1 ||
2568
+ winTop.location.href.indexOf('main.html') > -1 ||
2569
+ winTop.location.href.indexOf('index.html') > -1 ||
2569
2570
  document.referrer.indexOf('main.html') > -1 ||
2570
2571
  document.referrer.indexOf('index.html') > -1
2571
2572
  ) {
2572
- win.top.location.href = './login.html';
2573
+ winTop.location.href = './login.html';
2573
2574
  } else {
2574
2575
  next('/login');
2575
2576
  }
2576
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2577
- win.top.location.href = './login.html';
2577
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2578
+ winTop.location.href = './login.html';
2578
2579
  } else {
2579
2580
  next('/login');
2580
2581
  }
@@ -2694,7 +2695,7 @@ const loading = function ($loading, res) {
2694
2695
  const config = extend(
2695
2696
  {},
2696
2697
  {
2697
- target: win.top.document.body,
2698
+ target: winTop.document.body,
2698
2699
  fullscreen: true,
2699
2700
  background: 'rgba(0, 0, 0, 0.65)',
2700
2701
  spinner: 'el-icon-loading',
@@ -2705,7 +2706,7 @@ const loading = function ($loading, res) {
2705
2706
  return $loading(config);
2706
2707
  } else {
2707
2708
  let loading = $loading({
2708
- target: win.top.document.body,
2709
+ target: winTop.document.body,
2709
2710
  fullscreen: true,
2710
2711
  background: 'rgba(0, 0, 0, 0.65)',
2711
2712
  spinner: 'el-icon-loading',
@@ -2860,7 +2861,7 @@ const responses = function (data) {
2860
2861
  ]);
2861
2862
  let href = '';
2862
2863
  try {
2863
- href = win.top.location.href;
2864
+ href = winTop.location.href;
2864
2865
  } catch (error) {
2865
2866
  href = win.location.href;
2866
2867
  }
@@ -2895,7 +2896,7 @@ const responses = function (data) {
2895
2896
  if (loginPage) {
2896
2897
  let src;
2897
2898
  if (!startWith(loginPage, ['http', '/'], true)) {
2898
- let pathname = win.top.location.pathname;
2899
+ let pathname = winTop.location.pathname;
2899
2900
  if (pathname !== '/') {
2900
2901
  pathname = pathname.split('/');
2901
2902
  pathname.splice(pathname.length - 1);
@@ -2907,17 +2908,17 @@ const responses = function (data) {
2907
2908
  } else {
2908
2909
  src = loginPage;
2909
2910
  }
2910
- win.top.location.href = src;
2911
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2912
- win.top.location.href = './login.html';
2911
+ winTop.location.href = src;
2912
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2913
+ winTop.location.href = './login.html';
2913
2914
  } else {
2914
- const hash = win.top.location.hash;
2915
+ const hash = winTop.location.hash;
2915
2916
  if (hash) {
2916
- const len = win.top.location.href.indexOf(hash);
2917
- win.top.location.href =
2917
+ const len = winTop.location.href.indexOf(hash);
2918
+ winTop.location.href =
2918
2919
  win.location.href.slice(0, len) + '#/login';
2919
2920
  } else {
2920
- win.top.location.href = '/login.html';
2921
+ winTop.location.href = '/login.html';
2921
2922
  }
2922
2923
  }
2923
2924
  } catch (error) {
@@ -3797,9 +3798,9 @@ const removeCookie = function (key) {
3797
3798
 
3798
3799
  const winTopOpen = function (config) {
3799
3800
  if (isIE) {
3800
- if (win.top !== win.self) {
3801
+ if (winTop !== win.self) {
3801
3802
  try {
3802
- win.top.windowOpen(config);
3803
+ winTop.windowOpen(config);
3803
3804
  } catch (error) {
3804
3805
  win.postMessage({ method: 'windowOpen', query: config }, '*');
3805
3806
  }