Package Incomplete and Broken
Description
This Package is used to make your Application tabular, like chrome or sublime text. It achieves this by keeping a track of which routes do you want to open in tabs, opens those routes in tabs, and keeps alive those tabs so they are not rerendered everytime they open. Based on an amazing package by adamschwartz/chrome-tabs but molded for Vue Router
Note: Works best with socket implementation which updates the tabs on the fly for new data otherwise it would require to close and reopen the tab for rerendering it based on new data from server / database.
Installation
npm install vue-router-spa-tabs
Usage
1) Initialize the Package
app.js
app.css
;
or copy paste css from file
Routes.js
1) Routes should include name
and meta.tab
with tab value is what will be displayed in the Tab Title
const routes = path: '/' component: App name: 'home' meta: tab: 'Dashboard';
2) Component Name = Router Link Name
router.js
path: '/' name: 'home'
component.vue
...<script> name: 'home' </script>...
3) Make vue-router available global
window.router =
rather than router =
windowrouter = routes;
example.vue
4) {{tab}} <!--<keep-alive include="CustomersIndex,customers">-->