zpw-vue-tabs
v1.0.5
Published
**> A Vue.js tabs framework replacing the URL-ROUTER for Vue2.0 (多tab页轻型框架,在多tab系统中替代路由)
Downloads
3
Readme
Vue-Tabs
**> A Vue.js tabs framework replacing the URL-ROUTER for Vue2.0 (多tab页轻型框架,在多tab系统中替代路由)
Demo
查看 DEMO**
Usage
Step1 New instance & use
import VueTabs from 'zpw-vue-tabs'
import 'zpw-vue-tabs/vue-tabs.css'
Vue.use(VueTabs)
new Vue({
el: '#app',
template: '<App/>',
components: {
App
}
})
Step2. Html Element
<div id="app">
<vue-tabs ref="vueTabs" :options=options></vue-tabs>
</div>
Step3. config
import Hello from "components/Hello"
export default {
components:{
Hello
},
data(){
return {
options:{
tabs:[{
name: 'Hello', // name UNIQUE
title: 'Hello word', // tab's title
component:Hello
}]
}
}
}
}
Step4. Use api to open a tab
this.$refs.vueTabs.$taber.open({
name: "Hello"
})