Skip to content

Instantly share code, notes, and snippets.

@aytdm
Created September 27, 2017 02:18
Show Gist options
  • Save aytdm/ee7dad4bbf2978e1d38a082a05c1c9c6 to your computer and use it in GitHub Desktop.
Save aytdm/ee7dad4bbf2978e1d38a082a05c1c9c6 to your computer and use it in GitHub Desktop.
<template>
<div>
<el-menu theme="dark" :default-active="activeIndex" mode="horizontal" @select="handleSelect">
<el-menu-item index="1">List of Posts</el-menu-item>
<el-submenu index="2">
<template slot="title">Documentation</template>
<el-menu-item index="2-1"><a href="https://nuxtjs.org/guide" target="_blank">NUXT</a></el-menu-item>
<el-menu-item index="2-2"><a href="https://vuejs.org/v2/guide/" target="_blank">Vue.js</a></el-menu-item>
<el-menu-item index="2-3"><a href="http://element.eleme.io/#/en-US/component/installation" target="_blank">Element</a></el-menu-item>
</el-submenu>
<el-menu-item index="3"><nuxt-link to="/">Back Top</nuxt-link></el-menu-item>
</el-menu>
</div>
</template>
<script>
export default {
data () {
return {
activeIndex: '1',
activeIndex2: '1'
}
},
methods: {
handleSelect (key, keyPath) {
console.log(key, keyPath)
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment