From c735f4dd50b66cc3e5f7fdd07563291e04895aba Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Tue, 6 Apr 2021 10:35:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iscs_new/core/form/elementConst.js | 7 +++++-- src/iscs_new/core/form/form2Base.js | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/iscs_new/core/form/elementConst.js b/src/iscs_new/core/form/elementConst.js index 6880d7112..f8da62988 100644 --- a/src/iscs_new/core/form/elementConst.js +++ b/src/iscs_new/core/form/elementConst.js @@ -1,7 +1,10 @@ +import * as graphic from '../../core/graphic'; + +const elementType = Object.fromEntries(Object.keys(graphic).map(type => [type, type])); + export const elementConst = { - elementsList:[ - {code:'line', name:'线段', formList:{style:[], shape:[] }}, + [elementType.Line]: {code: elementType.Line, name:'线段', formList:{style:[], shape:[] }}, {code:'text', name:'文字', formList:{style:[], shape:[] }}, {code:'rect', name:'矩形', formList:{style:[], shape:[] }}, {code:'circle', name:'圆形', formList:{style:[], shape:[] }}, diff --git a/src/iscs_new/core/form/form2Base.js b/src/iscs_new/core/form/form2Base.js index 8ebbac736..88bebc05c 100644 --- a/src/iscs_new/core/form/form2Base.js +++ b/src/iscs_new/core/form/form2Base.js @@ -1,11 +1,14 @@ export default [ // number 0 控制图形的前后顺序。z 值小的图形会被 z 值大的图形覆盖。z 相比 zlevel 优先级更低,而且不会创建新的 Canvas。 - { prop: 'z', label: '层级 z', + { prop: 'z', + label: '层级 z', type: 'number', precisionFlag:0, min:0, max:100, step:1, - rules:[{ required: true, message:'请输入层级z', trigger: 'blur' }], - defValue: 1, required:true + rules:[ + { required: true, message:'请输入层级z', trigger: 'blur' } + ], + value: 1, + description: '' }, - // number 0 控制图形的前后顺序。z2 值小的图形会被 z2 值大的图形覆盖。z2 相比 z1 优先级更低,而且不会创建新的 Canvas。 { prop: 'z2', label: '层级 z2', type: 'number', precisionFlag:0, min:0, max:100, step:1, rules:[{ required: true, message:'请输入层级z2', trigger: 'blur' }],