inl-ui 0.1.104 → 0.1.105

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.
@@ -602,7 +602,9 @@ function onAddExtraTabs(handler) {
602
602
  handler(added.map(item => ({
603
603
  ...item,
604
604
  type: "extraTab"
605
- })));
605
+ })), "add");
606
+ } else {
607
+ handler(val, "update");
606
608
  }
607
609
  }, {
608
610
  deep: true,
@@ -6890,7 +6892,6 @@ const TabList = vue.defineComponent({
6890
6892
  "hide-border": activeTabIndex.value === index || activeTabIndex.value - 1 === index
6891
6893
  }],
6892
6894
  "onClick": () => {
6893
- console.log("111111111", item);
6894
6895
  emit("tabSelect", item);
6895
6896
  }
6896
6897
  }, [item.icon && vue.createVNode(vue.resolveComponent("icon-font"), {
@@ -7104,7 +7105,6 @@ const PageContent = vue.defineComponent({
7104
7105
  openedTab.params = isFromMenu ? val.params : queryCombine;
7105
7106
  val.params = isFromMenu ? val.params : queryCombine;
7106
7107
  } else {
7107
- console.log("add2222222222", tab);
7108
7108
  tabList.value.push({
7109
7109
  ...tab,
7110
7110
  key: key ?? id,
@@ -7159,7 +7159,6 @@ const PageContent = vue.defineComponent({
7159
7159
  activeKey.value = id ? id : `${key}${uniqueKey}`;
7160
7160
  };
7161
7161
  const onTabSelect = tab => {
7162
- console.log("onTabSelect111111", tab);
7163
7162
  if (tab.isExtra) {
7164
7163
  router.push({
7165
7164
  path: "/",
@@ -7169,7 +7168,6 @@ const PageContent = vue.defineComponent({
7169
7168
  handleMenuChange(tab);
7170
7169
  } else {
7171
7170
  const resolveRes = router.resolve(tab.url);
7172
- console.log(resolveRes, 2222222222);
7173
7171
  router.push({
7174
7172
  path: resolveRes.path,
7175
7173
  query: Object.assign(resolveRes.query, tab.params)
@@ -7231,9 +7229,17 @@ const PageContent = vue.defineComponent({
7231
7229
  });
7232
7230
  }
7233
7231
  });
7234
- onAddExtraTabs(added => {
7235
- console.log("add1111111", added);
7236
- tabList.value.push(...added);
7232
+ onAddExtraTabs((arr, operate) => {
7233
+ if (operate === "add") {
7234
+ tabList.value.push(...arr);
7235
+ } else {
7236
+ tabList.value.forEach(item => {
7237
+ const exist = arr.find(ele => ele.uniqueKey === item.uniqueKey);
7238
+ if (exist) {
7239
+ item.url = exist.url;
7240
+ }
7241
+ });
7242
+ }
7237
7243
  });
7238
7244
  const {
7239
7245
  isFullscreen,
@@ -8735,10 +8741,7 @@ const getDetailContainer = () => vue.defineComponent({
8735
8741
  isExtraTab: true,
8736
8742
  params: ___default["default"].omit(route.query, "name")
8737
8743
  };
8738
- console.log("tab4444444444444444", tab);
8739
- console.log("route4444444444444444", route);
8740
8744
  const detail = detailList.value.find(item => item.uniqueKey === tab.uniqueKey);
8741
- debugger;
8742
8745
  if (detail) {
8743
8746
  detail.url = newRroute.fullPath;
8744
8747
  if (Array.isArray(qiankunState.value.extraTabs)) {
@@ -8776,7 +8779,6 @@ const getDetailContainer = () => vue.defineComponent({
8776
8779
  trailing: false
8777
8780
  });
8778
8781
  vue.watch(() => route, async val => {
8779
- debugger;
8780
8782
  if (!val || route.name.indexOf(props.name) === -1) return;
8781
8783
  addTab(val);
8782
8784
  }, {
@@ -574,7 +574,9 @@ function onAddExtraTabs(handler) {
574
574
  handler(added.map(item => ({
575
575
  ...item,
576
576
  type: "extraTab"
577
- })));
577
+ })), "add");
578
+ } else {
579
+ handler(val, "update");
578
580
  }
579
581
  }, {
580
582
  deep: true,
@@ -6862,7 +6864,6 @@ const TabList = defineComponent({
6862
6864
  "hide-border": activeTabIndex.value === index || activeTabIndex.value - 1 === index
6863
6865
  }],
6864
6866
  "onClick": () => {
6865
- console.log("111111111", item);
6866
6867
  emit("tabSelect", item);
6867
6868
  }
6868
6869
  }, [item.icon && createVNode(resolveComponent("icon-font"), {
@@ -7076,7 +7077,6 @@ const PageContent = defineComponent({
7076
7077
  openedTab.params = isFromMenu ? val.params : queryCombine;
7077
7078
  val.params = isFromMenu ? val.params : queryCombine;
7078
7079
  } else {
7079
- console.log("add2222222222", tab);
7080
7080
  tabList.value.push({
7081
7081
  ...tab,
7082
7082
  key: key ?? id,
@@ -7131,7 +7131,6 @@ const PageContent = defineComponent({
7131
7131
  activeKey.value = id ? id : `${key}${uniqueKey}`;
7132
7132
  };
7133
7133
  const onTabSelect = tab => {
7134
- console.log("onTabSelect111111", tab);
7135
7134
  if (tab.isExtra) {
7136
7135
  router.push({
7137
7136
  path: "/",
@@ -7141,7 +7140,6 @@ const PageContent = defineComponent({
7141
7140
  handleMenuChange(tab);
7142
7141
  } else {
7143
7142
  const resolveRes = router.resolve(tab.url);
7144
- console.log(resolveRes, 2222222222);
7145
7143
  router.push({
7146
7144
  path: resolveRes.path,
7147
7145
  query: Object.assign(resolveRes.query, tab.params)
@@ -7203,9 +7201,17 @@ const PageContent = defineComponent({
7203
7201
  });
7204
7202
  }
7205
7203
  });
7206
- onAddExtraTabs(added => {
7207
- console.log("add1111111", added);
7208
- tabList.value.push(...added);
7204
+ onAddExtraTabs((arr, operate) => {
7205
+ if (operate === "add") {
7206
+ tabList.value.push(...arr);
7207
+ } else {
7208
+ tabList.value.forEach(item => {
7209
+ const exist = arr.find(ele => ele.uniqueKey === item.uniqueKey);
7210
+ if (exist) {
7211
+ item.url = exist.url;
7212
+ }
7213
+ });
7214
+ }
7209
7215
  });
7210
7216
  const {
7211
7217
  isFullscreen,
@@ -8707,10 +8713,7 @@ const getDetailContainer = () => defineComponent({
8707
8713
  isExtraTab: true,
8708
8714
  params: _.omit(route.query, "name")
8709
8715
  };
8710
- console.log("tab4444444444444444", tab);
8711
- console.log("route4444444444444444", route);
8712
8716
  const detail = detailList.value.find(item => item.uniqueKey === tab.uniqueKey);
8713
- debugger;
8714
8717
  if (detail) {
8715
8718
  detail.url = newRroute.fullPath;
8716
8719
  if (Array.isArray(qiankunState.value.extraTabs)) {
@@ -8748,7 +8751,6 @@ const getDetailContainer = () => defineComponent({
8748
8751
  trailing: false
8749
8752
  });
8750
8753
  watch(() => route, async val => {
8751
- debugger;
8752
8754
  if (!val || route.name.indexOf(props.name) === -1) return;
8753
8755
  addTab(val);
8754
8756
  }, {
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.103";
46
+ var version = "0.1.104";
47
47
 
48
48
  const setTheme = theme => {
49
49
  if (theme === "dark") {
@@ -7712,7 +7712,9 @@ function onAddExtraTabs(handler) {
7712
7712
  handler(added.map(item => ({
7713
7713
  ...item,
7714
7714
  type: "extraTab"
7715
- })));
7715
+ })), "add");
7716
+ } else {
7717
+ handler(val, "update");
7716
7718
  }
7717
7719
  }, {
7718
7720
  deep: true,
@@ -8045,7 +8047,6 @@ const TabList = vue.defineComponent({
8045
8047
  "hide-border": activeTabIndex.value === index || activeTabIndex.value - 1 === index
8046
8048
  }],
8047
8049
  "onClick": () => {
8048
- console.log("111111111", item);
8049
8050
  emit("tabSelect", item);
8050
8051
  }
8051
8052
  }, [item.icon && vue.createVNode(vue.resolveComponent("icon-font"), {
@@ -8259,7 +8260,6 @@ const PageContent = vue.defineComponent({
8259
8260
  openedTab.params = isFromMenu ? val.params : queryCombine;
8260
8261
  val.params = isFromMenu ? val.params : queryCombine;
8261
8262
  } else {
8262
- console.log("add2222222222", tab);
8263
8263
  tabList.value.push({
8264
8264
  ...tab,
8265
8265
  key: key ?? id,
@@ -8314,7 +8314,6 @@ const PageContent = vue.defineComponent({
8314
8314
  activeKey.value = id ? id : `${key}${uniqueKey}`;
8315
8315
  };
8316
8316
  const onTabSelect = tab => {
8317
- console.log("onTabSelect111111", tab);
8318
8317
  if (tab.isExtra) {
8319
8318
  router.push({
8320
8319
  path: "/",
@@ -8324,7 +8323,6 @@ const PageContent = vue.defineComponent({
8324
8323
  handleMenuChange(tab);
8325
8324
  } else {
8326
8325
  const resolveRes = router.resolve(tab.url);
8327
- console.log(resolveRes, 2222222222);
8328
8326
  router.push({
8329
8327
  path: resolveRes.path,
8330
8328
  query: Object.assign(resolveRes.query, tab.params)
@@ -8386,9 +8384,17 @@ const PageContent = vue.defineComponent({
8386
8384
  });
8387
8385
  }
8388
8386
  });
8389
- onAddExtraTabs(added => {
8390
- console.log("add1111111", added);
8391
- tabList.value.push(...added);
8387
+ onAddExtraTabs((arr, operate) => {
8388
+ if (operate === "add") {
8389
+ tabList.value.push(...arr);
8390
+ } else {
8391
+ tabList.value.forEach(item => {
8392
+ const exist = arr.find(ele => ele.uniqueKey === item.uniqueKey);
8393
+ if (exist) {
8394
+ item.url = exist.url;
8395
+ }
8396
+ });
8397
+ }
8392
8398
  });
8393
8399
  const {
8394
8400
  isFullscreen,
@@ -9721,10 +9727,7 @@ const getDetailContainer = () => vue.defineComponent({
9721
9727
  isExtraTab: true,
9722
9728
  params: ___default["default"].omit(route.query, "name")
9723
9729
  };
9724
- console.log("tab4444444444444444", tab);
9725
- console.log("route4444444444444444", route);
9726
9730
  const detail = detailList.value.find(item => item.uniqueKey === tab.uniqueKey);
9727
- debugger;
9728
9731
  if (detail) {
9729
9732
  detail.url = newRroute.fullPath;
9730
9733
  if (Array.isArray(qiankunState.value.extraTabs)) {
@@ -9762,7 +9765,6 @@ const getDetailContainer = () => vue.defineComponent({
9762
9765
  trailing: false
9763
9766
  });
9764
9767
  vue.watch(() => route, async val => {
9765
- debugger;
9766
9768
  if (!val || route.name.indexOf(props.name) === -1) return;
9767
9769
  addTab(val);
9768
9770
  }, {
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.103";
14
+ var version = "0.1.104";
15
15
 
16
16
  declare const _default$p: {
17
17
  set(theme: string): void;
package/dist/index.js CHANGED
@@ -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.103";
16
+ var version = "0.1.104";
17
17
 
18
18
  const setTheme = theme => {
19
19
  if (theme === "dark") {
@@ -7682,7 +7682,9 @@ function onAddExtraTabs(handler) {
7682
7682
  handler(added.map(item => ({
7683
7683
  ...item,
7684
7684
  type: "extraTab"
7685
- })));
7685
+ })), "add");
7686
+ } else {
7687
+ handler(val, "update");
7686
7688
  }
7687
7689
  }, {
7688
7690
  deep: true,
@@ -8015,7 +8017,6 @@ const TabList = defineComponent({
8015
8017
  "hide-border": activeTabIndex.value === index || activeTabIndex.value - 1 === index
8016
8018
  }],
8017
8019
  "onClick": () => {
8018
- console.log("111111111", item);
8019
8020
  emit("tabSelect", item);
8020
8021
  }
8021
8022
  }, [item.icon && createVNode(resolveComponent("icon-font"), {
@@ -8229,7 +8230,6 @@ const PageContent = defineComponent({
8229
8230
  openedTab.params = isFromMenu ? val.params : queryCombine;
8230
8231
  val.params = isFromMenu ? val.params : queryCombine;
8231
8232
  } else {
8232
- console.log("add2222222222", tab);
8233
8233
  tabList.value.push({
8234
8234
  ...tab,
8235
8235
  key: key ?? id,
@@ -8284,7 +8284,6 @@ const PageContent = defineComponent({
8284
8284
  activeKey.value = id ? id : `${key}${uniqueKey}`;
8285
8285
  };
8286
8286
  const onTabSelect = tab => {
8287
- console.log("onTabSelect111111", tab);
8288
8287
  if (tab.isExtra) {
8289
8288
  router.push({
8290
8289
  path: "/",
@@ -8294,7 +8293,6 @@ const PageContent = defineComponent({
8294
8293
  handleMenuChange(tab);
8295
8294
  } else {
8296
8295
  const resolveRes = router.resolve(tab.url);
8297
- console.log(resolveRes, 2222222222);
8298
8296
  router.push({
8299
8297
  path: resolveRes.path,
8300
8298
  query: Object.assign(resolveRes.query, tab.params)
@@ -8356,9 +8354,17 @@ const PageContent = defineComponent({
8356
8354
  });
8357
8355
  }
8358
8356
  });
8359
- onAddExtraTabs(added => {
8360
- console.log("add1111111", added);
8361
- tabList.value.push(...added);
8357
+ onAddExtraTabs((arr, operate) => {
8358
+ if (operate === "add") {
8359
+ tabList.value.push(...arr);
8360
+ } else {
8361
+ tabList.value.forEach(item => {
8362
+ const exist = arr.find(ele => ele.uniqueKey === item.uniqueKey);
8363
+ if (exist) {
8364
+ item.url = exist.url;
8365
+ }
8366
+ });
8367
+ }
8362
8368
  });
8363
8369
  const {
8364
8370
  isFullscreen,
@@ -9691,10 +9697,7 @@ const getDetailContainer = () => defineComponent({
9691
9697
  isExtraTab: true,
9692
9698
  params: _.omit(route.query, "name")
9693
9699
  };
9694
- console.log("tab4444444444444444", tab);
9695
- console.log("route4444444444444444", route);
9696
9700
  const detail = detailList.value.find(item => item.uniqueKey === tab.uniqueKey);
9697
- debugger;
9698
9701
  if (detail) {
9699
9702
  detail.url = newRroute.fullPath;
9700
9703
  if (Array.isArray(qiankunState.value.extraTabs)) {
@@ -9732,7 +9735,6 @@ const getDetailContainer = () => defineComponent({
9732
9735
  trailing: false
9733
9736
  });
9734
9737
  watch(() => route, async val => {
9735
- debugger;
9736
9738
  if (!val || route.name.indexOf(props.name) === -1) return;
9737
9739
  addTab(val);
9738
9740
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inl-ui",
3
- "version": "0.1.104",
3
+ "version": "0.1.105",
4
4
  "description": "工业 pc ui库",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",