<template>
    <div class="home">
        <el-row>
            <el-button type="primary" round v-for="(m, index) in menuList" :key="index" @click="menuClick(m.path)">{{m.name}}</el-button>
        </el-row>
    </div>
</template>

<script>
	export default {
		data () {
			return {};
		},
        computed: {
			menuList() {
				return this.$router.options.routes;
            }
        },
		methods: {
			menuClick(path) {
				this.$router.push(path)
			}
		},
        mounted() {
			console.log('$route:路由信息对象，只读对象； > ', this.$route);
			console.log('$router:路由操作对象 ，只写对象。 > ', this.$router.options.routes);
		}
	}
</script>

<style lang="scss" scoped>
</style>
