0.0.41 • Published 1 year ago

v3-tabs v0.0.41

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Vue3 Tabs

Installation

npm install v3-tabs

or pnpm

pnpm add v3-tabs

Usage

<template>
  <div class="content">
    <Tabs :list="arr" />
  </div>
</template>

<script setup>
import Tabs from 'v3-tabs'
import { ref } from 'vue'

const arr = ref([
  {
    name: 'a'
  },
  {
    name: 'b'
  },
  {
    name: 'c'
  }
])
</script>

<style>
.content {
  width: 680px;
  height: 100%;
}
</style>

自定义图标

<template>
  <Tabs :list="arr" showIcon>
    <template v-slot:pre>pre</template>
    <template v-slot:next>next</template>
    <template v-slot:closeIcon>close</template>
  </Tabs>
</template>

API

Props

参数说明类型默认值
list渲染的 tabobject[]
showIcon是否显示关闭按钮booleanfalse
jump在点击时自动路由跳转booleanfalse

Events

参数说明类型默认值
handleClick点击 tab 事件回调function
close点击关闭按钮事件回调function
0.0.41

1 year ago

0.0.4

1 year ago

0.0.32

1 year ago

0.0.31

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago