vue-demo1/src/pages/sitteng.vue
2021-05-12 10:34:24 +08:00

44 lines
872 B
Vue

<template>
<div class="sitteng">
<div class="nav">
<button @click="navto('/sitteng/index')">到index</button>
<button @click="navto('/sitteng/user')">到user</button>
<button @click="navto('/sitteng/admin')">到admin</button>
</div>
<div class="box">
<router-view></router-view>
</div>
</div>
</template>
<style scoped>
.sitteng{
width: 100%;
height: 100vh;
display: flex;
}
.nav{
width: 15%;
height: 100%;
/* background-color: #0f0; */
border-right: 1px solid #bcbcbc;
display: flex;
flex-direction: column;
}
.nav > button {
width: 100%;
}
.box{
width: 85%;
height: 100%;
/* background: #f00; */
}
</style>
<script>
export default {
methods:{
navto(url){
this.$router.push(url)
}
}
}
</script>