修改代码

This commit is contained in:
ival 2021-04-08 09:36:25 +08:00
parent 9d8ccd5a67
commit 4357eec04f
2 changed files with 78 additions and 61 deletions

View File

@ -24,7 +24,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '起始点横坐标' description: '起始点横坐标'
},{ },
{
prop: 'y1', prop: 'y1',
label: '起始点纵坐标', label: '起始点纵坐标',
type: types.Number, type: types.Number,
@ -35,7 +36,8 @@ export const elementConst = {
], ],
value: 100, value: 100,
description: '起始点纵坐标' description: '起始点纵坐标'
},{ },
{
prop: 'x2', prop: 'x2',
label: '终止点横坐标', label: '终止点横坐标',
type: types.Number, type: types.Number,
@ -46,7 +48,8 @@ export const elementConst = {
], ],
value: 100, value: 100,
description: '终止点横坐标' description: '终止点横坐标'
},{ },
{
prop: 'y2', prop: 'y2',
label: '终止点纵坐标', label: '终止点纵坐标',
type: types.Number, type: types.Number,
@ -102,7 +105,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '左上角横坐标' description: '左上角横坐标'
},{ },
{
prop: 'y', prop: 'y',
label: '左上角纵坐标', label: '左上角纵坐标',
type: types.Number, type: types.Number,
@ -113,7 +117,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '左上角纵坐标' description: '左上角纵坐标'
},{ },
{
prop: 'width', prop: 'width',
label: '宽度', label: '宽度',
type: types.Number, type: types.Number,
@ -124,7 +129,8 @@ export const elementConst = {
], ],
value: 50, value: 50,
description: '宽度' description: '宽度'
},{ },
{
prop: 'height', prop: 'height',
label: '高度', label: '高度',
type: types.Number, type: types.Number,
@ -135,7 +141,8 @@ export const elementConst = {
], ],
value: 50, value: 50,
description: '高度' description: '高度'
},{ },
{
prop: 'r', prop: 'r',
label: '圆角矩形半径', label: '圆角矩形半径',
type: types.NumberArray, type: types.NumberArray,
@ -190,7 +197,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心纵坐标' description: '圆心纵坐标'
},{ },
{
prop: 'r', prop: 'r',
label: '半径', label: '半径',
type: types.Number, type: types.Number,
@ -280,7 +288,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心横坐标' description: '圆心横坐标'
},{ },
{
prop: 'y', prop: 'y',
label: '圆心纵坐标', label: '圆心纵坐标',
type: types.Number, type: types.Number,
@ -291,7 +300,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心纵坐标' description: '圆心纵坐标'
},{ },
{
prop: 'r', prop: 'r',
label: '半径', label: '半径',
type: types.Number, type: types.Number,
@ -302,7 +312,8 @@ export const elementConst = {
], ],
value: 40, value: 40,
description: '半径' description: '半径'
},{ },
{
prop: 'n', prop: 'n',
label: '边数', label: '边数',
type: types.Number, type: types.Number,
@ -346,7 +357,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心横坐标' description: '圆心横坐标'
},{ },
{
prop: 'cy', prop: 'cy',
label: '圆心纵坐标', label: '圆心纵坐标',
type: types.Number, type: types.Number,
@ -357,7 +369,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心纵坐标' description: '圆心纵坐标'
},{ },
{
prop: 'rx', prop: 'rx',
label: '横向半径', label: '横向半径',
type: types.Number, type: types.Number,
@ -366,9 +379,10 @@ export const elementConst = {
rules:[ rules:[
{ required: true, message:'请输入横向半径', trigger: 'blur' } { required: true, message:'请输入横向半径', trigger: 'blur' }
], ],
value: 50, value: 30,
description: '横向半径' description: '横向半径'
},{ },
{
prop: 'ry', prop: 'ry',
label: '纵向半径', label: '纵向半径',
type: types.Number, type: types.Number,
@ -402,7 +416,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心横坐标' description: '圆心横坐标'
},{ },
{
prop: 'cy', prop: 'cy',
label: '圆心纵坐标', label: '圆心纵坐标',
type: types.Number, type: types.Number,
@ -413,7 +428,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心纵坐标' description: '圆心纵坐标'
},{ },
{
prop: 'r', prop: 'r',
label: '半径', label: '半径',
type: types.Number, type: types.Number,
@ -424,29 +440,36 @@ export const elementConst = {
], ],
value: 50, value: 50,
description: '半径' description: '半径'
},{ },
{
prop: 'startAngle', prop: 'startAngle',
label: '起始弧度', label: '起始弧度',
type: types.Number, type: types.Number,
precision: 0, precision: 0,
step:1, step:1,
min: 0,
max: Math.PI*2,
rules:[ rules:[
{ required: true, message:'请输入起始弧度', trigger: 'blur' } { required: true, message:'请输入起始弧度', trigger: 'blur' }
], ],
value: 50, value: 0,
description: '起始弧度' description: '起始弧度'
},{ },
{
prop: 'endAngle', prop: 'endAngle',
label: '终止弧度', label: '终止弧度',
type: types.Number, type: types.Number,
precision: 0, precision: 0,
step:1, step:1,
min: 0,
max: Math.PI*2,
rules:[ rules:[
{ required: true, message:'请输入终止弧度', trigger: 'blur' } { required: true, message:'请输入终止弧度', trigger: 'blur' }
], ],
value: 50, value: Math.PI,
description: '终止弧度' description: '终止弧度'
},{ },
{
prop: 'clockwise', prop: 'clockwise',
label: '顺时针方向', label: '顺时针方向',
type: types.Boolean, type: types.Boolean,
@ -478,14 +501,18 @@ export const elementConst = {
], ],
shape: [ shape: [
{ {
prop: prop: 'cx',
'cx', label: '圆心横坐标', type: types.Number, precision: 0, step:1, label: '圆心横坐标',
type: types.Number,
precision: 0,
step:1,
rules:[ rules:[
{ required: true, message:'请输入圆心横坐标', trigger: 'blur' } { required: true, message:'请输入圆心横坐标', trigger: 'blur' }
], ],
value: 10, value: 10,
description: '圆心横坐标' description: '圆心横坐标'
},{ },
{
prop: 'cy', prop: 'cy',
label: '圆心纵坐标', label: '圆心纵坐标',
type: types.Number, type: types.Number,
@ -496,7 +523,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心纵坐标' description: '圆心纵坐标'
},{ },
{
prop: 'r', prop: 'r',
label: '半径', label: '半径',
type: types.Number, type: types.Number,
@ -507,7 +535,8 @@ export const elementConst = {
], ],
value: 50, value: 50,
description: '半径' description: '半径'
},{ },
{
prop: 'r0', prop: 'r0',
label: '内半径', label: '内半径',
type: types.Number, type: types.Number,
@ -518,29 +547,36 @@ export const elementConst = {
], ],
value: 50, value: 50,
description: '内半径' description: '内半径'
},{ },
{
prop: 'startAngle', prop: 'startAngle',
label: '起始弧度', label: '起始弧度',
type: types.Number, type: types.Number,
precision: 0, precision: 0,
step:1, step:1,
min: 0,
max: Math.PI*2,
rules:[ rules:[
{ required: true, message:'请输入起始弧度', trigger: 'blur' } { required: true, message:'请输入起始弧度', trigger: 'blur' }
], ],
value: 50, value: 0,
description: '起始弧度' description: '起始弧度'
},{ },
{
prop: 'endAngle', prop: 'endAngle',
label: '终止弧度', label: '终止弧度',
type: types.Number, type: types.Number,
precision: 0, precision: 0,
step:1, step:1,
min: 0,
max: Math.PI*2,
rules:[ rules:[
{ required: true, message:'请输入终止弧度', trigger: 'blur' } { required: true, message:'请输入终止弧度', trigger: 'blur' }
], ],
value: 50, value: Math.PI,
description: '终止弧度' description: '终止弧度'
},{ },
{
prop: 'clockwise', prop: 'clockwise',
label: '顺时针方向', label: '顺时针方向',
type: types.Boolean, type: types.Boolean,
@ -582,7 +618,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心横坐标' description: '圆心横坐标'
},{ },
{
prop: 'cy', prop: 'cy',
label: '圆心纵坐标', label: '圆心纵坐标',
type: types.Number, type: types.Number,
@ -593,7 +630,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心纵坐标' description: '圆心纵坐标'
},{ },
{
prop: 'width', prop: 'width',
label: '宽度', label: '宽度',
type: types.Number, type: types.Number,
@ -604,7 +642,8 @@ export const elementConst = {
], ],
value: 50, value: 50,
description: '宽度' description: '宽度'
},{ },
{
prop: 'height', prop: 'height',
label: '高度', label: '高度',
type: types.Number, type: types.Number,
@ -659,7 +698,8 @@ export const elementConst = {
], ],
value: 10, value: 10,
description: '圆心纵坐标' description: '圆心纵坐标'
},{ },
{
prop: 'width', prop: 'width',
label: '宽度', label: '宽度',
type: types.Number, type: types.Number,
@ -670,7 +710,8 @@ export const elementConst = {
], ],
value: 50, value: 50,
description: '宽度' description: '宽度'
},{ },
{
prop: 'height', prop: 'height',
label: '高度', label: '高度',
type: types.Number, type: types.Number,

View File

@ -33,9 +33,6 @@ export default [
prop: 'stroke', prop: 'stroke',
label: '描边样式', label: '描边样式',
type: types.Color, type: types.Color,
// rules:[
// { required: true, message:'请输入描边样式', trigger: 'blur' }
// ],
value: '', value: '',
description: '描边样式。' description: '描边样式。'
}, },
@ -48,9 +45,6 @@ export default [
max: 100, max: 100,
step: 1, step: 1,
precision: 0, precision: 0,
// rules:[
// { required: true, message:'请输入描边虚线样式', trigger: 'blur' }
// ],
value: [0, 0], value: [0, 0],
description: '描边虚线样式,参考 SVG stroke-dasharray。' description: '描边虚线样式,参考 SVG stroke-dasharray。'
}, },
@ -62,9 +56,6 @@ export default [
max: 100, max: 100,
step: 1, step: 1,
precision: 0, precision: 0,
// rules:[
// { required: true, message:'请输入描边虚线偏移', trigger: 'blur' }
// ],
value: [0, 0], value: [0, 0],
description: '描边虚线偏移,参考 SVG stroke-dashoffset。' description: '描边虚线偏移,参考 SVG stroke-dashoffset。'
}, },
@ -72,9 +63,6 @@ export default [
prop: 'shadowColor', prop: 'shadowColor',
label: '阴影颜色', label: '阴影颜色',
type: types.Color, type: types.Color,
// rules:[
// { required: true, message:'请输入阴影颜色', trigger: 'blur' }
// ],
value: '', value: '',
description: '阴影颜色。' description: '阴影颜色。'
}, },
@ -86,9 +74,6 @@ export default [
max: 100, max: 100,
step: 1, step: 1,
precision: 0, precision: 0,
// rules:[
// { required: true, message:'请输入阴影横向偏移', trigger: 'blur' }
// ],
value: 0, value: 0,
description: '阴影横向偏移。' description: '阴影横向偏移。'
}, },
@ -100,9 +85,6 @@ export default [
max: 100, max: 100,
step: 1, step: 1,
precision: 0, precision: 0,
// rules:[
// { required: true, message:'请输入阴影纵向偏移', trigger: 'blur' }
// ],
value: 0, value: 0,
description: '阴影纵向偏移。' description: '阴影纵向偏移。'
}, },
@ -114,9 +96,6 @@ export default [
max: 100, max: 100,
step: 1, step: 1,
precision: 0, precision: 0,
// rules:[
// { required: true, message:'请输入阴影模糊大小', trigger: 'blur' }
// ],
value: 0, value: 0,
description: '阴影模糊大小。' description: '阴影模糊大小。'
}, },
@ -124,9 +103,6 @@ export default [
prop: 'strokeNoScale', prop: 'strokeNoScale',
label: '描边粗细不随缩放而改变', label: '描边粗细不随缩放而改变',
type: types.Boolean, type: types.Boolean,
rules:[
{ required: true, message:'请选择描边粗细不随缩放而改变', trigger: 'blur' }
],
value: false, value: false,
description: '描边粗细不随缩放而改变,不选中时则会根据缩放同比例缩放描边粗细。' description: '描边粗细不随缩放而改变,不选中时则会根据缩放同比例缩放描边粗细。'
} }