eoss-ui 0.7.30 → 0.7.32

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 (50) hide show
  1. package/lib/button-group.js +28 -15
  2. package/lib/button.js +28 -15
  3. package/lib/calogin.js +28 -15
  4. package/lib/checkbox-group.js +28 -15
  5. package/lib/data-table-form.js +28 -15
  6. package/lib/data-table.js +28 -15
  7. package/lib/date-picker.js +28 -15
  8. package/lib/dialog.js +28 -15
  9. package/lib/eoss-ui.common.js +143 -131
  10. package/lib/flow-group.js +28 -15
  11. package/lib/flow-list.js +32 -19
  12. package/lib/flow.js +32 -19
  13. package/lib/form.js +28 -15
  14. package/lib/handle-user.js +28 -15
  15. package/lib/handler.js +28 -15
  16. package/lib/icon.js +28 -15
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +28 -15
  19. package/lib/input.js +28 -15
  20. package/lib/login.js +28 -15
  21. package/lib/main.js +104 -92
  22. package/lib/nav.js +28 -15
  23. package/lib/page.js +28 -15
  24. package/lib/pagination.js +28 -15
  25. package/lib/player.js +28 -15
  26. package/lib/qr-code.js +28 -15
  27. package/lib/radio-group.js +28 -15
  28. package/lib/retrial-auth.js +28 -15
  29. package/lib/select-ganged.js +28 -15
  30. package/lib/select.js +28 -15
  31. package/lib/selector-panel.js +28 -15
  32. package/lib/selector.js +28 -15
  33. package/lib/sizer.js +28 -15
  34. package/lib/steps.js +28 -15
  35. package/lib/switch.js +28 -15
  36. package/lib/table-form.js +28 -15
  37. package/lib/tabs.js +28 -15
  38. package/lib/tips.js +28 -15
  39. package/lib/tree-group.js +28 -15
  40. package/lib/tree.js +28 -15
  41. package/lib/upload.js +28 -15
  42. package/lib/utils/util.js +24 -11
  43. package/lib/wujie.js +28 -15
  44. package/lib/wxlogin.js +28 -15
  45. package/package.json +1 -1
  46. package/packages/flow/src/component/FileList.vue +2 -2
  47. package/packages/main/src/main.vue +23 -47
  48. package/packages/main/src/simplicity/index.vue +23 -8
  49. package/src/index.js +1 -1
  50. package/src/utils/util.js +22 -11
@@ -277,8 +277,8 @@
277
277
  frameborder="0"
278
278
  width="100%"
279
279
  height="100%"
280
- :id="activeName == item.id ? iframeId : ''"
281
- :name="activeName == item.id ? iframeId : ''"
280
+ :id="activeName == item.id ? iframeId : item.id || item.appCode"
281
+ :name="activeName == item.id ? iframeId : item.id || item.appCode"
282
282
  :onload="handleLoadIframe(item)"
283
283
  :src="item.url"
284
284
  ></iframe>
@@ -379,6 +379,7 @@ import store from 'eoss-ui/src/utils/store';
379
379
  import util from 'eoss-ui/src/utils/util';
380
380
  const isIE = /MSIE|Trident/.test(navigator.userAgent);
381
381
  const systemMode = util.win.systemMode || 'default';
382
+ import WujieVue from 'wujie-vue2';
382
383
  let events = [
383
384
  (tabs, index, that) => {
384
385
  let tab = tabs[index];
@@ -1804,7 +1805,7 @@ export default {
1804
1805
  **/
1805
1806
  handleRefresh(arg) {
1806
1807
  let i =
1807
- arg && arg != true
1808
+ arg && arg != true && arg !== 'pageData'
1808
1809
  ? util.indexOfObj(this.tabs, arg, 'appCode,code,id,url')
1809
1810
  : util.indexOfObj(this.tabs, this.activeName, 'id');
1810
1811
  let tab = this.tabs[i];
@@ -1813,15 +1814,29 @@ export default {
1813
1814
  } else {
1814
1815
  let tab = this.tabs[i];
1815
1816
  if (tab.method === 'iframe') {
1816
- this.$set(this.tabs[i], 'url', util.handlerUrl(tab.url));
1817
+ if (arg && arg === 'pageData') {
1818
+ const iframe = document.getElementById(tab.id || tab.appCode);
1819
+ iframe.contentWindow.postMessage({ method: 'refresh' }, tab.url);
1820
+ } else {
1821
+ this.$set(this.tabs[i], 'url', util.handlerUrl(tab.url));
1822
+ }
1817
1823
  }
1818
1824
  if (tab.method === 'wujie' && tab.appCode) {
1819
- window.document
1820
- .querySelector(`iframe[name=${tab.appCode}]`)
1821
- .contentWindow.location.reload(true);
1825
+ if (arg && arg === 'pageData') {
1826
+ WujieVue.$emit('refresh', tab);
1827
+ } else {
1828
+ window.document
1829
+ .querySelector(`iframe[name=${tab.appCode}]`)
1830
+ .contentWindow.location.reload(true);
1831
+ }
1822
1832
  }
1823
1833
  if (tab.method === 'router') {
1824
- this.$set(this.tabs[i], 'keys', util.uuid());
1834
+ if (arg && arg === 'pageData') {
1835
+ const bus = this.bus || this.$root.Bus;
1836
+ bus.$emit('refresh', tab);
1837
+ } else {
1838
+ this.$set(this.tabs[i], 'keys', util.uuid());
1839
+ }
1825
1840
  }
1826
1841
  }
1827
1842
  },
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.7.30',
128
+ version: '0.7.32',
129
129
  install,
130
130
  Button,
131
131
  ButtonGroup,
package/src/utils/util.js CHANGED
@@ -557,21 +557,32 @@ const browser = function () {
557
557
  * @author huangbo
558
558
  * @date 2022年5月7日
559
559
  **/
560
- const busEmit = function (that, { method, args }) {
560
+ const busEmit = function (that, { method, args, opener }) {
561
+ if (opener) {
562
+ const { source, origin } = opener;
563
+ source.postMessage({ method, query: args, args }, origin);
564
+ return;
565
+ }
561
566
  if (isIE) {
562
- const bus = that ? that.bus || that.$root.Bus || that.$root.$bus : null;
563
- if (bus) {
564
- Array.isArray(args) ? bus.$emit(method, ...args) : bus.$emit(method, args);
565
- } else {
566
- win.parent.postMessage({ method, query: args, args }, '*');
567
+ if (win.top !== win.self) {
568
+ win.top.postMessage({ method, query: args, args }, '*');
569
+ return;
567
570
  }
571
+ const bus = that ? that.bus || that.$root.Bus || that.$root.$bus : null;
572
+ bus && (Array.isArray(args) ? bus.$emit(method, ...args) : bus.$emit(method, args));
568
573
  } else {
569
- const bus = win.$wujie ? win.$wujie.bus : that ? that.bus || that.$root.Bus || that.$root.$bus : null;
570
- if (bus) {
571
- Array.isArray(args) ? bus.$emit(method, ...args) : bus.$emit(method, args);
572
- } else {
573
- win.parent.postMessage({ method, query: args, args }, '*');
574
+ if (win.top !== win.self) {
575
+ const bus = win.$wujie ? win.$wujie.bus : null;
576
+ if (bus) {
577
+ Array.isArray(args) ? bus.$emit(method, ...args) : bus.$emit(method, args);
578
+
579
+ } else {
580
+ win.top.postMessage({ method, query: args, args }, '*');
581
+ }
582
+ return;
574
583
  }
584
+ const bus = that ? that.bus || that.$root.Bus || that.$root.$bus : null;
585
+ bus && (Array.isArray(args) ? bus.$emit(method, ...args) : bus.$emit(method, args));
575
586
  }
576
587
  };
577
588