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

@springleo/el-form-plus

v0.1.1

Published

## Install

Downloads

2

Readme

el-form-plus

Install

yarn add @springleo/el-form-plus

Online Example

https://lq782655835.github.io/el-form-plus

Quick Start

Import modules and set up settings in main.js:

import ElFormPlus from '@springleo/el-form-plus'
Vue.use(ElFormPlus)

use <el-form-plus> in your page

<template>
    <el-form-plus
        :formModel="{
            name: '',
            age: '',
            address: '',
            sex: '男'
        }"
        :fieldList="[
            { label: '姓名', value: 'name', type: 'input' },
            { label: '年龄', value: 'age', type: 'input' },
            { label: '家庭住址', value: 'address', type: 'select', options: ['地址1', '地址2'].map(str => ({label: str, value: str})) },
            { label: '性别', value: 'sex', type: 'radio-group', options: ['男', '女'].map(str => ({label: str, value: str})) }
        ]"
    />
</template>

you can get preview by above code:

image

API

el-form-plus Props

基于el-form,所以Props支持el-form上所有props以及事件event。

Prop | Type | Default | Description --- | --- | --- | --- refObj | Object | | 返回form引用,如果手动validate需要用到 formModel | Object | {} | el-form的model属性包装 fieldList | Array | item配置列表 | 详细见如下 rules | Object | {} | el-form的rules,可定义所有form-item的规则,优先级最高 labelWidth | string | 100px | el-form的labelWidth labelPosition | string | left | el-form的labelPosition

fieldList Attrs

Attr | Type | Default | Description --- | --- | --- | --- type | String | | 必需。渲染的组件类型,支持input、textarea、select、radio-group、input-number、date、slot。同时支持动态组件,为约束完全的动态性,动态组件的命名请以el-dynamic-开头。 value | String | | 必需。值字段,v-model绑定的值为this.data[value] label | String | | form-item标题 tooltip | String | | 标题附近的提示 disabled | Boolean | false | 是否禁用 placeholder | String | | 组件placeholder提示,默认input是‘请输入label’,select默认是‘请选择label’ required | Boolean | false | 校验规则:是否必须 pattern | Regex | | 校验规则:满足正则 validator | function | | 校验规则:自定义函数,最灵活 rules | Array<Rule> | | 以上三种attr校验属于快速校验规则,使用rules可一次性定义form-item的规则 options | Array | | 针对select和radio-group组件,配置options list

由于type=slot用到v-slot作用域插槽,vue版本需要v2.6+

License

MIT