inl-ui 0.1.89 → 0.1.90

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.
@@ -543,13 +543,13 @@ function useActiveApp() {
543
543
  const loadedApp = /* @__PURE__ */new Map();
544
544
  function useMicroApp(appList) {
545
545
  const route = vueRouter.useRoute();
546
- useActiveApp();
546
+ const activeAppName = useActiveApp();
547
547
  const loadAppList = vue.ref(Array.from(loadedApp.values()));
548
548
  const appContainerList = vue.ref([]);
549
- const handleRouteChange = val => {
550
- const microAppName = val;
549
+ const handleRouteChange = core.useThrottleFn(async () => {
550
+ const microAppName = activeAppName.value;
551
551
  let microAppDefine = appList.find(item => item.name === microAppName);
552
- if (!microAppDefine) return;
552
+ if (!microAppDefine && !microAppName.startsWith("mtip-") && !microAppName.startsWith("innovateDept-")) return;
553
553
  const domId = `microApp_${microAppName}`;
554
554
  if (!appContainerList.value.some(item => item.id === domId)) {
555
555
  appContainerList.value.push({
@@ -577,8 +577,8 @@ function useMicroApp(appList) {
577
577
  };
578
578
  loadAppList.value.push(microApp);
579
579
  loadedApp.set(microAppName, microApp);
580
- app.mountPromise;
581
- };
580
+ await app.mountPromise;
581
+ }, 100);
582
582
  vue.watch(route, handleRouteChange, {
583
583
  immediate: true
584
584
  });
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, createVNode, ref, watch, resolveComponent, isVNode, computed, onBeforeUnmount, inject, onActivated, onDeactivated, nextTick, watchEffect, Fragment, withDirectives, vShow, toRaw, reactive, provide, createTextVNode, onMounted, KeepAlive, shallowRef, onBeforeMount, mergeProps, onBeforeUpdate, Teleport } from 'vue';
2
2
  import { createFromIconfontCN, SearchOutlined, DownOutlined, PoweroffOutlined, MenuUnfoldOutlined, MenuFoldOutlined, SkinFilled, FullscreenOutlined, CaretUpOutlined, CaretRightOutlined, CaretDownOutlined, FileExcelTwoTone, InboxOutlined, MessageOutlined } from '@ant-design/icons-vue';
3
3
  import { useRoute, useRouter } from 'vue-router';
4
- import { useMounted, resolveRef, useLocalStorage, useFullscreen, useMouseInElement, useVModel, useMagicKeys, whenever, watchArray, useEventListener, useSessionStorage, useElementBounding, useToggle, useMemory, useWindowSize, useClipboard, useBreakpoints, breakpointsAntDesign } from '@vueuse/core';
4
+ import { useMounted, resolveRef, useThrottleFn, useLocalStorage, useFullscreen, useMouseInElement, useVModel, useMagicKeys, whenever, watchArray, useEventListener, useSessionStorage, useElementBounding, useToggle, useMemory, useWindowSize, useClipboard, useBreakpoints, breakpointsAntDesign } from '@vueuse/core';
5
5
  import axios$2 from 'axios';
6
6
  import { message, Menu, MenuItem, Input as Input$1, Badge, Avatar as Avatar$1, MenuDivider, Modal, SubMenu, Dropdown, Tooltip, Select, LayoutHeader, LayoutSider, Layout as Layout$1, LayoutContent, Form, Row, Col, FormItem, SelectOption, Switch, InputNumber } from 'ant-design-vue';
7
7
  import _, { isPlainObject as isPlainObject$1, omit, differenceBy, cloneDeep, isObject as isObject$2, concat } from 'lodash';
@@ -515,13 +515,13 @@ function useActiveApp() {
515
515
  const loadedApp = /* @__PURE__ */new Map();
516
516
  function useMicroApp(appList) {
517
517
  const route = useRoute();
518
- useActiveApp();
518
+ const activeAppName = useActiveApp();
519
519
  const loadAppList = ref(Array.from(loadedApp.values()));
520
520
  const appContainerList = ref([]);
521
- const handleRouteChange = val => {
522
- const microAppName = val;
521
+ const handleRouteChange = useThrottleFn(async () => {
522
+ const microAppName = activeAppName.value;
523
523
  let microAppDefine = appList.find(item => item.name === microAppName);
524
- if (!microAppDefine) return;
524
+ if (!microAppDefine && !microAppName.startsWith("mtip-") && !microAppName.startsWith("innovateDept-")) return;
525
525
  const domId = `microApp_${microAppName}`;
526
526
  if (!appContainerList.value.some(item => item.id === domId)) {
527
527
  appContainerList.value.push({
@@ -549,8 +549,8 @@ function useMicroApp(appList) {
549
549
  };
550
550
  loadAppList.value.push(microApp);
551
551
  loadedApp.set(microAppName, microApp);
552
- app.mountPromise;
553
- };
552
+ await app.mountPromise;
553
+ }, 100);
554
554
  watch(route, handleRouteChange, {
555
555
  immediate: true
556
556
  });
package/dist/index.cjs CHANGED
@@ -43,7 +43,7 @@ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$2);
43
43
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
44
44
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
45
45
 
46
- var version = "0.1.88";
46
+ var version = "0.1.89";
47
47
 
48
48
  const setTheme = theme => {
49
49
  if (theme === "dark") {
@@ -7653,13 +7653,13 @@ function useActiveApp() {
7653
7653
  const loadedApp = /* @__PURE__ */new Map();
7654
7654
  function useMicroApp(appList) {
7655
7655
  const route = vueRouter.useRoute();
7656
- useActiveApp();
7656
+ const activeAppName = useActiveApp();
7657
7657
  const loadAppList = vue.ref(Array.from(loadedApp.values()));
7658
7658
  const appContainerList = vue.ref([]);
7659
- const handleRouteChange = val => {
7660
- const microAppName = val;
7659
+ const handleRouteChange = core.useThrottleFn(async () => {
7660
+ const microAppName = activeAppName.value;
7661
7661
  let microAppDefine = appList.find(item => item.name === microAppName);
7662
- if (!microAppDefine) return;
7662
+ if (!microAppDefine && !microAppName.startsWith("mtip-") && !microAppName.startsWith("innovateDept-")) return;
7663
7663
  const domId = `microApp_${microAppName}`;
7664
7664
  if (!appContainerList.value.some(item => item.id === domId)) {
7665
7665
  appContainerList.value.push({
@@ -7687,8 +7687,8 @@ function useMicroApp(appList) {
7687
7687
  };
7688
7688
  loadAppList.value.push(microApp);
7689
7689
  loadedApp.set(microAppName, microApp);
7690
- app.mountPromise;
7691
- };
7690
+ await app.mountPromise;
7691
+ }, 100);
7692
7692
  vue.watch(route, handleRouteChange, {
7693
7693
  immediate: true
7694
7694
  });
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { Key } from 'ant-design-vue/lib/table/interface';
11
11
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
12
12
  import * as _ant_design_icons_vue_lib_components_IconFont from '@ant-design/icons-vue/lib/components/IconFont';
13
13
 
14
- var version = "0.1.88";
14
+ var version = "0.1.89";
15
15
 
16
16
  declare const _default$p: {
17
17
  set(theme: string): void;
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { defineComponent, createVNode, createApp, ref, watch, reactive, computed
4
4
  import axios$2 from 'axios';
5
5
  import { message, Menu, MenuItem, Input as Input$1, Badge, Avatar as Avatar$1, MenuDivider, Modal, SubMenu, Dropdown, Tooltip, Select, LayoutHeader, LayoutSider, Layout as Layout$1, LayoutContent, Form, Row, Col, FormItem, SelectOption, Switch, InputNumber } from 'ant-design-vue';
6
6
  import _, { isPlainObject as isPlainObject$1, omit, cloneDeep, differenceBy, isObject as isObject$2, concat } from 'lodash';
7
- import { useIntervalFn, useEventBus, resolveRef, useEventListener, useMounted, useLocalStorage, useFullscreen, useMouseInElement, useVModel, useMagicKeys, whenever, watchArray, useSessionStorage, useElementBounding, useToggle, useMemory, useWindowSize, useClipboard, useBreakpoints, breakpointsAntDesign } from '@vueuse/core';
7
+ import { useIntervalFn, useEventBus, resolveRef, useEventListener, useMounted, useThrottleFn, useLocalStorage, useFullscreen, useMouseInElement, useVModel, useMagicKeys, whenever, watchArray, useSessionStorage, useElementBounding, useToggle, useMemory, useWindowSize, useClipboard, useBreakpoints, breakpointsAntDesign } from '@vueuse/core';
8
8
  import dayjs from 'dayjs';
9
9
  import { useRouter, useRoute } from 'vue-router';
10
10
  import { createFromIconfontCN, SearchOutlined, DownOutlined, PoweroffOutlined, MenuUnfoldOutlined, MenuFoldOutlined, SkinFilled, FullscreenOutlined, CaretUpOutlined, CaretRightOutlined, CaretDownOutlined, FileExcelTwoTone, InboxOutlined, MessageOutlined } from '@ant-design/icons-vue';
@@ -13,7 +13,7 @@ import { XPopup, CommentBlock, setAxiosOption } from '@sszj-temp/mobile';
13
13
  import { marked } from 'marked';
14
14
  import '@sszj-temp/mobile/style.css';
15
15
 
16
- var version = "0.1.88";
16
+ var version = "0.1.89";
17
17
 
18
18
  const setTheme = theme => {
19
19
  if (theme === "dark") {
@@ -7623,13 +7623,13 @@ function useActiveApp() {
7623
7623
  const loadedApp = /* @__PURE__ */new Map();
7624
7624
  function useMicroApp(appList) {
7625
7625
  const route = useRoute();
7626
- useActiveApp();
7626
+ const activeAppName = useActiveApp();
7627
7627
  const loadAppList = ref(Array.from(loadedApp.values()));
7628
7628
  const appContainerList = ref([]);
7629
- const handleRouteChange = val => {
7630
- const microAppName = val;
7629
+ const handleRouteChange = useThrottleFn(async () => {
7630
+ const microAppName = activeAppName.value;
7631
7631
  let microAppDefine = appList.find(item => item.name === microAppName);
7632
- if (!microAppDefine) return;
7632
+ if (!microAppDefine && !microAppName.startsWith("mtip-") && !microAppName.startsWith("innovateDept-")) return;
7633
7633
  const domId = `microApp_${microAppName}`;
7634
7634
  if (!appContainerList.value.some(item => item.id === domId)) {
7635
7635
  appContainerList.value.push({
@@ -7657,8 +7657,8 @@ function useMicroApp(appList) {
7657
7657
  };
7658
7658
  loadAppList.value.push(microApp);
7659
7659
  loadedApp.set(microAppName, microApp);
7660
- app.mountPromise;
7661
- };
7660
+ await app.mountPromise;
7661
+ }, 100);
7662
7662
  watch(route, handleRouteChange, {
7663
7663
  immediate: true
7664
7664
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inl-ui",
3
- "version": "0.1.89",
3
+ "version": "0.1.90",
4
4
  "description": "工业 pc ui库",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",