|
@@ -5,37 +5,13 @@
|
|
|
oncopy="return false"
|
|
|
oncut="return false"
|
|
|
>
|
|
|
- <transition :name="transitionName">
|
|
|
- <router-view></router-view>
|
|
|
- </transition>
|
|
|
+ <router-view></router-view>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
name: "APP",
|
|
|
- data() {
|
|
|
- return { transitionName: "" };
|
|
|
- },
|
|
|
- watch: {
|
|
|
- $route(to, from) {
|
|
|
- const toDepth = to.path.split("/").length;
|
|
|
- const fromDepth = from.path.split("/").length;
|
|
|
- if (toDepth < fromDepth) {
|
|
|
- this.transitionName = "slide-right";
|
|
|
- } else if (toDepth > fromDepth) {
|
|
|
- this.transitionName = "slide-left";
|
|
|
- } else if (to.params.order && from.params.order) {
|
|
|
- if (to.params.order < from.params.order) {
|
|
|
- this.transitionName = "slide-right";
|
|
|
- } else if (to.params.order > from.params.order) {
|
|
|
- this.transitionName = "slide-left";
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.transitionName = "";
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
};
|
|
|
</script>
|
|
|
|