feat:vue-element-admin升级改造vue3

This commit is contained in:
有来技术
2021-11-21 23:38:54 +08:00
parent 0091a5fab2
commit fe8a7e2c31
25 changed files with 1463 additions and 164 deletions

View File

@@ -1,20 +1,29 @@
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<router-view :key="key" />
<router-view :key="key"/>
</transition>
</section>
</template>
<script>
export default {
name: 'AppMain',
computed: {
key() {
return this.$route.path
<script lang="ts">
import {useRoute} from "vue-router";
import {defineComponent} from "vue";
export default defineComponent({
setup() {
const route = useRoute()
const key = () => {
return route.path
}
return {
key
}
}
}
})
</script>
<style scoped>
@@ -25,7 +34,8 @@ export default {
position: relative;
overflow: hidden;
}
.fixed-header+.app-main {
.fixed-header + .app-main {
padding-top: 50px;
}
</style>