inl-ui 0.1.83 → 0.1.85

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.
@@ -537,11 +537,11 @@ function useMicroApp(appList) {
537
537
  const route = vueRouter.useRoute();
538
538
  const loadAppList = vue.ref(Array.from(loadedApp.values()));
539
539
  const appContainerList = vue.ref([]);
540
- const handleRouteChange = core.useThrottleFn(async () => {
541
- const route2 = vueRouter.useRoute();
542
- const microAppName = route2.path.split("/")[1];
540
+ const handleRouteChange = async newRoute => {
541
+ const microAppName = newRoute.path.split("/")[1];
543
542
  let microAppDefine = appList.find(item => item.name === microAppName);
544
- console.log(555555555555555, microAppName);
543
+ if (!microAppDefine && !microAppName.startsWith("mtip-")) return;
544
+ console.log(555555555555555, newRoute.path);
545
545
  const domId = `microApp_${microAppName}`;
546
546
  if (!appContainerList.value.some(item => item.id === domId)) {
547
547
  appContainerList.value.push({
@@ -570,7 +570,7 @@ function useMicroApp(appList) {
570
570
  loadAppList.value.push(microApp);
571
571
  loadedApp.set(microAppName, microApp);
572
572
  await app.mountPromise;
573
- }, 100);
573
+ };
574
574
  vue.watch(route, handleRouteChange, {
575
575
  immediate: true
576
576
  });
@@ -583,10 +583,8 @@ function useMicroApp(appList) {
583
583
  function useActiveApp() {
584
584
  const route = vueRouter.useRoute();
585
585
  const activeAppName = vue.computed(() => {
586
- console.log(4444444444, route);
587
586
  return route.path.split("/")[1];
588
587
  });
589
- console.log(45454545454, activeAppName);
590
588
  return activeAppName;
591
589
  }
592
590
 
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, createVNode, ref, watch, resolveComponent, isVNode, onBeforeUnmount, computed, 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, useThrottleFn, useLocalStorage, useFullscreen, useMouseInElement, useVModel, useMagicKeys, whenever, watchArray, useEventListener, useSessionStorage, useElementBounding, useToggle, useMemory, useWindowSize, useClipboard, useBreakpoints, breakpointsAntDesign } from '@vueuse/core';
4
+ import { useMounted, resolveRef, 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';
@@ -509,11 +509,11 @@ function useMicroApp(appList) {
509
509
  const route = useRoute();
510
510
  const loadAppList = ref(Array.from(loadedApp.values()));
511
511
  const appContainerList = ref([]);
512
- const handleRouteChange = useThrottleFn(async () => {
513
- const route2 = useRoute();
514
- const microAppName = route2.path.split("/")[1];
512
+ const handleRouteChange = async newRoute => {
513
+ const microAppName = newRoute.path.split("/")[1];
515
514
  let microAppDefine = appList.find(item => item.name === microAppName);
516
- console.log(555555555555555, microAppName);
515
+ if (!microAppDefine && !microAppName.startsWith("mtip-")) return;
516
+ console.log(555555555555555, newRoute.path);
517
517
  const domId = `microApp_${microAppName}`;
518
518
  if (!appContainerList.value.some(item => item.id === domId)) {
519
519
  appContainerList.value.push({
@@ -542,7 +542,7 @@ function useMicroApp(appList) {
542
542
  loadAppList.value.push(microApp);
543
543
  loadedApp.set(microAppName, microApp);
544
544
  await app.mountPromise;
545
- }, 100);
545
+ };
546
546
  watch(route, handleRouteChange, {
547
547
  immediate: true
548
548
  });
@@ -555,10 +555,8 @@ function useMicroApp(appList) {
555
555
  function useActiveApp() {
556
556
  const route = useRoute();
557
557
  const activeAppName = computed(() => {
558
- console.log(4444444444, route);
559
558
  return route.path.split("/")[1];
560
559
  });
561
- console.log(45454545454, activeAppName);
562
560
  return activeAppName;
563
561
  }
564
562
 
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.82";
46
+ var version = "0.1.84";
47
47
 
48
48
  const setTheme = theme => {
49
49
  if (theme === "dark") {
@@ -7647,11 +7647,11 @@ function useMicroApp(appList) {
7647
7647
  const route = vueRouter.useRoute();
7648
7648
  const loadAppList = vue.ref(Array.from(loadedApp.values()));
7649
7649
  const appContainerList = vue.ref([]);
7650
- const handleRouteChange = core.useThrottleFn(async () => {
7651
- const route2 = vueRouter.useRoute();
7652
- const microAppName = route2.path.split("/")[1];
7650
+ const handleRouteChange = async newRoute => {
7651
+ const microAppName = newRoute.path.split("/")[1];
7653
7652
  let microAppDefine = appList.find(item => item.name === microAppName);
7654
- console.log(555555555555555, microAppName);
7653
+ if (!microAppDefine && !microAppName.startsWith("mtip-")) return;
7654
+ console.log(555555555555555, newRoute.path);
7655
7655
  const domId = `microApp_${microAppName}`;
7656
7656
  if (!appContainerList.value.some(item => item.id === domId)) {
7657
7657
  appContainerList.value.push({
@@ -7680,7 +7680,7 @@ function useMicroApp(appList) {
7680
7680
  loadAppList.value.push(microApp);
7681
7681
  loadedApp.set(microAppName, microApp);
7682
7682
  await app.mountPromise;
7683
- }, 100);
7683
+ };
7684
7684
  vue.watch(route, handleRouteChange, {
7685
7685
  immediate: true
7686
7686
  });
@@ -7693,10 +7693,8 @@ function useMicroApp(appList) {
7693
7693
  function useActiveApp() {
7694
7694
  const route = vueRouter.useRoute();
7695
7695
  const activeAppName = vue.computed(() => {
7696
- console.log(4444444444, route);
7697
7696
  return route.path.split("/")[1];
7698
7697
  });
7699
- console.log(45454545454, activeAppName);
7700
7698
  return activeAppName;
7701
7699
  }
7702
7700
 
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.82";
14
+ var version = "0.1.84";
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, useThrottleFn, 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, 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.82";
16
+ var version = "0.1.84";
17
17
 
18
18
  const setTheme = theme => {
19
19
  if (theme === "dark") {
@@ -7617,11 +7617,11 @@ function useMicroApp(appList) {
7617
7617
  const route = useRoute();
7618
7618
  const loadAppList = ref(Array.from(loadedApp.values()));
7619
7619
  const appContainerList = ref([]);
7620
- const handleRouteChange = useThrottleFn(async () => {
7621
- const route2 = useRoute();
7622
- const microAppName = route2.path.split("/")[1];
7620
+ const handleRouteChange = async newRoute => {
7621
+ const microAppName = newRoute.path.split("/")[1];
7623
7622
  let microAppDefine = appList.find(item => item.name === microAppName);
7624
- console.log(555555555555555, microAppName);
7623
+ if (!microAppDefine && !microAppName.startsWith("mtip-")) return;
7624
+ console.log(555555555555555, newRoute.path);
7625
7625
  const domId = `microApp_${microAppName}`;
7626
7626
  if (!appContainerList.value.some(item => item.id === domId)) {
7627
7627
  appContainerList.value.push({
@@ -7650,7 +7650,7 @@ function useMicroApp(appList) {
7650
7650
  loadAppList.value.push(microApp);
7651
7651
  loadedApp.set(microAppName, microApp);
7652
7652
  await app.mountPromise;
7653
- }, 100);
7653
+ };
7654
7654
  watch(route, handleRouteChange, {
7655
7655
  immediate: true
7656
7656
  });
@@ -7663,10 +7663,8 @@ function useMicroApp(appList) {
7663
7663
  function useActiveApp() {
7664
7664
  const route = useRoute();
7665
7665
  const activeAppName = computed(() => {
7666
- console.log(4444444444, route);
7667
7666
  return route.path.split("/")[1];
7668
7667
  });
7669
- console.log(45454545454, activeAppName);
7670
7668
  return activeAppName;
7671
7669
  }
7672
7670
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inl-ui",
3
- "version": "0.1.83",
3
+ "version": "0.1.85",
4
4
  "description": "工业 pc ui库",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",