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 🙏

© 2026 – Pkg Stats / Ryan Hefner

jim-ui

v0.0.6

Published

practical UI for Vue.js

Readme

jui

Practical UI for Vue.js

Inspired by Semantic-ui and Element-ui

image

为什么做这个UI

通常,开发Vue.js的项目时,UI框架首选是 饿了么的Element UI。

其中,表单这一块经常用,而Element UI的表单太繁琐,这就是出发点。

为了方便使用,最终表单的校验方式同样使用了async-validator

安装

由于jui这个名字已经被注册,所以在npm注册的名字是jim-ui

npm install jim-ui

项目规划

第一阶段:完成组件:(2017.11.22已完成)

  • Button 按钮
  • Input 输入框
  • Radio 单选框
  • Checkbox 复选框
  • Toggle 开关
  • Form 表单

第二阶段:完善Form相关的组件,包含:

  • DropDown 选择器
  • DatePicker 日期选择器

第三阶段:继续完善其他组件:

  • Upload 上传
  • Loading 加载状态
  • Modal 弹框

(...未完待续)

表单用法

template部分:

<j-form :formData="data" :errorData="error" ref="form" :rules="rules">

  <j-form-item label="账号" prop="name">
    <j-input></j-input>
  </j-form-item>
  
  <j-form-item label="密码" prop="password">
    <j-input type="password"></j-input>
  </j-form-item>
  
  <j-form-item>
    <j-button @click="submit">submit</j-button>
  </j-form-item>
  
</j-form>

JavaScript逻辑部分:

export default {
  data() {
    return {
      data: {},
      rules: {},
      error: {}
    }
  },
  methods: {
    submit() {
      this.$refs.form.validate((data) => {
        console.log(data)
      })
    }
  }
}

组件

form

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |label-position|标签文本的位置|string|left,right|right| |error-template|默认的错误模板|string|-|[prop]不能为空 |formData|表单数据|object|-|-| |rules|验证规则(async-validator)|object|-|-| |errorData|错误信息|object|-|-|

form-item

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |prop|字段属性|string|-|-| |label|标签文本|string|-|-| |type|数据类型|string|-|text| |required|是否必填|boolean|true,false|true| |show-message|是否显示错误信息|boolean|true,false|true| |labelWidth|标签的宽度|string|-|80px| |contentWidth|内容的宽度|string|-|160px|

button

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |type|类型|string|-|text| |plain|朴素风格|boolean|true,false|false| |disable|不可点击状态|boolean|true,false|false| |loading|加载状态|boolean|true,false|false| |nativeType|原生类型|string|-|button|

input

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |type|类型|string|-|text| |value|数值|string/number|-|-| |readonly|是否只读|boolean|true,false|false| |disable|不可使用状态|boolean|true,false|false| |loading|加载状态|boolean|true,false|false| |prefixIcon|前置图标|string|-|-| |suffixIcon|后置图标|string|-|-| |placeholder|原生属性|string|-|-| |name|原生属性|string|-|-| |max|原生属性|string|-|-| |min|原生属性|string|-|-| |step|原生属性|string|-|-| |autofocus|原生属性|string|-|-| |form|原生属性|string|-|-| |disabled|原生属性|string|-|-| |autoComplete|原生属性|string|-|-| |focus|获取焦点触发事件|function|-|-| |blur|失去焦点触发事件|function|-|-| |change|数值改变时触发事件|function|-|-|

radio

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |name|原生属性|string|-|-| |readonly|是否只读|boolean|true,false|false| |checked|是否已选择|boolean|true,false|false|

radio-group

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |options|选项|array|-|-| |value|数值|string/number|-|-|

checkbox

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |name|原生属性|string|-|-| |readonly|是否只读|boolean|true,false|false| |checked|是否已选择|boolean|true,false|false|

checkbox-group

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |options|选项|array|-|-| |value|数值|string/number|-|-|

toggle

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |name|原生属性|string|-|-| |checked|是否已选择|boolean|true,false|false|

dropdown

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |name|原生属性|string|-|-| |options|选项|array|-|-| |defaultText|默认文案|string|-|请选择|

loading

|参数|说明|类型|可选值|默认值| |--|--|--|--|--| |type|图标类型|string|rotate-plane、sk-circle、sk-fading-circle、double-bounce、rect、cube、bounce|rotate-plane| |loading|是否正在加载|boolean|true,false|false| |mask|遮罩|boolean|true,false|true| |noText|是否显示文案|boolean|true,false|false| |text|文案|string|-|正在加载...|