修改APP.vue的内外边距

This commit is contained in:
Cool 2023-11-20 20:17:42 +08:00
parent 35463b2997
commit a724363711
1 changed files with 23 additions and 17 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div id="app"> <div id="app" class="app1">
<router-view v-if="isRouterAlive"></router-view> <router-view v-if="isRouterAlive"></router-view>
</div> </div>
</template> </template>
@ -12,27 +12,33 @@ export default {
components: { components: {
}, },
provide(){ provide() {
return{ return {
reload:this.reload reload: this.reload
} }
}, },
data(){ data() {
return{ return {
isRouterAlive:true isRouterAlive: true
} }
}, },
methods:{ methods: {
reload(){ reload() {
this.isRouterAlive=false this.isRouterAlive = false
this.$nextTick(()=>{ this.$nextTick(() => {
this.isRouterAlive=true this.isRouterAlive = true
}) })
} }
} }
} }
</script> </script>
<style> <style lang="scss">
.app1 {
// background-color: #269b33;
position: relative;
top: 0px;
margin: 0;
height: 100%;
}
</style> </style>