Coder Social home page Coder Social logo

designer-antd's Introduction

form-create-designer-antd v3

这个是 Vue3 版本

MIT github

designer-antd 是基于原element版本用ant-design-vue实现 @form-create/ant-design-vue vue3版本实现的表单设计器组件。可以通过拖拽的方式快速创建表单,提高开发者对表单的开发效率,节省开发者的时间。

文档 | 在线演示 | form-create 文档

如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢!本项目还在不断开发完善中,如有任何建议或问题请在这里提出

本项目QQ讨论群629709230

demo1

安装

npm install @qingben/designer@latest

引入

CDN:

<link href="https://unpkg.com/[email protected]/dist/index.css"></link>
<script src="https://unpkg.com/vue@next"></script>
<script src="https://unpkg.com/[email protected]/dist/index.full.js"></script>
<script src="https://unpkg.com/@form-create/ant-design-vue@next/dist/form-create.min.js"></script>
<script src="https://unpkg.com/@form-create/designer@next/dist/index.umd.js"></script>

NodeJs:

npm install @qingben/designer-antd@latest

请自行导入ant-design-vue并挂载

import { designerForm, formCreate } from '@qingben/designer-antd';
import FcDesigner from '@qingben/designer-antd';

app.use(formCreate)
app.use(FcDesigner)

使用

<fc-designer ref="designer"/>

组件props

  • menuMenuList 重新配置拖拽的组件

  • heightint|string 设计器组件高度, 默认100%

组件方法

  • 获取当前生成表单的生成规则

    type getRule = () => Rule[]

    示例: this.$refs.designer.getRule()

  • 获取当前表单的全局配置

    type getOption = () => Object
  • 设置当前生成表单的规则

    type setRule = (rules: Rule[]) => void;
  • 设置当前表单的全局配置

    type setOption = (option: Object) => void;
  • 增加一组拖拽组件

    type addMenu = (menu: Menu) => void;
  • 删除一组拖拽组件

    type removeMenu = (name: string) => void;
  • 批量覆盖插入拖拽组件

    type setMenuItem = (name: string, items: MenuItem[]) => void;
  • 插入一个拖拽组件到分组

    type appendMenuItem = (name:string, item: MenuItem) => void;
  • 删除一个拖拽组件

    type removeMenuItem = (item: string | MenuItem) => void;
  • 新增一个拖拽组件的生成规则

    type addComponent = (item: DragRule) => void;

提示! 内置的三个组件分组name分别为: main,aide,layout

捐赠

donation.jpg

联系

License

MIT

Copyright (c) 2021-present xaboy

designer-antd's People

Contributors

qingbenzz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.