mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 01:01:52 +08:00
Form 动态表单,增加基础表单
This commit is contained in:
parent
d2420212a6
commit
4c56a07c4e
@ -1,29 +1,29 @@
|
||||
export default [
|
||||
{
|
||||
layout: 'colFormItem',
|
||||
tagIcon: 'input',
|
||||
label: '手机号',
|
||||
vModel: 'mobile',
|
||||
formId: 6,
|
||||
tag: 'el-input',
|
||||
placeholder: '请输入手机号',
|
||||
defaultValue: '',
|
||||
span: 24,
|
||||
style: { width: '100%' },
|
||||
clearable: true,
|
||||
prepend: '',
|
||||
append: '',
|
||||
'prefix-icon': 'el-icon-mobile',
|
||||
'suffix-icon': '',
|
||||
maxlength: 11,
|
||||
'show-word-limit': true,
|
||||
readonly: false,
|
||||
disabled: false,
|
||||
required: true,
|
||||
changeTag: true,
|
||||
regList: [{
|
||||
pattern: '/^1(3|4|5|7|8|9)\\d{9}$/',
|
||||
message: '手机号格式错误'
|
||||
}]
|
||||
// layout: 'colFormItem',
|
||||
// tagIcon: 'input',
|
||||
// label: '手机号',
|
||||
// vModel: 'mobile',
|
||||
// formId: 6,
|
||||
// tag: 'el-input',
|
||||
// placeholder: '请输入手机号',
|
||||
// defaultValue: '',
|
||||
// span: 24,
|
||||
// style: { width: '100%' },
|
||||
// clearable: true,
|
||||
// prepend: '',
|
||||
// append: '',
|
||||
// 'prefix-icon': 'el-icon-mobile',
|
||||
// 'suffix-icon': '',
|
||||
// maxlength: 11,
|
||||
// 'show-word-limit': true,
|
||||
// readonly: false,
|
||||
// disabled: false,
|
||||
// required: true,
|
||||
// changeTag: true,
|
||||
// regList: [{
|
||||
// pattern: '/^1(3|4|5|7|8|9)\\d{9}$/',
|
||||
// message: '手机号格式错误'
|
||||
// }]
|
||||
}
|
||||
]
|
||||
|
@ -72,6 +72,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</draggable>
|
||||
<!-- 动态表单 -->
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="表单名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入表单名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开启状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.SYS_COMMON_STATUS)"
|
||||
:key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@ -177,7 +192,7 @@ export default {
|
||||
return {
|
||||
logo,
|
||||
idGlobal: 100,
|
||||
formConf,
|
||||
formConf, //
|
||||
inputComponents,
|
||||
selectComponents,
|
||||
layoutComponents,
|
||||
@ -190,7 +205,16 @@ export default {
|
||||
dialogVisible: false,
|
||||
generateConf: null,
|
||||
showFileName: false,
|
||||
activeData: drawingDefalut[0]
|
||||
activeData: drawingDefalut[0],
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [{ required: true, message: "表单名不能为空", trigger: "blur" }],
|
||||
status: [{ required: true, message: "开启状态不能为空", trigger: "blur" }],
|
||||
fields: [{ required: true, message: "表单配置不能为空", trigger: "blur" }],
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
Loading…
Reference in New Issue
Block a user