From 6c9e1a404b5326f216db906e5d8ba4612f844f72 Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Sun, 15 Apr 2018 06:55:48 +0800 Subject: [PATCH] implement nested links in dropdown --- docs/.vuepress/config.js | 73 ++++++++++++++++++++++++++++++++++ lib/default-theme/NavLink.vue | 13 ++++-- lib/default-theme/NavLinks.vue | 42 ++++++++++++++----- lib/default-theme/Sidebar.vue | 13 ++++-- lib/default-theme/util.js | 6 +++ 5 files changed, 129 insertions(+), 18 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index de7d0e1112..751ef3ed39 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -47,6 +47,79 @@ module.exports = { link: '/', }, ] + }, + { + text: 'Ecosystem', + items: [ + { + text: 'Help', + items: [ + { + text: 'Forum', + link: 'https://forum.vuejs.org/' + }, + { + text: 'Chat', + link: 'https://chat.vuejs.org/' + } + ] + }, + { + text: 'Tooling', + items: [ + { + text: 'Devtools', + link: 'https://github.com/vuejs/vue-devtools' + }, + { + text: 'Webpack Template', + link: 'https://vuejs-templates.github.io/webpack' + }, + { + text: 'Vue Loader', + link: 'https://vue-loader.vuejs.org' + } + ] + }, + { + text: 'News', + items: [ + { + text: 'Weekly News', + link: 'https://news.vuejs.org' + }, + { + text: 'Roadmap', + link: 'https://github.com/vuejs/roadmap' + }, + { + text: 'Twitter', + link: 'https://twitter.com/vuejs' + }, + { + text: 'Blog', + link: 'https://medium.com/the-vue-point' + }, + { + text: 'Jobs', + link: 'https://vuejobs.com/?ref=vuejs' + } + ] + }, + { + text: 'Resource Lists', + items: [ + { + text: 'Vue Curated', + link: 'ttps://curated.vuejs.org/' + }, + { + text: 'Awesome Vue', + link: 'https://github.com/vuejs/awesome-vue' + } + ] + } + ] } ], sidebar: { diff --git a/lib/default-theme/NavLink.vue b/lib/default-theme/NavLink.vue index 9c3a80050e..7c912865a0 100644 --- a/lib/default-theme/NavLink.vue +++ b/lib/default-theme/NavLink.vue @@ -1,26 +1,31 @@