vue-path-tab

0.0.7 • Public • Published

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.

demo

how user

install

$ npm i --save vue-path-tab

init

tab/index.js

main.js

<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

Readme

Keywords

Package Sidebar

Install

npm i vue-path-tab

Weekly Downloads

2

Version

0.0.7

License

MIT

Last publish

Collaborators

  • makebanana