hot-form
Version:
A project developed based on ant-design-vue and vant whitch do some things on create/render/modify and etc. for forms. Also can custom some component on the form items if you want. 一个基于antdv/vant开发的创建表单组件,包含表单渲染、表单编辑页面、以及植入自定义附加内容的组件
104 lines (103 loc) • 2.72 kB
JavaScript
// 文件上传测试表单项
export const fileFormList = {
lists: [
{
_id: 'date-1631070971663',
key: 'date',
attrs: { type: 'date', placeholder: '请输入日期' },
extra: {},
label: '日期',
props: { value: '123', defaultValue: '123' },
rules: { warning: '请选择日期', required: false },
style: {},
valid: true,
className: [],
},
{
_id: 'image-1631070977505',
key: 'image',
attrs: {},
extra: {},
label: '图片显示',
props: { value: '', defaultValue: '' },
rules: {
link: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fblog%2F201307%2F25%2F20130725222557_f8AU4.jpeg&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1633663113&t=2d8fdae51d2a540b7d69e9de4511ecd2',
position: 'center',
},
style: {},
valid: false,
className: [],
},
{
_id: 'time-1631071197446',
key: 'time',
attrs: { type: 'time', placeholder: '请选择时间' },
extra: {},
label: '时间',
props: { value: '', defaultValue: '' },
rules: { warning: '请选择时间', required: false },
style: {},
valid: true,
className: [],
},
{
_id: 'divider-1631071360067',
key: 'divider',
attrs: {},
extra: {},
label: '',
props: {},
rules: {},
style: {},
valid: false,
className: [],
},
{
_id: 'divider-1631071386158',
key: 'divider',
attrs: {},
extra: {},
label: '',
props: {},
rules: {},
style: {},
valid: false,
className: [],
},
{
_id: 'rate-1631071391657',
key: 'rate',
attrs: {},
extra: {},
label: '评分',
props: { value: 0, defaultValue: 0 },
rules: { count: 5, warning: "请评分", required: false, allowHalf: true },
style: {},
valid: true,
className: [],
},
{
_id: 'file-1631071400584',
key: 'file',
attrs: { type: 'file' },
extra: {},
label: '上传附件',
props: { value: [], defaultValue: [] },
rules: { max: 1, accept: [], warning: '请选择文件', required: false },
style: {},
valid: true,
className: [],
}
],
headers: {
_id: 'header',
key: 'header',
title: '上传附件表单',
submitTxt: '提交',
themeBack: '#fff',
titleBack: '#fff',
submitBack: '#52A7B5',
titleColor: '#333',
submitColor: '#fff',
},
};