n20-common-lib 1.3.199 → 1.3.200

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,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "1.3.199",
3
+ "version": "1.3.200",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div>
3
3
  <keep-alive v-if="dnsKey" :max="32">
4
- <router-view v-if="!$route.meta.noCache" ref="content-cache" :key="$route | keyF(updateK)" class="content-box" />
4
+ <router-view v-if="!$route.meta.noCache" ref="content-cache" :key="$route | keyF" class="content-box" />
5
5
  </keep-alive>
6
- <router-view v-if="!dnsKey || $route.meta.noCache" :key="updateK" class="content-box" />
6
+ <router-view v-if="!dnsKey || $route.meta.noCache" :key="$route | keyF" class="content-box" />
7
7
  </div>
8
8
  </template>
9
9
 
@@ -14,11 +14,9 @@ const routerBase = (process.env.BASE_URL + '/').replace(/\/\/$/, '/')
14
14
  export default {
15
15
  name: 'SubContent',
16
16
  filters: {
17
- keyF({ path, query = {} }, updateK) {
17
+ keyF({ path, query = {} }) {
18
18
  path = path.replace(/^\//, routerBase)
19
- let key = path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + window._tab_route_key[path]
20
-
21
- return key + updateK
19
+ return path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + window._tab_route_key[path]
22
20
  }
23
21
  },
24
22
  props: {
@@ -29,8 +27,7 @@ export default {
29
27
  },
30
28
  data() {
31
29
  return {
32
- dnsKey: this.isTest || (process.env.NODE_ENV === 'production' && process.env.VUE_APP_KEEP_ALIVE === 'true'),
33
- updateK: ''
30
+ dnsKey: this.isTest || (process.env.NODE_ENV === 'production' && process.env.VUE_APP_KEEP_ALIVE === 'true')
34
31
  }
35
32
  },
36
33
  beforeCreate() {
@@ -70,10 +67,7 @@ export default {
70
67
  }
71
68
  },
72
69
  updateActiveCache() {
73
- this.updateK = '_'
74
- this.$nextTick(() => {
75
- this.updateK = ''
76
- })
70
+ this.$forceUpdate()
77
71
  },
78
72
  removeCacheTimerFn() {
79
73
  this.removeCacheTimer = setInterval(() => {
@@ -20,14 +20,9 @@
20
20
  />
21
21
  <div ref="content-wrap" class="content-wrap">
22
22
  <keep-alive v-if="dnsKey" :max="32">
23
- <router-view
24
- v-if="!$route.meta.noCache"
25
- ref="content-cache"
26
- :key="$route | keyF(updateK)"
27
- class="content-box"
28
- />
23
+ <router-view v-if="!$route.meta.noCache" ref="content-cache" :key="$route | keyF" class="content-box" />
29
24
  </keep-alive>
30
- <router-view v-if="!dnsKey || $route.meta.noCache" :key="updateK" class="content-box" />
25
+ <router-view v-if="!dnsKey || $route.meta.noCache" :key="$route | keyF" class="content-box" />
31
26
  </div>
32
27
  </div>
33
28
  </template>
@@ -52,10 +47,8 @@ export default {
52
47
  tabsNav
53
48
  },
54
49
  filters: {
55
- keyF({ path, query = {} }, updateK) {
56
- let key = path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + window._tab_route_key[path]
57
-
58
- return key + updateK
50
+ keyF({ path, query = {} }) {
51
+ return path + '^' + JSON.stringify({ ...query, _fromNo: undefined }) + '^' + window._tab_route_key[path]
59
52
  }
60
53
  },
61
54
  props: {
@@ -91,7 +84,6 @@ export default {
91
84
 
92
85
  return {
93
86
  dnsKey: this.isTest || (process.env.NODE_ENV === 'production' && process.env.VUE_APP_KEEP_ALIVE === 'true'),
94
- updateK: '',
95
87
  headerH,
96
88
  tabsH,
97
89
  clientM,