<template>
  <keep-alive include="SafeRuleHome">
    <safe-rule-home @changeOperation="changeOperation" v-if="!operationType"/>
    <safe-rule-edit :current-op-obj="currentOpObj" @changeOperation="changeOperation" v-else/>
  </keep-alive>
</template>

<script>



import {useClickRouterToHome} from "@/unit/use-method/usePagination";

import SafeRuleEdit from "@/view/other/c-views/data-handle/zsk/safe-rule/SafeRuleEdit.vue";
import SafeRuleHome from "@/view/other/c-views/data-handle/zsk/safe-rule/SafeRuleHome.vue";
export default {
  name: "SafeRule",
  components: {SafeRuleEdit, SafeRuleHome},
  setup() {
    const {changeOperation,operationType,currentOpObj} = useClickRouterToHome()
    return {
      changeOperation,operationType,currentOpObj
    }
  }
}
</script>

<style scoped lang="scss">
.fade-leave-active,.fade-enter-active{
  transition: 1s all;
}
.fade-leave-to,.fade-enter-from{
  opacity: 0;
  transform: translateX(30px);
}
</style>
