# vue-form-create **Repository Path**: fuchengwei/vue-form-create ## Basic Information - **Project Name**: vue-form-create - **Description**: 基于Vue3.0的表单设计器 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 120 - **Forks**: 33 - **Created**: 2021-04-14 - **Last Updated**: 2025-06-23 ## Categories & Tags **Categories**: vue-extensions **Tags**: None ## README # vue-form-create 基于 Vue3.0 + TS 的自定义表单生成器。支持 npm 与 cdn 引入的方式。UI 库支持 ant-design-vue 与 element-plus。  ### 支持功能 - 远端数据获取 - 图片上传 - 富文本编辑器 - 栅格布局 - 生成 JSON - 生成代码 ### 演示地址(github) [https://fuchengwei.github.io/vue-form-create/example/index.html](https://fuchengwei.github.io/vue-form-create/example/index.html) ### 演示地址(gitee) [http://fuchengwei.gitee.io/vue-form-create](http://fuchengwei.gitee.io/vue-form-create) ### github [https://github.com/fuchengwei/vue-form-create](https://github.com/fuchengwei/vue-form-create) ### npm [https://www.npmjs.com/package/vue-form-create](https://www.npmjs.com/package/vue-form-create) ## 1 安装 ### 使用 npm 或 yarn 安装 **我们推荐使用 npm 或 yarn 的方式进行开发**,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。 ```shell $ npm install vue-form-create --save ``` ```shell $ yarn add vue-form-create ``` ### 浏览器引入 在浏览器中使用 `script` 标签直接引入文件,并使用全局变量 `formCreate`。 我们在 npm 发布包内的 `vue-form-create/dist`提供了 `formCreate.common.js` `formCreate.umd.js` `formCreate.umd.min.js`。你也可以通过 [](https://www.jsdelivr.com/package/npm/vue-form-create) 或 [UNPKG](https://unpkg.com/vue-form-create/dist/) 进行下载。 ```javascript ``` ### 注意 1. 无论 npm 或者 cdn 引入都需要在全局引入 [ant-design-vue](https://2x.antdv.com/docs/vue/introduce-cn) 或 [element-plus](https://element-plus.gitee.io/#/zh-CN) 。并且项目依赖了 [acejs](https://github.com/ajaxorg/ace) , 需要在全局使用 cdn 的方式引入。 ```javascript ``` 2. cdn 引入 ant-design-vue 需要自行引入 [moment](http://momentjs.com/) 。 3. 不想在全局安装也可以在组件内直接使用相应的组件。 ```javascript import { AntdDesignForm, ElDesignForm, AntdGenerateForm, ElGenerateForm } from 'vue-form-create' ``` ### 示例 **npm 引入** ```javascript import { createApp } from 'vue' import antd from 'ant-design-vue' import App from './App.vue' import DesignForm from 'vue-form-create' import 'ant-design-vue/dist/antd.css' createApp(App) .use(antd) .use(DesignForm) .mount('#app') ``` **浏览器引入** ```html