复制成功!
<template>
<form-create v-model:api="fApi" :rule="rule" :option="options"/>
</template>
<script>
export default {
data() {
return {
fApi: {},
options: {
onSubmit: (formData) => {
alert(JSON.stringify(formData))
}
},
rule: [
{
type: 'input',
title: 'col24',
field: 'col24_1',
},
{
type: 'input',
title: 'col12',
field: 'col12_1',
col: {
span: 12
}
},
{
type: 'input',
title: 'col12',
field: 'col12_2',
col: {
span: 12
}
},
{
type: 'input',
title: 'col8',
field: 'col8_1',
col: {
span: 8
}
},
{
type: 'input',
title: 'col8',
field: 'col8_2',
col: {
span: 8
}
},
{
type: 'input',
title: 'col8',
field: 'col8_3',
col: {
span: 8
}
},
{
type: 'input',
title: 'col8|offset8',
field: 'col8_8',
col: {
span: 8,
offset: 8
}
}
]
}
}
}
</script>