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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dpzvc-ui

v2.0.3

Published

Vue组件库

Readme

dpzvc-ui

一、说明

一套基于 Vue 2.X 的h5移动端通用组件库,提供丰富 UI 组件,兼容最新Vue2.7 Cli项目(可以在Vue2.7 Cli项目直接引用组件并使用)使用最新的Webpack5构建,并支持 组件以及CSS样式全量引入按需引入,同时提供公共样式、基础工具样式和服务组件方法(如 Message、Modal、Indicator)。会一直不断完善体验,使用过程有问题欢迎在https://github.com/yishide/dpzvc/issues提交bug,看到了会及时修复。后续会开发基于Vue3版本的移动端组件库升级,敬请期待!!!


二、组件库预览地址(查看各个组件库的使用效果)

   https://yishide.github.io/dpzvc/#/guide

三、安装

npm install dpzvc-ui

四、全量使用

全量引入组件库,包括 JS 组件和全量 CSS 样式(适合小型项目或快速开发)。

  1. 引入组件库 JS
import Vue from 'vue'
import Dpzvc from 'dpzvc-ui'

Vue.use(Dpzvc)
  1. 引入全量样式

/* 在入口文件或全局样式中引入 */

@import "~dpzvc-ui/dist/styles/dpzvc.css";

此方式会包含 components、base、utils 下的全部样式。

五、按需使用

按需引入可以减小打包体积,只引入你需要的组件及样式。

  1. 引入组件
import Vue from 'vue'
import { VButton, Badge } from 'dpzvc-ui'
Vue.use(VButton)
Vue.use(Badge)
  1. 引入组件 CSS
@import "~dpzvc-ui/dist/styles/components/button.css";
@import "~dpzvc-ui/dist/styles/components/badge.css";
  1. 公共样式按需引入(可选)建议全部加上
@import "~dpzvc-ui/dist/styles/base/font.css";
@import "~dpzvc-ui/dist/styles/base/variable.css";
@import "~dpzvc-ui/dist/styles/base/reset.css";
@import "~dpzvc-ui/dist/styles/utils/1px.css";
@import "~dpzvc-ui/dist/styles/utils/animation.css";
@import "~dpzvc-ui/dist/styles/utils/nowrap.css";

注意:按需引入组件时,如果组件依赖变量或 mixin,需要保证 base / utils 样式已引入。


六、服务组件使用

dpzvc-ui 提供一些 服务组件,无需注册即可使用,如: • Message • Modal • Prompt • Indicator

使用示例

import Vue from 'vue'
import Dpzvc from 'dpzvc-ui'
import { Message, Modal, Prompt, Indicator } from 'dpzvc-ui'
Vue.use(Message)
Vue.use(Modal)
Vue.use(Prompt)
Vue.use(Indicator)

// 直接使用服务组件 this指向Vue实例
this.$Message.show('操作成功!')
this.$Modal.confirm({body:'这是内容',onOk:function(){})
this.$Prompt.info({title:'Prompt',spec:'ccc',text:'vvvv'})
this.$Indicator.blade()

七、目录结构(dist 打包示例)

dist/
 └── styles/
      ├── dpzvc.css               # 全量 CSS
      ├── components/
      │     ├── button.css
      │     ├── badge.css
      │     └── ...
      ├── base/
      │     ├── reset.css
      │     ├── variables.css
      │     └── ...
      └── utils/
            ├── mixins.css
            └── ...

八、开发和调试

开发组件请放在 src/components
•	公共变量、样式放在 src/styles/base
•	工具 mixin 放在 src/styles/utils
•	组件样式放在 src/styles/components
•	Gulp 任务已支持按需打包和全量打包

九、注意事项

1.	按需引入组件时,请确保 依赖的 base / utils 样式 已引入,否则可能出现变量未定义的错误。
2.	服务组件如 Message、Modal 等无需单独注册,全局可直接使用。
3.	全量引入适合快速开发,但会增加打包体积;按需引入可减小体积,推荐生产环境使用。

现在可以开始在项目中愉快地使用 dpzvc-ui 组件库了 🎉

十、我要支持作者

如果该项目组件库帮到了您,节省了您宝贵的开发时间,还请您不吝给项目点个免费的赞。 当然了,如果您能请作者喝杯咖啡,哪怕喝瓶娃娃哈矿泉水,也是对作者最真诚的鼓励, 微信收款码打赏图片 支付宝收款码打赏图片