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

jdc-vue-toolkit

v1.0.15

Published

A Vue.js 2. UI Toolkit

Readme

链接

安装 & 使用

手动安装

在已有项目里手动安装 jdc-vue-toolkit 的包。

npm install jdc-vue-toolkit --save

引入

  • 使用 babel-plugin-importts-import-plugin (推荐)
import { TimeButton } from '@jd/jdc-vue-toolkit'
  • 按需引入
import TimeButton from '@jd/jdc-vue-toolkit/lib/time-button'
  • 全量引入
import Vue from 'vue'
import jdcVueToolkit from '@jd/jdc-vue-toolkit'
import 'jdc-vue-toolkit/lib/jdc-vue-toolkit.css'

Vue.use(jdcVueToolkit)

使用

选择需要的组件开始构建您的web应该,详细内容请查看快速上手

开发

git clone *****/jdc-vue-toolkit.git
cd jdc-vue-toolkit
npm install
npm run dev

打开浏览器访问http://127.0.0.1:4000, 详细内容请查看开发指南

新建组件

在components/组件名文件夹 - demo - index.vue - README.md 在components/index.js里添加对新组件的引用 在examples/demo-index.js 中export出组件

组件文档编写

cd site
npm install
npm run generate
npm run start

打开浏览器访问http://127.0.0.1:8080。 打开components对应组件里的README.md

如果组件菜单里,可以打开examples/components.json、demo-index.js添加

证书

jdc-vue-toolkit使用Apache License 2.0,查看证书

遇到的问题

    1. 报错: [Vue warn]: Failed to mount component: template or render function not defined.found in....

解决方法: examples/components.json中组件的name 必须与 examples/demo-index.js中 export {default as name} from 'xxx'的name一样。 例如: demo-index.js:

export {default as Dialog} from '../components/Dialog/demo'

components.json:

{
  "path": "/Dialog",
  "name": "Dialog", //如果此处name不是Dialog会抛出异常- 必须完全一致,大小写不一致也会报错
  "text": "弹出框"
},
    1. vue中使用jsx可以写成中划线写法。如果将<el-form>写做<ELForm> element-ui会无法识别,进而报错 (todo: 不知道跟按需引入有关系不? 在项目中全部引入elemnt-ui时可以渲染<ElForm>这种写法)
    1. 配置样式规范报错:
in ./node_modules/element-ui/lib/theme-chalk/fonts/element-icons.ttf

Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)

解决方法: 在webpack.base.conf.js中配置

   {
    test: /\.(eot|svg|ttf|woff|woff2)(\?\S*)?$/,
    loader: 'file-loader'
  }

todo

新组件

  • [ ] 文件下载组件
  • [ ] table单元格编辑组件(类似excel操作)

优化

  • [x] 添加了table全选/选择功能
  • [x] tableEvents事件举例
  • [x] currentPage pageSize命名不应该写死
  • [x] validate使用举例
  • [x] 将pagnation的所有属性和方法暴露出来
  • [x] table组件操作,根据row status显示操作,有时候每个项目每个状态都不一样,但是都要显示某个操作(比如详情)时,就会有问题 -@ 盛盟提出
  • [x] table组件pageSize报错 - @坤鹏提出
  • [ ] 文档整理 让人更易懂