You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<template>
|
|
|
|
<div class="menuList">
|
|
|
|
<div
|
|
|
|
class="menuItem"
|
|
|
|
v-for="(item,index) in menuList"
|
|
|
|
:key="index"
|
|
|
|
@click="goPage(item.path)"
|
|
|
|
>{{item.meta.title || item.name}}</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: "home",
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
menuList:""
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted(){
|
|
|
|
this.menuList = this.$router.options.routes
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
goPage(url){
|
|
|
|
this.$router.push(url)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
.menuList{
|
|
|
|
padding:20px;
|
|
|
|
.menuItem{
|
|
|
|
cursor: pointer;
|
|
|
|
padding:10px;
|
|
|
|
border-bottom:#e8e8e8 solid 1px
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|