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

el-form-render

v2.0.10

Published

vue3 + element-plus render form-item easily

Readme

el-form-render

📖 介绍

What

el-form-render 基于 element-plus,但不限于 element-plus 组件。在完全继承 el-form 属性的基础上,进行扩展。一些非表单组件或自定义组件,例如图片上传和富文本编辑器,也可以集成,因此,用户可以使用一段json来呈现完整的表单。

Why

在我们的日常开发中,有很多带有表单的页面,通常形式结构相似,逻辑重复。el-form-render 没有复杂的逻辑。它仅将JSON转换为呈现表单项,节省编写业务逻辑的时间和精力,并减少重复代码。

📄 文档

https://huodoushigemi.github.io/el-form-render

🦄 快速开始

pnpm add el-form-render
<template>
  <Form ref="form" :model="model" :items="items" @submit="$refs.form.validate()" @reset="$refs.form.resetFields()">
    <el-form-item>
      <el-button type="primary" native-type="submit">提交</el-button>
      <el-button native-type="reset">重置</el-button>
    </el-form-item>
  </Form>
  
  <code><pre>model: {{ JSON.stringify(model, null, '  ') }}</pre></code>
</template>

<script setup>
import { reactive } from 'vue'
import Form from 'el-form-render'

const model = reactive({})

const items = [
  { lp: ['姓名', 'name'] },
  { lp: ['年龄', 'age'] },
  { lp: ['性别', 'sex'], type: 'switch' },
  { is: 'el-divider', children: '分割线' },
  { lp: ['备注', 'remark'], el: { type: 'textarea', autosize: { minRows: 2, maxRows: 4 } } }
]
</script>

📃 Item 属性

| 属性名 | 类型 | 默认值 | 描述 | | ------------ | ------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | lp | string[] | | label prop 的缩写 | | type | string | | 可以是 input select switch radio-group……默认 input,如果传入 options 属性则默认 select | | options | any[] | | | | get | (v, o) => any | | 格式化组件的输入值 | | set | (v, o) => any | | 格式化组件的输出值 | | el | object | | 输入组件的属性 | | defaultValue | any | | 默认值 | | is | string | ElFormItemRender | 渲染的组件名称,可以是任何组件 | | vIf | () => boolean | true | 控制组件是否渲染 |

其他属性与 el-form-item 完全一致

💡 Inspiration

thanks to el-form-renderer

👏 Contributing

If you have any questions or requests or want to contribute, please write the issue or give me a Pull Request freely.