vue2-client 1.12.1 → 1.12.2

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": "vue2-client",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <page-toggle-transition :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
3
- <a-keep-alive :exclude-keys="excludeKeys" v-if="cachePage" v-model="clearCaches">
3
+ <a-keep-alive :exclude-keys="excludeKeys" v-if="cachePage && isMicroAppEnv" v-model="clearCaches">
4
4
  <router-view v-if="!refreshing" :key="$route.path" />
5
5
  </a-keep-alive>
6
6
  <router-view v-else-if="!refreshing" />
@@ -19,7 +19,8 @@ export default {
19
19
  return {
20
20
  clearCaches: [],
21
21
  excludeKeys: [],
22
- refreshing: false
22
+ refreshing: false,
23
+ isMicroAppEnv: false
23
24
  }
24
25
  },
25
26
  computed: {
@@ -30,6 +31,7 @@ export default {
30
31
  },
31
32
  mounted () {
32
33
  if (window.__MICRO_APP_ENVIRONMENT__) {
34
+ this.isMicroAppEnv = true
33
35
  window.microApp.addDataListener((data) => {
34
36
  if (data.type === 'refresh') {
35
37
  this.refresh()