Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
vue-tree-navigation
Advanced tools
A Vue.js tree navigation menu
$ npm install vue-tree-navigation
main.js
import VueTreeNavigation from 'vue-tree-navigation';
Vue.use(VueTreeNavigation);
file.vue
<vue-tree-navigation :items="items" :defaultOpenLevel="defaultOpenLevel" />
export default {
...
data() {
return {
items: [
{ name: 'First category', children: [
{ name: 'Category item', href: '#take-me-somewhere' },
{ name: 'Category item', href: '#take-me-somewhere' }
]},
{ name: 'Second category', href: '#take-me-somewhere' }
],
defaultOpenLevel: 1
}
},
...
};
items Array
An array containing navigation menu items.
You don't need to specify href
field. Menu item will be rendered as a simple value instead of a hyperlink in this case.
defaultOpenLevel Number
Optional. Default value is 0 (everything is closed).
You can use the component in your Nuxt.js project if you disable server-side rendering for your Nuxt plugin:
plugins/vue-tree-navigation.js
import Vue from 'vue';
import VueTreeNavigation from 'vue-tree-navigation';
Vue.use(VueTreeNavigation);
nuxt.config.js
module.exports = {
...
plugins: [
{ src: '~plugins/vue-tree-navigation', ssr: false }
],
...
}
Install dependencies:
$ npm install
Run tests:
$ npm run test
Run tests in verbose mode:
$ npm run test:verbose
Run development server:
$ npm run dev
Build:
$ npm run build
Run demo development server:
$ cd demo
$ npm install
$ npm run dev
FAQs
Vue.js 2 tree navigation
The npm package vue-tree-navigation receives a total of 234 weekly downloads. As such, vue-tree-navigation popularity was classified as not popular.
We found that vue-tree-navigation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.