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

@karpo-element/ele-form

v1.0.10

Published

针对公司业务新增组件,基于 ele-form 的表单组件

Downloads

1

Readme

@karpo-element/ele-form | 基于 element-ui 的数据驱动表单组件

使用说明

公司项目大多为基于element-ui的后台类项目,对于表单开发使用该组件可进行配置式开发。本组件参考vue-ele-form项目进行定制化开发。

快速开始

安装

npm i @karpo-element/ele-form

使用

import Vue from 'vue'
import App from './App.vue'
// 引入 element-ui
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 引入 vue-ele-form
import EleForm from '@karpo-element/ele-form'

Vue.config.productionTip = false

// 注册 element-ui
Vue.use(ElementUI)

// 注册 vue-ele-form
Vue.use(EleForm)

new Vue({
  render: h => h(App)
}).$mount('#app')

全局配置

!注意:不是 upload: { attrs: { action: "xxx"} },也就是不需要 attrs 包裹

// 在引入 EleForm 时,可以传入一个全局配置对象(可选), 例如:
Vue.use(EleForm, {
  // 所有和上传相关(上传图片, 上传视频, 富文本中图片上传)
  upload: {
    action: 'https://www.xxx.com/posts', // 请求地址,
    data: { token: 'xxx' }, // 附带的参数,
    responseFn (response) { // 处理响应结果
      return 'https://www.xxx.com/upload/' + response.id
    }
  },
  // number类型
  number: {
    min: 0 // 所有 number 类型, 最小值为 0
  }
})

局部注册

import EleForm from '@karpo-element/ele-form'

export default {
  components: { EleForm },
  // ....
}

可视化生成表单

f-render 演示图

f-render地址

说明

vue-ele-form 是基于 element-ui form 的二次封装, 主要特点:

而上面所说的一切只需要一行 html 和 数据即可实现, 即保证了质量, 又使得开发速度仿佛坐上 🚀!

文档

组件使用详细文档