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-beginner-guide

v1.1.1

Published

A novice boot component based on vue

Downloads

30

Readme

Novice boot component

Install

npm install vue-beginner-guide -S
import Guide from 'vue-beginner-guide';
Vue.component('Guide', Guide);

Params

| Attribute | Explanation | Type | Default | | --------- | ----------- | ---- | ------- | | show | Control the display of novice boot | Boolean | false | | config | Content configuration, each array entry is a step in the boot, as follows | Array | [] |

The config sample

config: [{
    dom: 'block1',// Box selection element, DOM node or ID name
    title: 'Step 1 Title',// Description copy title
    cont: ['1.This is the first paragraph', '2.This is the second paragraph'],// State the content of the copy, each item is a paragraph
    btnText: { // Action buttons
        pre: 'previous',// Previous button copy
        next: 'next',// Next button copywriting
        close: 'close'// Close button copywriting
    },

    width: 200, // Optional:You can customize the width of the box area. When not specified, the component automatically takes the width of the target element
    height: 100, // Optional:The box area defines the height. If this is not specified, the component automatically takes the width of the target element

    fakeImg: './image.png' // Optional:Overwrite the image of the target element, if you want to replace the element to be illustrated with a picture.
},
{
    //... Step 2
}]

Events

| The event name | instructions | The return value | | --------- | ----------- | ------ | | before-next | Click the Next button to switch before triggering | preIndex & nextIndex:Index before and after the switch; preConfig & nextConfig: The configuration before and after the switch | | after-next | Click the next button to trigger the switch | preIndex & nextIndex:Index before and after the switch; preConfig & nextConfig: The configuration before and after the switch | | before-back | Click the previous button to switch before triggering | preIndex & nextIndex:Index before and after the switch; preConfig & nextConfig: The configuration before and after the switch | | after-back | Click the previous button to trigger the switch | preIndex & nextIndex:Index before and after the switch; preConfig & nextConfig: The configuration before and after the switch | | close | Click the close button to trigger | index: The sequence number of the step when closing; curConfig:Step configuration when closing |

新手引导组件

引入

npm install vue-beginner-guide -S
import Guide from 'vue-beginner-guide';

Vue.component('Guide', Guide);

参数

| 属性 | 解释 | 类型 | 默认 | | --------- | ----------- | ---- | ------- | | show | 控制新手引导的展示 | Boolean | false | | config | 内容配置,每一个数组项是引导中的一步,具体配置如下 | Array | [] |

config配置内容示例

config: [{
    dom: 'block1', //框选元素,dom节点或id名
    title: '第一步标题', //说明文案标题
    cont: ['1.这是第一段文案', '2.这是第二段文案'], //说明文案内容,每一项是一段
    btnText: { //操作按钮
        pre: '上一步', // 上一步按钮文案
        next: '下一步', // 下一步按钮文案
        close: '关闭' // 关闭引导按钮文案
    },

    width: 200, //(可选)框选区域自定义宽度,当不指定时,组件自动取目标元素的宽度
    height: 100, //(可选)框选区域自定义高度,当不指定时,组件自动取目标元素的高度

    fakeImg: './image.png' //(可选)覆盖目标元素的图片(如果想用一张图片替代要说明的元素时)
},
{
    //... 第二步
}]

事件

| 事件名 | 说明 | 返回值 | | --------- | ----------- | ------ | | before-next | 点击下一步按钮,切换之前触发 | preIndex 和 nextIndex:切换前后的index;preConfig 和 nextConfig:切换前后步骤的配置 | | after-next | 点击下一步按钮,切换之后触发 | preIndex 和 nextIndex:切换前后的index;preConfig 和 nextConfig:切换前后步骤的配置 | | before-back | 点击上一步按钮,切换之前触发 | preIndex 和 nextIndex:切换前后的index;preConfig 和 nextConfig:切换前后步骤的配置 | | after-back | 点击上一步按钮,切换之后触发 | preIndex 和 nextIndex:切换前后的index;preConfig 和 nextConfig:切换前后步骤的配置 | | close | 点击关闭按钮触发 | index: 关闭时的步骤序号;curConfig:关闭时的步骤的配置 |