@fmdeui/fmui 1.0.37 → 1.0.39

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 (41) hide show
  1. package/es/components/fm-layout/index.d.ts +10 -0
  2. package/es/components/fm-layout/src/index.vue.d.ts +4 -0
  3. package/es/hooks/other.d.ts +1 -5
  4. package/es/index.mjs +1 -0
  5. package/es/make-installer.mjs +2 -1
  6. package/es/packages/components/fm-layout/src/index.vue2.mjs +5 -1
  7. package/es/packages/components/fm-layout/src/navBars/topBar/user.vue2.mjs +3 -2
  8. package/es/packages/components/fm-layout/src/navMenu/horizontal.vue2.mjs +7 -2
  9. package/es/packages/components/fm-layout/src/navMenu/subItem.vue2.mjs +7 -2
  10. package/es/packages/components/fm-layout/src/navMenu/vertical.vue2.mjs +7 -2
  11. package/es/packages/hooks/other.mjs +8 -34
  12. package/es/packages/stores/index.mjs +1 -0
  13. package/es/stores/index.d.ts +2 -0
  14. package/index.js +144 -150
  15. package/index.min.js +6 -6
  16. package/index.min.mjs +6 -6
  17. package/index.mjs +144 -151
  18. package/lib/components/fm-layout/index.d.ts +10 -0
  19. package/lib/components/fm-layout/src/index.vue.d.ts +4 -0
  20. package/lib/hooks/other.d.ts +1 -5
  21. package/lib/index.js +2 -0
  22. package/lib/make-installer.js +2 -1
  23. package/lib/packages/components/fm-layout/src/index.vue2.js +5 -1
  24. package/lib/packages/components/fm-layout/src/navBars/topBar/user.vue2.js +3 -2
  25. package/lib/packages/components/fm-layout/src/navMenu/horizontal.vue2.js +7 -2
  26. package/lib/packages/components/fm-layout/src/navMenu/subItem.vue2.js +7 -2
  27. package/lib/packages/components/fm-layout/src/navMenu/vertical.vue2.js +7 -2
  28. package/lib/packages/hooks/other.js +6 -34
  29. package/lib/packages/stores/index.js +2 -0
  30. package/lib/stores/index.d.ts +2 -0
  31. package/locale/en.js +1 -1
  32. package/locale/en.min.js +1 -1
  33. package/locale/en.min.mjs +1 -1
  34. package/locale/en.mjs +1 -1
  35. package/locale/zh-cn.js +1 -1
  36. package/locale/zh-cn.min.js +1 -1
  37. package/locale/zh-cn.min.mjs +1 -1
  38. package/locale/zh-cn.mjs +1 -1
  39. package/package.json +1 -1
  40. /package/es/{version.css → make-installer.css} +0 -0
  41. /package/lib/{component.css → index.css} +0 -0
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fmdeui-fmui v1.0.37 */
1
+ /*! fmdeui-fmui v1.0.39 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('vue-router'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'vue-router', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
@@ -27,6 +27,67 @@
27
27
 
28
28
  const pinia = pinia$1.createPinia();
29
29
 
30
+ const useKeepALiveNames = pinia$1.defineStore("keepALiveNames", {
31
+ state: () => ({
32
+ keepAliveNames: [],
33
+ cachedViews: []
34
+ }),
35
+ actions: {
36
+ async setCacheKeepAlive(data) {
37
+ this.keepAliveNames = data;
38
+ },
39
+ async addCachedView(view) {
40
+ var _a;
41
+ if (view.meta.isKeepAlive) (_a = this.cachedViews) == null ? void 0 : _a.push(view.name);
42
+ },
43
+ async delCachedView(view) {
44
+ const index = this.cachedViews.indexOf(view.name);
45
+ if (index > -1) this.cachedViews.splice(index, 1);
46
+ },
47
+ async delOthersCachedViews(view) {
48
+ if (view.meta.isKeepAlive) this.cachedViews = [view.name];
49
+ else this.cachedViews = [];
50
+ },
51
+ async delAllCachedViews() {
52
+ this.cachedViews = [];
53
+ }
54
+ }
55
+ });
56
+
57
+ const useRequestOldRoutes = pinia$1.defineStore("requestOldRoutes", {
58
+ state: () => ({
59
+ requestOldRoutes: []
60
+ }),
61
+ actions: {
62
+ async setRequestOldRoutes(routes) {
63
+ this.requestOldRoutes = routes;
64
+ }
65
+ }
66
+ });
67
+
68
+ const useRoutesList = pinia$1.defineStore("routesList", {
69
+ state: () => ({
70
+ routesList: [],
71
+ isColumnsMenuHover: false,
72
+ isColumnsNavHover: false,
73
+ currentRoute: null
74
+ }),
75
+ actions: {
76
+ setCurrentRoute(route) {
77
+ this.currentRoute = route;
78
+ },
79
+ async setRoutesList(data) {
80
+ this.routesList = data;
81
+ },
82
+ async setColumnsMenuHover(bool) {
83
+ this.isColumnsMenuHover = bool;
84
+ },
85
+ async setColumnsNavHover(bool) {
86
+ this.isColumnsNavHover = bool;
87
+ }
88
+ }
89
+ });
90
+
30
91
  function judgementSameArr(newArr, oldArr) {
31
92
  const news = removeDuplicate(newArr);
32
93
  const olds = removeDuplicate(oldArr);
@@ -1799,43 +1860,21 @@
1799
1860
  }
1800
1861
  };
1801
1862
 
1802
- const setWatermark = (str) => {
1803
- const id = "1.23452384164.123412416";
1804
- if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id));
1805
- const can = document.createElement("canvas");
1806
- can.width = 400;
1807
- can.height = 200;
1808
- const cans = can.getContext("2d");
1809
- cans.rotate(-20 * Math.PI / 180);
1810
- cans.font = "12px Vedana";
1811
- cans.fillStyle = "rgba(200, 200, 200, 0.30)";
1812
- cans.textBaseline = "middle";
1813
- cans.fillText(str, can.width / 10, can.height, can.width);
1814
- const div = document.createElement("div");
1815
- div.id = id;
1816
- div.style.pointerEvents = "none";
1817
- div.style.top = "0px";
1818
- div.style.left = "0px";
1819
- div.style.position = "fixed";
1820
- div.style.zIndex = "10000000";
1821
- div.style.width = `${document.documentElement.clientWidth}px`;
1822
- div.style.height = `${document.documentElement.clientHeight}px`;
1823
- div.style.background = `url(${can.toDataURL("image/png")}) left top repeat`;
1824
- document.body.appendChild(div);
1825
- return id;
1826
- };
1827
- const watermark = {
1828
- // 设置水印
1829
- set: (str) => {
1830
- let id = setWatermark(str);
1831
- if (document.getElementById(id) === null) id = setWatermark(str);
1832
- },
1833
- // 删除水印
1834
- del: () => {
1835
- let id = "1.23452384164.123412416";
1836
- if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id));
1863
+ const useTagsViewRoutes = pinia$1.defineStore("tagsViewRoutes", {
1864
+ state: () => ({
1865
+ tagsViewRoutes: [],
1866
+ isTagsViewCurrenFull: false
1867
+ }),
1868
+ actions: {
1869
+ async setTagsViewRoutes(data) {
1870
+ this.tagsViewRoutes = data;
1871
+ },
1872
+ setCurrenFullscreen(bool) {
1873
+ Session.set("isTagsViewCurrenFull", bool);
1874
+ this.isTagsViewCurrenFull = bool;
1875
+ }
1837
1876
  }
1838
- };
1877
+ });
1839
1878
 
1840
1879
  const useThemeConfig = pinia$1.defineStore("themeConfig", {
1841
1880
  state: () => ({
@@ -2001,6 +2040,44 @@
2001
2040
  }
2002
2041
  });
2003
2042
 
2043
+ const setWatermark = (str) => {
2044
+ const id = "1.23452384164.123412416";
2045
+ if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id));
2046
+ const can = document.createElement("canvas");
2047
+ can.width = 400;
2048
+ can.height = 200;
2049
+ const cans = can.getContext("2d");
2050
+ cans.rotate(-20 * Math.PI / 180);
2051
+ cans.font = "12px Vedana";
2052
+ cans.fillStyle = "rgba(200, 200, 200, 0.30)";
2053
+ cans.textBaseline = "middle";
2054
+ cans.fillText(str, can.width / 10, can.height, can.width);
2055
+ const div = document.createElement("div");
2056
+ div.id = id;
2057
+ div.style.pointerEvents = "none";
2058
+ div.style.top = "0px";
2059
+ div.style.left = "0px";
2060
+ div.style.position = "fixed";
2061
+ div.style.zIndex = "10000000";
2062
+ div.style.width = `${document.documentElement.clientWidth}px`;
2063
+ div.style.height = `${document.documentElement.clientHeight}px`;
2064
+ div.style.background = `url(${can.toDataURL("image/png")}) left top repeat`;
2065
+ document.body.appendChild(div);
2066
+ return id;
2067
+ };
2068
+ const watermark = {
2069
+ // 设置水印
2070
+ set: (str) => {
2071
+ let id = setWatermark(str);
2072
+ if (document.getElementById(id) === null) id = setWatermark(str);
2073
+ },
2074
+ // 删除水印
2075
+ del: () => {
2076
+ let id = "1.23452384164.123412416";
2077
+ if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id));
2078
+ }
2079
+ };
2080
+
2004
2081
  const useBaseApi = (module, options = {}) => {
2005
2082
  const baseUrl = `/api/${module}/`;
2006
2083
  const request = (config, cancel = false) => {
@@ -18592,83 +18669,6 @@
18592
18669
  }));
18593
18670
  };
18594
18671
 
18595
- const useKeepALiveNames = pinia$1.defineStore("keepALiveNames", {
18596
- state: () => ({
18597
- keepAliveNames: [],
18598
- cachedViews: []
18599
- }),
18600
- actions: {
18601
- async setCacheKeepAlive(data) {
18602
- this.keepAliveNames = data;
18603
- },
18604
- async addCachedView(view) {
18605
- var _a;
18606
- if (view.meta.isKeepAlive) (_a = this.cachedViews) == null ? void 0 : _a.push(view.name);
18607
- },
18608
- async delCachedView(view) {
18609
- const index = this.cachedViews.indexOf(view.name);
18610
- if (index > -1) this.cachedViews.splice(index, 1);
18611
- },
18612
- async delOthersCachedViews(view) {
18613
- if (view.meta.isKeepAlive) this.cachedViews = [view.name];
18614
- else this.cachedViews = [];
18615
- },
18616
- async delAllCachedViews() {
18617
- this.cachedViews = [];
18618
- }
18619
- }
18620
- });
18621
-
18622
- const useRequestOldRoutes = pinia$1.defineStore("requestOldRoutes", {
18623
- state: () => ({
18624
- requestOldRoutes: []
18625
- }),
18626
- actions: {
18627
- async setRequestOldRoutes(routes) {
18628
- this.requestOldRoutes = routes;
18629
- }
18630
- }
18631
- });
18632
-
18633
- const useRoutesList = pinia$1.defineStore("routesList", {
18634
- state: () => ({
18635
- routesList: [],
18636
- isColumnsMenuHover: false,
18637
- isColumnsNavHover: false,
18638
- currentRoute: null
18639
- }),
18640
- actions: {
18641
- setCurrentRoute(route) {
18642
- this.currentRoute = route;
18643
- },
18644
- async setRoutesList(data) {
18645
- this.routesList = data;
18646
- },
18647
- async setColumnsMenuHover(bool) {
18648
- this.isColumnsMenuHover = bool;
18649
- },
18650
- async setColumnsNavHover(bool) {
18651
- this.isColumnsNavHover = bool;
18652
- }
18653
- }
18654
- });
18655
-
18656
- const useTagsViewRoutes = pinia$1.defineStore("tagsViewRoutes", {
18657
- state: () => ({
18658
- tagsViewRoutes: [],
18659
- isTagsViewCurrenFull: false
18660
- }),
18661
- actions: {
18662
- async setTagsViewRoutes(data) {
18663
- this.tagsViewRoutes = data;
18664
- },
18665
- setCurrenFullscreen(bool) {
18666
- Session.set("isTagsViewCurrenFull", bool);
18667
- this.isTagsViewCurrenFull = bool;
18668
- }
18669
- }
18670
- });
18671
-
18672
18672
  function auth(value) {
18673
18673
  const stores = useUserInfo();
18674
18674
  return stores.userInfos.authApiList.some((v) => v === value);
@@ -22439,7 +22439,7 @@
22439
22439
  name: "FLayout"
22440
22440
  },
22441
22441
  __name: "index",
22442
- emits: ["layoutChangePassword", "layoutOnlineUsers", "layoutSearchMenu"],
22442
+ emits: ["layoutChangePassword", "layoutOnlineUsers", "layoutSearchMenu", "layoutSetBrowserTitle", "layoutSetOpenLink"],
22443
22443
  setup(__props, { emit: __emit }) {
22444
22444
  const layouts = {
22445
22445
  defaults: vue.defineAsyncComponent(() => Promise.resolve().then(function () { return defaults; })),
@@ -22459,6 +22459,10 @@
22459
22459
  curMyEmit("layoutOnlineUsers");
22460
22460
  } else if (data.name == "searchFormMenu") {
22461
22461
  curMyEmit("layoutSearchMenu");
22462
+ } else if (data.name == "setFBrowserTitle") {
22463
+ curMyEmit("layoutSetBrowserTitle");
22464
+ } else if (data.name == "setFOpenLink") {
22465
+ curMyEmit("layoutSetOpenLink", data);
22462
22466
  }
22463
22467
  }
22464
22468
  });
@@ -22688,23 +22692,6 @@
22688
22692
  };
22689
22693
  }
22690
22694
 
22691
- const { proxy } = vue.getCurrentInstance();
22692
- function useTitle() {
22693
- const stores = useThemeConfig(pinia);
22694
- const { themeConfig } = pinia$1.storeToRefs(stores);
22695
- const router = proxy.$mycurRouter;
22696
- vue.nextTick(() => {
22697
- let webTitle = "";
22698
- let globalTitle = themeConfig.value.globalTitle;
22699
- const { path, meta } = router.currentRoute.value;
22700
- if (path === "/login") {
22701
- webTitle = meta.title;
22702
- } else {
22703
- webTitle = setTagsViewNameI18n(router.currentRoute.value);
22704
- }
22705
- document.title = `${webTitle} - ${globalTitle}` || globalTitle;
22706
- });
22707
- }
22708
22695
  function setTagsViewNameI18n(item) {
22709
22696
  let tagsViewName = "";
22710
22697
  const { query, params, meta } = item;
@@ -22780,21 +22767,13 @@
22780
22767
  }
22781
22768
  return arr;
22782
22769
  }
22783
- function handleOpenLink(val) {
22784
- var _a, _b, _c;
22785
- const { origin, pathname } = window.location;
22786
- const router = proxy.$mycurRouter;
22787
- router.push(val.path);
22788
- if (verifyUrl((_a = val.meta) == null ? void 0 : _a.isLink)) window.open((_b = val.meta) == null ? void 0 : _b.isLink);
22789
- else window.open(`${origin}${pathname}#${(_c = val.meta) == null ? void 0 : _c.isLink}`);
22790
- }
22791
22770
  const other = {
22792
22771
  // elSvg: (app: App) => {
22793
22772
  // elSvg(app);
22794
22773
  // },
22795
- useTitle: () => {
22796
- useTitle();
22797
- },
22774
+ // useTitle: () => {
22775
+ // useTitle();
22776
+ // },
22798
22777
  setTagsViewNameI18n(route) {
22799
22778
  return setTagsViewNameI18n(route);
22800
22779
  },
@@ -22812,10 +22791,10 @@
22812
22791
  },
22813
22792
  handleEmpty: (list) => {
22814
22793
  return handleEmpty(list);
22815
- },
22816
- handleOpenLink: (val) => {
22817
- handleOpenLink(val);
22818
22794
  }
22795
+ // handleOpenLink: (val: RouteItem) => {
22796
+ // handleOpenLink(val);
22797
+ // },
22819
22798
  };
22820
22799
 
22821
22800
  const _hoisted_1$i = { class: "layout-breadcrumb-seting" };
@@ -26381,6 +26360,7 @@
26381
26360
  setup(__props) {
26382
26361
  const SubItem = vue.defineAsyncComponent(() => Promise.resolve().then(function () { return subItem; }));
26383
26362
  const props = __props;
26363
+ const events = useFormEvents();
26384
26364
  const storesThemeConfig = useThemeConfig();
26385
26365
  const { themeConfig } = pinia$1.storeToRefs(storesThemeConfig);
26386
26366
  const route = vueRouter.useRoute();
@@ -26402,7 +26382,10 @@
26402
26382
  else return path;
26403
26383
  };
26404
26384
  const onALinkClick = (val) => {
26405
- other.handleOpenLink(val);
26385
+ events.onFormDialogOpen({
26386
+ name: "setFOpenLink",
26387
+ data: val
26388
+ });
26406
26389
  };
26407
26390
  vue.onMounted(() => {
26408
26391
  state.defaultActive = setParentHighlight(route);
@@ -26900,11 +26883,15 @@
26900
26883
  },
26901
26884
  setup(__props) {
26902
26885
  const props = __props;
26886
+ const events = useFormEvents();
26903
26887
  const chils = vue.computed(() => {
26904
26888
  return props.chil;
26905
26889
  });
26906
26890
  const onALinkClick = (val) => {
26907
- other.handleOpenLink(val);
26891
+ events.onFormDialogOpen({
26892
+ name: "setFOpenLink",
26893
+ data: val
26894
+ });
26908
26895
  };
26909
26896
  return (_ctx, _cache) => {
26910
26897
  const _component_SvgIcon = vue.resolveComponent("SvgIcon");
@@ -27529,7 +27516,9 @@
27529
27516
  Local.set("themeConfig", themeConfig.value);
27530
27517
  currentCountryCode.value = getCountryCode(lang);
27531
27518
  locale.value = lang;
27532
- other.useTitle();
27519
+ events.onFormDialogOpen({
27520
+ name: "setFBrowserTitle"
27521
+ });
27533
27522
  initI18nOrSize("globalI18n", "disabledI18n");
27534
27523
  refreshCurrentTabpage();
27535
27524
  if (lang == "en") window.$changeLang("en");
@@ -28129,8 +28118,12 @@
28129
28118
  else state.defaultActive = path;
28130
28119
  }
28131
28120
  };
28121
+ const events = useFormEvents();
28132
28122
  const onALinkClick = (val) => {
28133
- other.handleOpenLink(val);
28123
+ events.onFormDialogOpen({
28124
+ name: "setFOpenLink",
28125
+ data: val
28126
+ });
28134
28127
  };
28135
28128
  vue.onBeforeMount(() => {
28136
28129
  setCurrentRouterHighlight(route);
@@ -28647,6 +28640,7 @@
28647
28640
  exports.orgId = orgId;
28648
28641
  exports.orgName = orgName;
28649
28642
  exports.other = other;
28643
+ exports.pinia = pinia;
28650
28644
  exports.posId = posId;
28651
28645
  exports.posName = posName;
28652
28646
  exports.provideFormEvents = provideFormEvents;