NEZ-2614 style: 样式修改

This commit is contained in:
zhangyu
2023-03-07 14:44:05 +08:00
parent b758626f6b
commit 21630e6a92
5 changed files with 37 additions and 14 deletions

View File

@@ -62,11 +62,12 @@ export default {
/* 画布绑定事件 */
meta2d.beforeAddPens = (pens) => { // 添加画笔前
bus.$emit('changeDrawState')
const name = 'elements - ' + meta2d.store.data.pens.length
if (pens.length === 1) {
if (!pens[0].type) {
this.nodeInit(pens[0])
this.nodeInit(pens[0], name)
} else {
this.lineInit(pens[0])
this.lineInit(pens[0], name)
}
}
return true
@@ -99,7 +100,7 @@ export default {
})
})
},
nodeInit (pen) { // 初始化节点参数
nodeInit (pen, name) { // 初始化节点参数
if (pen.data && pen.data.params) {
return
}
@@ -132,6 +133,7 @@ export default {
legends: [] // {legend: '' , alias}
}
}
pen.nzName = name
pen.disableInput = pen.disableInput || true
pen.background = pen.background || '#22222200'
pen.textAlign = pen.textAlign || 'center'
@@ -157,7 +159,7 @@ export default {
pen.locked = pen.locked || 0
pen.isBottom = false
},
lineInit (pen) { // 初始化连线参数
lineInit (pen, name) { // 初始化连线参数
if (pen.data && pen.data.params) {
return
}
@@ -177,6 +179,7 @@ export default {
tooltip: true
}
}
pen.nzName = name
pen.disableInput = pen.disableInput || true
pen.lineAnimateType = pen.lineAnimateType || 0
pen.animateSpan = pen.animateSpan || 1