vue-path-tab
v0.0.7
Published
Like a browser, control the tab page
Downloads
17
Readme
vue-path-tab
Use vue-path-tab just like vue-router, this.$route => this.$tab
Introduction
vue-path-tab
is a solution for backend to keep multiple tabs:
- Simple init, like vue-router
- Like browser, you will have a contentmenu
- Can open/close/reload a tab anywhere under the vm
Get started with the documentation, or play with the examples.
how user
install
$ npm i --save vue-path-tab
init
<path-tabs-view v-model="activePath" defaultPath="/user/list"></path-tabs-view>
API
#query and params
path = '/user/:id'
temp = '/user/123?isShare=1'
this.$tab.params => { "id": "123" }
this.$tab. query => { "isShare: "1" }
# open a tab
this.$tab.open(*path)
# reload a tab
this.$tab.reload(path)
# close a tab
this.$tab.close(*path)
# close other
this.$tab.closeOther(path)
# change config name
this.$tab.setTitle(name, path)
# lock a tab
this.$tab.lock(*path)
# unlock a tab
this.$tab.unlock(*path)
Statement
the base tab is fork from element-ui/tabs
License
MIT Copyright (c) 2013-2017 makebanana