2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00

Show search only if a route has list

This commit is contained in:
Suraj Shetty 2018-07-12 20:45:52 +05:30
parent 8c9eb126a4
commit 561a43cf73

View File

@ -2,7 +2,7 @@
<div class="frappe-desk row no-gutters">
<frappe-sidebar :sidebarConfig="sidebarConfig"></frappe-sidebar>
<frappe-main>
<frappe-navbar></frappe-navbar>
<frappe-navbar :showSearch="showSearch"></frappe-navbar>
<slot></slot>
</frappe-main>
</div>
@ -18,6 +18,11 @@ export default {
FrappeSidebar: Sidebar,
FrappeMain: Main,
FrappeNavbar: Navbar
},
computed: {
showSearch() {
return /list|edit/.test(this.$route.path)
}
}
};
</script>