Vue 动态生成表单组件 vue-generate-form

码农软件 · 软件分类 · Vue 组件 · 2019-03-19 23:27:40

软件介绍

项目地址

简介

Vue动态生成表单组件 可以根据数据配置表单 使用的UI库是iView 
在Vue里 一般要用到什么组件或数据 都得提前声明
所以要根据数据来生成表单 只能使用Vue的render函数
要做这一个组件 其实并不难 看一下Vue官方示例 再找个UI组件库 差不多就能写出来
如果对项目有兴趣 可以fork或克隆项目 自行研究 
有问题或BUG欢迎提issues

文档

在线DEMO

表单组件

  • Input 输入框

  • Button 按钮

  • Radio 单选框

  • Checkbox 多选框

  • Icon 图标

  • Switch 开关

  • Select 选择器

  • Slider 滑块

  • DatePicker 日期选择器

  • TimePicker 时间选择器

  • Cascader 级联选择器

  • InputNumber 数字输入框

  • Rate 评分

  • Upload 上传

  • ColorPicker 颜色选择器

使用

在单文件组件中引用

npm i vue-generate-form
import iView from 'iview'
import VueGenerateForm from 'vue-generate-form'
import 'iview/dist/styles/iview.css'

Vue.use(iView)
Vue.use(VueGenerateForm)
<template>
    <div id="app">
        <VueGenerateForm :options="options"/>
        // 或者 <vue-generate-form :options="options"/>
    </div>
</template>

在HTML文件中直接引用

使用的是dist目录中的vue-generate-form.js

<link rel="stylesheet" type="text/css" href="iview.css">
<div id="app">
    <vue-generate-form :options="options"/>
</div>
<script src="vue.js"></script>
<script src="iview.js"></script>
<script src="vue-generate-form.js"></script>

本文地址:https://www.codercto.com/soft/d/1729.html

Coding the Matrix

Coding the Matrix

Philip N. Klein / Newtonian Press / 2013-7-26 / $35.00

An engaging introduction to vectors and matrices and the algorithms that operate on them, intended for the student who knows how to program. Mathematical concepts and computational problems are motiva......一起来看看 《Coding the Matrix》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

MD5 加密
MD5 加密

MD5 加密工具