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

rz-vue-module

v1.2.6

Published

基于vue开发的常用组件库

Downloads

45

Readme

基于 vue 开发的常用组件库

demo

适用于个人项目 或 需求不是特别复杂项目。

[TOC]

test

git clone https://github.com/Roc-zhou/rz-vue-module.git

cd rz-vue-module

npm or yarn install

npm run dev

http://localhost:8080/

安装

npm install --save rz-vue-module or cnpm install --save rz-vue-module
yarn add rz-vue-module

使用 main.js (全局注册)

// 全局注册
import RZ from 'rz-vue-module'
Vue.use(RZ)

按需引入

// HelloWorld.vue
import Page from 'rz-vue-module/lib/Page'

components: {
  Page
}

Page 分页组件

先上图

image.png

// 直接使用
<Page :page-index="2" :total="20" :page-size="8" @change="changeone"></Page>

props

| 属性 | 说明 | 类型 | 默认值 | | :-------: | :-------------------------------------------: | :----: | :----: | | perPages | 页面中的可见页码,其他的以...替代, 必须是奇数 | Number | 5 | | pageIndex | 当前页码 | Number | 1 | | pageSize | 每页显示条数 | Number | 10 | | total | 总数 | Number | 20 |

events

| 事件名 | 说明 | 返回值 | | :----: | :------: | :------: | | change | 切换页码 | 当前页码 |

Timer 倒计时组件

使用

<Timer class="app-timer" @start="getCode" v-model="active"></Timer>

props

| 属性 | 说明 | 类型 | 默认值 | | :------: | :--------------: | :-----: | :--------: | | focus | 默认展示的文案 | String | 获取验证码 | | time | 时间 | Number | 60 | | template | 动态变化的文案 | String | {{time}} S | | blur | 倒计时完毕后文案 | String | 再次发送 | | value | 是否激活 | Boolean | false |

events

| 事件名 | 说明 | 返回值 | | :----: | :------: | :-----------: | | start | 点击开始 | fasle or true |

CountUp 数字动画组件

GIF.gif

使用

<CountUp :endVal="num" class="CountUp"></CountUp> // 样式自己定义

props

| 属性 | 说明 | 类型 | 默认值 | | :-----------: | :----------------------------: | :-----: | :----: | | startVal | 从 多少 开始 | Number | 0 | | decimalPlaces | 小数位数 | Number | 0 | | duration | 动画持续时间 | Number | 2 | | useGrouping | example: 1,000 vs 1000 (true) | Boolean | true | | useEasing | ease animation (true) | Boolean | true | | separator | grouping separator (',') | String | , | | decimal | decimal ('.') | String | . | | prefix | 前缀 | String | - | | suffix | 后缀 | String | - | | delay | 延迟几秒加载 | Number | 0 | | endVal | 结束值,即动画结束后显示的数值 | Number | 必传! |

更多选项 demo

QrCode 二维码

原组件 vue-qr github https://github.com/Binaryify/vue-qr 更多详细 请访问 vue-qr

<RzCode :text="'https://roc-zhou.github.io/rz-vue-module/'"></RzCode>

props

| 属性 | 说明 | 类型 | 默认值 | | :-----------: | :----------------------------: | :-----: | :----: | | text | 欲编码的内容 | String | '' | | correctLevel | 容错级别 0-3 | Number | 0 | | size | 尺寸, 长宽一致, 包含外边距 默认200 | Number | 200 | | margin | 二维码图像的外边距, 默认 20px | Number | 20 | | bgSrc | 欲嵌入的背景图地址 | String | '' | | gifBgSrc | 欲嵌入的背景图 gif 地址,设置后普通的背景图将失效。设置此选项会影响性能 | String | '' | | backgroundColor | 背景色 | String | '#fff' | | logoSrc | 嵌入至二维码中心的 LOGO 地址 | String | '' | | logoScale | 用于计算 LOGO 大小的值, 过大将导致解码失败, LOGO 尺寸计算公式 logoScale*(size-2*margin), 默认 0.2 | Number | 0.2 | | logoMargin | LOGO 标识周围的空白边框, 默认为0 | Number | 0 | | logoBackgroundColor | Logo 背景色,需要设置 logo margin | String | '' | | logoCornerRadius | LOGO 标识及其边框的圆角半径, 默认为0 | Number | 0 | | whiteMargin | 若设为 true, 背景图外将绘制白色边框 | Boolean | true | | dotScale | 数据区域点缩小比例,默认为1 (0 < scale < 1.0) | Number | 1 |

events

| 事件名 | 说明 | 返回值 | | :----: | :------: | :-----------: | | change | 返回url | url |