<template>
  <section id="business_container">
    <transition name="fade-transform" mode="out-in">
      <keep-alive :include="cachedViews">
        <router-view :key="key" />
      </keep-alive>
    </transition>
  </section>
</template>

<script>
export default {
  name: "Business",
  watch: {
    $route() {
      if (this.$route.path.startsWith("/review")) {
        this.$store.commit("setMode", "display");
      } else {
        this.$store.commit("setMode", "normal");
      }
    },
  },
  created: () => {
    console.log("进入业务交易界面");
  },
  computed: {
    cachedViews() {
      return this.$store.state.TagsView.cachedViews;
    },
    key() {
      return this.$route.path;
    },
  },
};
</script>

<style>
#business_container {
  flex: 1;
  width: 85%;
  margin: 0 auto;
  padding-top: 40px;
  background-color: #ffffff;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 12%), 0 0 3px 0 rgb(0 0 0 / 4%);
}
#business_container .eibs-tab {
  padding: 40px;
}
#business_container .eibs::after, #business_container .eibs-tab::after {
  content: "";
  display: block;
  clear: both;
}
</style>