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

ef-design

v1.0.18

Published

A draggable form component based on Element Plus

Readme

formDesign npm包

一个基于element plus+vue3的的可拖拽表单组件

1. 安装

npm i ef-design
yarn add ef-design
pnpm add ef-design

2. 使用

2.1 手动全引入

#在vue3项目中的main.ts文件中手动引入
import efDesign from 'ef-design';
#加载样式
import "ef-design/dist/design.css";

const app = createApp(App);
app.use(efDesign);
#加载element plus,否则dom节点无法正常渲染
app.use(ElementPlus);
app.mount("#app");

2.2. 在Vue 3.x模板中使用表单设计器组件

<template>
<div class="layout-tab-box">
    <form-design ref="formDesignRef" :form-data="formData" :key="formKey"></form-design>
     <el-button type="primary" @click=" <el-button type="primary" @click="submitForm">Submit</el-button>
">Submit</el-button>

</div>
<script setup>
const formDesignRef = ref(null);
const formData = ref({});
const jsonData = {"widgetList":[],"formConfig":{"modelName":"formData","refName":"vForm","rulesName":"rules","labelWidth":80,"labelPosition":"left","size":"","labelAlign":"label-left-align","cssCode":"","customClass":"","functions":"","layoutType":"PC","jsonVersion":3,"onFormCreated":"","onFormMounted":"","onFormDataChange":""}}


const submitForm = () => {
    let templateData = formDesignRef.value.getFormDesignJson();
    let formJson = formDesignRef.value.getFormJson();
    console.log('template data:', templateData, formJson);
}

onMounted(() => {
  let parentTemplate = JSON.parse(JSON.stringify(jsonData));
  formData.value = parentTemplate;
  formKey.value = !formKey.value;
})
</script>

<style lang="scss" scoped>
.layout-tab-box{
  height: calc(100vh - 225px);
}
</style>

2.3. 在Vue 3.x模板中使用表单渲染器组件

<template>
<div>
 <form-render :form-json="formJson" :form-data="formData" :option-data="optionData" ref="vFormRef">
 </form-render>
 <el-button type="primary" @click="submitForm">Submit</el-button>
</div>
</template>
<script setup>
import { ref, reactive } from 'vue'
import { ElMessage } from 'element-plus'

const formJson = reactive({"widgetList":[],"formConfig":{"modelName":"formData","refName":"vForm","rulesName":"rules","labelWidth":80,"labelPosition":"left","size":"","labelAlign":"label-left-align","cssCode":"","customClass":"","functions":"","layoutType":"PC","jsonVersion":3,"onFormCreated":"","onFormMounted":"","onFormDataChange":""}})
const formData = reactive({})
const optionData = reactive({})
const formRef = ref(null)

const submitForm = () => {
 formRef.value.getFormData().then(formData => {
   // Form Validation OK
   alert( JSON.stringify(formData) )
 }).catch(error => {
   // Form Validation failed
   ElMessage.error(error)
 })
}
</script>

2.4 资源链接

vForm3:https://www.vform666.com/

二次开发:https://www.ganweicloud.com/docs/6.1.0/pages/d3e6d9/#%E8%A1%A8%E5%8D%95%E7%BB%84%E4%BB%B6

3. 注意事项

可能有样式问题,建议在外层包一层div,再覆盖样式