index.vue 989 Bytes
Newer Older
fukai committed
1
<template>
2 3 4 5 6 7 8
  <section id="business_container">
    <transition name="fade-transform" mode="out-in">
      <keep-alive :include="cachedViews">
        <router-view :key="key" />
      </keep-alive>
    </transition>
  </section>
fukai committed
9 10 11 12
</template>

<script>
export default {
潘际乾 committed
13
  name: "Business",
潘际乾 committed
14 15 16 17 18 19 20 21 22
  watch: {
    $route() {
      if (this.$route.path.startsWith("/review")) {
        this.$store.commit("setMode", "display");
      } else {
        this.$store.commit("setMode", "normal");
      }
    },
  },
23 24 25 26 27 28 29 30 31 32 33 34
  created: () => {
    console.log("进入业务交易界面");
  },
  computed: {
    cachedViews() {
      return this.$store.state.TagsView.cachedViews;
    },
    key() {
      return this.$route.path;
    },
  },
};
fukai committed
35 36 37
</script>

<style>
38 39
#business_container {
  /* height: 100%; */
潘际乾 committed
40 41
  padding: 5px 15px;
  /* width: 100%; */
潘际乾 committed
42
  flex: 1;
43
}
潘际乾 committed
44 45 46 47 48 49 50 51
#business_container .eibs-tab {
  padding: 0 15px;
}
#business_container .eibs-tab::after {
  content: "";
  display: block;
  clear: both;
}
fukai committed
52
</style>