Sha256: f01df564a33259db7e36f82a2d963acdda5ee0bed249e59e991de5b9ef7b6bba
Contents?: true
Size: 678 Bytes
Versions: 25
Compression:
Stored size: 678 Bytes
Contents
export default function navItem(matchers) { return { hidden: false, get id() { return this.$root.id; }, get path() { return this.$root.getAttribute("data-path"); }, get active() { return this.$store.nav.active === this.id; }, navigate() { this.setLocation(this.path); if (this.$store.layout.mobile) { this.$store.sidebar.open = false; } }, filter(text) { this.hidden = false; if (text.length) { const matched = matchers.map((m) => m.includes(text)); this.hidden = !matched.filter((m) => m).length; } else { this.hidden = false; } }, }; }
Version data entries
25 entries across 25 versions & 1 rubygems