npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-button-tab

v0.1.8

Published

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

Downloads

4

Readme

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 | 是否开启多选模式 | boolean | false | | column | 列数,规定一行平均分配多少列,最多一行 24 列 | number | - | | gutter | 在布局只有一行的情况下可以通过该属性设置元素之间的间距 | number / string | 0 | | 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 | | items | button-tab-item 数组,使用该属性后可以不用再引入 button-tab-item 组件 | array | [] |

button-tab 事件

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

button-tab-item 属性

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

详见vue-button-tab