调整结构

This commit is contained in:
ival 2021-04-06 10:35:12 +08:00
parent 2508d084d0
commit c735f4dd50
2 changed files with 12 additions and 6 deletions

View File

@ -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:[] }},

View File

@ -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' }],