ph-tabbar
v0.1.0-beta.0
Published
## Project setup ``` npm install ph-tabbar ```
Downloads
1
Readme
vue-template
Project setup
npm install ph-tabbar
intro
interface ITab {
icon?:string,
action?:string,
title:string
}
interface PhTabbar{
addTab(item:ITab):void
@shift(action:string):void
@reload(action:string):void
@closeAll():void
@closeOther():void
}
usage
<template>
<ph-tabbar
ref="tabbar"
@shift="onShift"
@reload="onReload"
@closeAll="onCloseAll"
@closeOther="onCloseOther"
/>
</template>
<script setup>
import PhTabbar from 'ph-tabbar'
const tabbar = ref()
const onShift = (item:ITab)=>{
//todo
}
//路由变更之后,收集路由信息,执行addTab方法
tabbar.addTab({
icon?:string,
action?:string,
title:string
})
</script>
在线
See 在线案例.