官網:https://vxeui.com
<template>
<div>
<vxe-form v-bind="formOptions"></vxe-form>
</div>
</template>
<script>
export default {
data () {
const formOptions = {
border: true,
titleBackground: false,
verticalAlign: 'center',
titleWidth: 100,
data: {
name: 'test1',
nickname: 'Testing',
sex: '女',
age: '22',
mobile: '',
professionalSkill: '',
educationExperience: '',
workExperience: '',
projectExperience: '',
selfEvaluation: ''
},
items: [
{ title: '個人簡歷', field: 'name', span: 24, titleAlign: 'center', showContent: false, titleBold: true },
{ field: 'name', title: '名稱', span: 12, itemRender: { name: 'VxeInput' } },
{ field: 'sex', title: '性別', span: 12, itemRender: { name: 'VxeInput' } },
{ field: 'age', title: '年齡', span: 12, itemRender: { name: 'VxeNumberInput', props: { type: 'integer' } } },
{ field: 'mobile', title: '聯絡電話', span: 12, itemRender: { name: 'VxeInput', props: { type: 'integer' } } },
{ field: 'educationExperience', title: '教育經歷', span: 24, vertical: true, itemRender: { name: 'VxeTextarea', props: { autosize: { minRows: 2, maxRows: 8 } } } },
{ field: 'professionalSkill', title: '專業技能', span: 24, vertical: true, itemRender: { name: 'VxeTextarea', props: { autosize: { minRows: 4, maxRows: 8 } } } },
{ field: 'workExperience', title: '工作經歷', span: 24, vertical: true, itemRender: { name: 'VxeTextarea', props: { autosize: { minRows: 4, maxRows: 8 } } } },
{ field: 'projectExperience', title: '專案經驗', span: 24, vertical: true, itemRender: { name: 'VxeTextarea', props: { autosize: { minRows: 4, maxRows: 8 } } } },
{ field: 'selfEvaluation', title: '自我評價', span: 24, vertical: true, itemRender: { name: 'VxeTextarea', props: { autosize: { minRows: 4, maxRows: 8 } } } },
{
align: 'center',
span: 24,
itemRender: {
name: 'VxeButtonGroup',
options: [
{ type: 'submit', content: '提交', status: 'primary' },
{ type: 'reset', content: '重置' }
]
}
}
]
}
return {
formOptions
}
}
}
</script>
https://gitee.com/x-extends/vxe-pc-ui