<template>
  <div id="app">
    <keep-alive v-if="isRouterAlive">
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      isRouterAlive: true,
    }
  },
  provide() { return { reload: this.reload } },
  methods: {
    reload() {
      this.isRouterAlive = false;
      this.$nextTick(() => { this.isRouterAlive = true })
    }

  },
}
</script>

<style lang="less">
#app {
  width: 100%;
  height: 100%;
}

body {
  margin: 0 !important;
}

.van-button--primary {
  background-color: #2372eb !important;
  border: 1px solid #2372eb !important;
}

.van-button--plain {
  background: #ffffff !important;
}

.van-button--plain.van-button--primary {
  color: #2372eb !important;
}
</style>
