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

hjm-vue-ui

v0.1.0

Published

vueUi组件库

Downloads

1

Readme

hjm-vue-ui

介绍

  1. 开发属于自己的ui组件库

项目架构

.
|—— lib                       // 打包生成文件
|—— examples                  // 例子文件夹(对应vue-cli创建项目的src文件夹)
|   |—— assets                // 例子所用资源文件
|   |—— components            // 例子组件库
|   |—— App.vue               // vue首页
|   └── main.js              
|—— packages                  // UI组件源码
|   |—— button                // 组件文件
|   |   |—— src               
|   |   |   └── button.js     // 组件
|   |   |—— button.css        // 组件样式
|   |   └── index.js          // 组件入口
|   |—— style                 // 组件公用css样式
|   |   |—— common            
|   |   |   └── var.css       // css变量
|   |   |—— fonts             // 字体图标库
|   |   └── reset.css         // 样式重置
|   └── index.js              // 组件方法汇总    
|—— public                    // 静态页面
|—— .eslintrc.js
|—— .gitignore                // 限制git上传文件
|—— .browserslistrc
|—— babel.config.js
|—— package.json              // 本地npm管理文件  
|—— JEST.md                   // 单元测试说明(暂时没有集成)
|—— CHANGELOG.md              // 更新日志
|—— README.md                 // 项目说明
|—— vue.config.js             // vue脚手架配置
.

使用教程

  1. 安装npm包: npm i hjm-vue-ui

  2. 在项目中使用


//在main.js注入

// 方法一: 直接引入

// 导入组件库
import hjmui from "hjm-vue-ui";
// 注册组件库
Vue.use(hjmui.hjmButton); //单独注入

// 方法二: 使用打包后文件
import "hjm-vue-ui/lib/hjmui.css";
import hjmui from "hjm-vue-ui/lib/hjmui.umd.min";
Vue.use(hjmui.hjmButton);

// 在项目中使用过滤器

<hjm-button class="btn" :disabled="true" type="success" size="mini">
  <p>你好小白</p>
</hjm-button>

开发说明

  1. examples目录下为例子说明(后期添加markdown)

  2. packages下面为ui组件开发(一定要规范)

  3. 单个UI导出,分类别区分UI组件

  4. 效果测试与查看

// main.js
// 导入组件库
import { hjmui } from "../packages/index";
// 注册组件库
Vue.use(hjmui);
  1. index.html中测试
  <hjm-button class="btn" :disabled="true" type="success" size="mini">
    <p>你好小白</p>
  </hjm-button>

运行项目

  1. npm run serve 运行项目demo查看测试效果
  2. npm run build 打包项目(可以用于生成官网)
  3. npm run lib 打包ui组件库文件,支持js引入(注意:发布包前需要打包组件)