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

peach-split-button

v0.0.3

Published

vue悬停分割按钮

Downloads

3

Readme

peach-split-button

vue 悬停分割按钮 split button with hover effect component for Vue.js

在线预览 | Preview demo

https://taoqi0813.github.io/#/peach-split-button

快速上手 | Getting started

安装 | Installation

npm install -S peach-split-button

在 main.js 引用 | In Main.js:

import PeachSplitBtn from 'peach-split-button'
Vue.use(PeachSplitBtn)

用法 | Usage

<peach-split-btn
  :label="label"
  :active="active"
  :split="split"
  :width="width"
  :left="left"
  :top="top"
  :z-index="zIndex"
  :bg-color="bgColor"
  :text-color="textColor"
  :custom-class="customClass"
  :click-func="btnClick"
>
  这里用slot自己插菜单
</peach-split-btn>

配置 | Options

  • label

    • 按钮的文本 | main-button label
    • 类型: String | Type: String
    • 默认值: '' | Default: ''
    • 可用插槽替代,slot="label"
  • active

    • 激活状态 | button active state
    • 类型: Boolean | Type: Boolean
    • 默认值: false | Default: false
  • split

    • 是否分割 | split button or not
    • 类型: Boolean | Type: Boolean
    • 默认值: true | Default: true
  • width

    • 按钮宽度 | button width
    • 类型: [String, Number] | Type: [String, Number]
    • 不要带单位,固定 px | no unit, is 'px'
    • 默认值: 120 | Default: 120
  • left

    • 菜单 left | menu left
    • 类型: [String, Number] | Type: [String, Number]
    • 不要带单位,固定 px | no unit, is 'px'
    • 默认值: 0 | Default: 0
  • top

    • 菜单 top | menu top
    • 类型: [String, Number] | Type: [String, Number]
    • 不要带单位,固定 px | no unit, is 'px'
    • 默认值: 0 | Default: 0
  • z-index

    • 菜单 z-index | menu z-index
    • 类型: [String, Number] | Type: [String, Number]
    • 默认值: 1 | Default: 1
  • bg-color

    • 按钮背景色 | button background color
    • 类型: String | Type: String
    • 默认值: '#1976d2' | Default: '#1976d2'
  • text-color

    • 按钮文本色 | button color
    • 类型: String | Type: String
    • 默认值: '#fff' | Default: '#fff'
  • custom-class

    • 按钮自定义 class | button custom class
    • 类型: String | Type: String
    • 默认值: '' | Default: ''
  • click-func

    • 主按钮点击事件回调函数 | main-button click function
    • 类型: Function | Type: Function
    • 回调参数: click event | Arg: click event

插槽 | slots

slot="default"

  • 菜单 | menu

slot="label"

  • 按钮文本 | button label

更新日志 | Log

| 版本号 | 更新时间 | 更新内容 | | ------ | --------- | ------------------------------------------ | | 0.1.2 | 2021/1/26 | 去掉 menu 默认样式,增加 custom-class 属性 | | 0.1.1 | 2021/1/14 | 增加 z-index 属性 | | 0.1.0 | 2021/1/13 | 初始化项目 |