0.1.8 • Published 4 years ago

vue-button-tab v0.1.8

Weekly downloads
37
License
-
Repository
github
Last release
4 years ago

vue-button-tab

一款基于 Vue 的按钮组件,适用于移动端和 PC 端。

vue-button-tab

安装

npm

npm i vue-button-tab

yarn

yarn add vue-button-tab

使用

<template>
    <button-tab v-model="data">
        <button-tab-item value="1">1</button-tab-item>
        <button-tab-item value="2">2</button-tab-item>
        <button-tab-item value="3">3</button-tab-item>
    </button-tab>
</template>

<script>
import { ButtonTab, ButtonTabItem } from 'vue-button-tab'

export default {
    components: {
        ButtonTab,
        ButtonTabItem,
    },

    data() {
        return {
            data: '1',
        }
    },
}
</script>

属性

button-tab 属性

参数说明类型默认值
value / v-model绑定值,在多选模式下为数组string / number / array-
multiple是否开启多选模式booleanfalse
column列数,规定一行平均分配多少列,最多一行 24 列number-
gutter在布局只有一行的情况下可以通过该属性设置元素之间的间距number / string0
default-color默认字体颜色string#999999
active-color选中时字体颜色string#FFFFFF
default-bg-color默认背景颜色string#FFFFFF
active-bg-color选中时背景颜色string#2482FC
default-border-color默认边框颜色string#2482FC
active-border-color选中时边框颜色string#2482FC
itemsbutton-tab-item 数组,使用该属性后可以不用再引入 button-tab-item 组件array[]

button-tab 事件

事件名说明回调参数
on-item-click当选项被点击时触发的事件当前点击项的 value

button-tab-item 属性

参数说明类型默认值
value选项的值string / number-
label选项的文本string-

详见vue-button-tab

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago