From 4c56a07c4e385125abc200dcbfda87b928ff399a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 30 Dec 2021 22:06:07 +0800 Subject: [PATCH] =?UTF-8?q?Form=20=E5=8A=A8=E6=80=81=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=9F=BA=E7=A1=80=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/utils/generator/drawingDefalut.js | 50 +++++++++---------- .../src/views/bpm/form/build/index.vue | 28 ++++++++++- 2 files changed, 51 insertions(+), 27 deletions(-) diff --git a/yudao-admin-ui/src/utils/generator/drawingDefalut.js b/yudao-admin-ui/src/utils/generator/drawingDefalut.js index 09f133ca1..c1469c694 100644 --- a/yudao-admin-ui/src/utils/generator/drawingDefalut.js +++ b/yudao-admin-ui/src/utils/generator/drawingDefalut.js @@ -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: '手机号格式错误' + // }] } ] diff --git a/yudao-admin-ui/src/views/bpm/form/build/index.vue b/yudao-admin-ui/src/views/bpm/form/build/index.vue index 92291e981..21b35a00c 100644 --- a/yudao-admin-ui/src/views/bpm/form/build/index.vue +++ b/yudao-admin-ui/src/views/bpm/form/build/index.vue @@ -72,6 +72,21 @@ + + + + + + + + {{dict.label}} + + + + + + @@ -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: {