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

vue-form-craft

v3.0.11

Published

基于 [vue](https://github.com/vuejs/vue) 和 [element-ui](https://github.com/ElemeFE/element) 实现的表单设计器 + 渲染器

Downloads

138

Readme

vue-form-craft

基于 vueelement-ui 实现的表单设计器 + 渲染器

使用了最新的前端技术栈,可以让你免去vue项目中表单的烦恼。

ui

特性

  • 可视化设计表单
  • 支持三十多种的表单组件(el所有表单组件、内置组件)
  • 支持收集Array数据(自增组件)
  • 用法简单,又非常高效的表单联动
  • 可预览生成的json配置
  • 可预览生成的VUE组件
  • 高扩展性、支持自定义组件、支持各种ui组件库来替换ui
  • 支持表单填写校验
  • 组件无限深层嵌套,深层校验
  • 支持远程获取表单的schema,后台存储表单,前端在线修改

第三方插件

  • vuedraggable
  • element-ui
  • json-editor-vue3
  • codemirror
  • lodash
  • md-editor-v3

使用

版本要求

[email protected]

安装

npm i vue-form-craft
//或
yarn add vue-form-craft
//或
pnpm i vue-form-craft

全局注册

import { createApp } from 'vue'
import App from './App.vue'
import VueFormCraft from 'vue-form-craft'
const app = createApp(App)

app.use(VueFormCraft)
app.mount('#app')

使用

使用表单设计器

<template>
  <form-design @onSave="onSave" />
</template>

<script setup>

const onSave = (schema) => {
  console.log(schema)
}

</script>

使用表单渲染器

<template>
    <schema-form :schema="schema" footer  @onFinish="onFinish" />
</template>

<script setup>

const onFinish = (values) => {
  alert(JSON.stringify(values))
}

const schema = {
  "labelWidth": 150,
  "labelAlign": "right",
  "size": "default",
  "items": [
    {
      "label": "用户名",
      "component": "Input",
      "props": {
        "placeholder": "请输入用户名"
      },
      "designKey": "form-eNR0",
      "name": "username",
      "required": true
    },
    {
      "label": "密码",
      "component": "Password",
      "props": {
        "placeholder": "请输入密码"
      },
      "designKey": "form-D1x7",
      "name": "password",
      "required": true
    }
  ]
}
</script>