# Example
The following is a demo and reference case for from-create
# Simple example
<template>
<form-create :rule="rule" v-model="fApi" :option="options"/>
</template>
<script>
export default {
data(){
return {
fApi:{},
options:{
onSubmit:(formData)=>{
alert(JSON.stringify(formData));
},
resetBtn:true
},
rule:[
{
type:'input',
field:'goods_name',
title:'goods name',
value:'form-create'
},
{
type:'checkbox',
field:'label',
title:'label',
value:[0,1,2,3],
options: [
{label:'easyToUse',value:0},
{label:'fast',value:1},
{label:'efficient',value:2},
{label:'allRound',value:3},
]
},
]
}
}
}
</script>
# Component Example
- Input (opens new window)
- AutoComplete (opens new window)
- Radio (opens new window)
- Cascader (opens new window)
- Upload (opens new window)
- Select (opens new window)
- Checkbox (opens new window)
- InputNumber (opens new window)
- TimePicker (opens new window)
- DatePicker (opens new window)
- Switch (opens new window)
- ColorPicker (opens new window)
- Rate (opens new window)
- Slider (opens new window)
- Tree (opens new window)
- Frame (opens new window)
- Array components/Component nesting (opens new window)
- control Configuration item (opens new window)
# Advanced components
# Function example
- Generate form using json parameter (opens new window)
- Use the maker generator to generate the form (opens new window)
- Validator Form Validation (opens new window)
- Dynamic Add Dynamic Add Component (opens new window)
- Bind two-way data binding (opens new window)
- Generate generate arbitrary components (opens new window)
- Event Event Extension (opens new window)
- Col Grid Layout Rule (opens new window)
# Case
← 1.x upgrade Demo →