Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alfred-skyblue/v-form-antd
基于ant-design-vue的可视化表单生成器
https://github.com/alfred-skyblue/v-form-antd
ant-design form typescript vue vue3
Last synced: 20 days ago
JSON representation
基于ant-design-vue的可视化表单生成器
- Host: GitHub
- URL: https://github.com/alfred-skyblue/v-form-antd
- Owner: Alfred-Skyblue
- License: mit
- Created: 2021-12-09T04:21:34.000Z (almost 3 years ago)
- Default Branch: dev
- Last Pushed: 2023-01-16T08:29:52.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T09:11:45.863Z (about 1 month ago)
- Topics: ant-design, form, typescript, vue, vue3
- Language: Vue
- Homepage: https://alfred-skyblue.github.io/v-form-antd/
- Size: 8.05 MB
- Stars: 149
- Watchers: 7
- Forks: 31
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# v-form-antd
[![MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/Alfred-Skyblue/v-form-antd)
[![github](https://img.shields.io/badge/Author-Alfred_Skyblue-blue.svg)](https://github.com/Alfred-Skyblue)
[![CompositionAPI](https://img.shields.io/badge/Composition-API-green.svg)](https://github.com/vuejs/composition-api)![](https://photos-1301289647.cos.ap-shanghai.myqcloud.com/github/custom-cmp.gif)
## 简介
本项目参考自[k-form-design](https://github.com/Kchengz/k-form-design),支持自定义组件、表单联动等高级功能,使用 vue2 + CompositionAPI + ts 实现伪 vue3 应用+ [表单设计器](https://yuan_fangy.gitee.io/v-form-design/)
+ [github](https://github.com/Alfred-Skyblue/v-form-antd)
+ [码云](https://gitee.com/yuan_fangY/v-form-antd)
+ [Document](https://alfred-skyblue.github.io/v-form-antd/)
+ [国内文档地址](https://yuan_fangy.gitee.io/v-form-antd/)## 使用方法
1. 安装
```shell
yarn add v-form-antd
# or
npm install v-form-antd
```2. 在vue中使用
```javascript
// main.js
import Vue from 'vue'
import VFormAntd from 'v-form-antd'
import 'v-form-antd/lib/index.css'Vue.use(VFormAntd)
```3. 使用表单设计器
```vue
```
4. 使用v-form-create渲染表单
```vue
提交
export default {
data () {
return {
fApi:{},
formData:{},
formConfig: {
formItems: [
{
type: 'input',
label: '姓名',
field: 'name',
span: 12,
props: {
type: 'text'
}
},
{
type: 'number',
label: '年龄',
field: 'age',
span: 12,
props: {}
}
],
config: {
layout: 'horizontal',
labelLayout: 'flex',
labelWidth: 100,
labelCol: {},
wrapperCol: {}
}
}
}
},
methods: {
async submit() {
const data = await this.fApi.submit()
console.log(data)
}
}
}```