cloud-web-corejs 1.0.54-dev.717 → 1.0.54-dev.719

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.717",
4
+ "version": "1.0.54-dev.719",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -1,4 +1,4 @@
1
- import settingConfig from "@base/settings";
1
+ import settingConfig from "@/settings";
2
2
 
3
3
  /**
4
4
  * 同一菜单是否允许重复打开为独立标签页。
@@ -30,7 +30,8 @@ export function viewKey(view) {
30
30
  * @returns {Object} 归一化后的 location(带唯一 _rk)
31
31
  */
32
32
  export function withRepeatKey(location) {
33
- const loc = typeof location === "string" ? { path: location } : { ...location };
33
+ const loc =
34
+ typeof location === "string" ? { path: location } : { ...location };
34
35
  loc.query = { ...(loc.query || {}), _rk: Date.now() };
35
36
  return loc;
36
37
  }
@@ -44,6 +45,8 @@ export function withRepeatKey(location) {
44
45
  */
45
46
  export function openView(router, location, route) {
46
47
  // 未指定 route 时,用开关本身判定(等价于「除 affix/outLink 外都可重复」)
47
- const repeatable = route ? isRepeatable(route) : settingConfig.repeatOpenEnabled;
48
+ const repeatable = route
49
+ ? isRepeatable(route)
50
+ : settingConfig.repeatOpenEnabled;
48
51
  return router.push(repeatable ? withRepeatKey(location) : location);
49
52
  }
@@ -278,10 +278,10 @@ export default {
278
278
  if (route.linkType == 4) {
279
279
  this.jumpOutLink(route)
280
280
  } else if (route.linkType == 3) {
281
- this.$router.push({path: route.path, query: {url: route.outLink}});
281
+ this.$openView({path: route.path, query: {url: route.outLink}}, route);
282
282
  } else {
283
283
  // this.jumpTo(route, firstRow)
284
- this.$router.push(route.path);
284
+ this.$openView(route.path, route);
285
285
  }
286
286
  } catch (e) {
287
287
  console.error(e);
@@ -565,11 +565,11 @@ export default {
565
565
  } else if (route.type == 3) {
566
566
  let menuCode = route.menuCode;
567
567
  let path = "/user/outLink/index/" + menuCode;
568
- this.$router.push({ path: path, query: { url: route.url } });
568
+ this.$openView({ path: path, query: { url: route.url } }, route);
569
569
  } else {
570
570
  let path = this.getPath(route);
571
571
  if (!path) return;
572
- this.$router.push(path);
572
+ this.$openView(path, route);
573
573
  }
574
574
  },
575
575
  getPath(route3) {
@@ -504,12 +504,15 @@ export default {
504
504
  if (route.linkType === 4) {
505
505
  this.jumpOutLink(route);
506
506
  } else if (route.linkType === 3) {
507
- this.$router.push({
508
- path: path,
509
- query: { url: route.outLink, route: route.route },
510
- });
507
+ this.$openView(
508
+ {
509
+ path: path,
510
+ query: { url: route.outLink, route: route.route },
511
+ },
512
+ route
513
+ );
511
514
  } else {
512
- this.$router.push(path);
515
+ this.$openView(path, route);
513
516
  }
514
517
  } catch (e) {
515
518
  console.error(e);
@@ -796,11 +799,11 @@ export default {
796
799
  } else if (route.type === 3) {
797
800
  let menuCode = route.menuCode;
798
801
  let path = "/user/outLink/index/" + menuCode;
799
- this.$router.push({ path: path, query: { url: route.url } });
802
+ this.$openView({ path: path, query: { url: route.url } }, route);
800
803
  } else {
801
804
  let path = this.getPath(route);
802
805
  if (!path) return;
803
- this.$router.push(path);
806
+ this.$openView(path, route);
804
807
  }
805
808
  },
806
809
  getPath(route3) {