NEZ-2614 fix: bug修复

This commit is contained in:
zhangyu
2023-02-28 16:16:14 +08:00
parent d304278ae3
commit 6b44d2ce73
2 changed files with 19 additions and 2 deletions

View File

@@ -116,6 +116,16 @@ export default {
this.$emit('colorChange', color.hex, this.keyName) this.$emit('colorChange', color.hex, this.keyName)
} }
}, },
update () {
if (!this.isTopo) {
this.keyName = this.valueArr[0].name
this.colors = this.valueArr[0].value || randomcolor() + 'FF'
this.$emit('colorChange', this.colors, this.keyName)
} else {
this.keyName = this.valueArr[0].name
this.colors = this.valueArr[0].value
}
},
changeColor () { changeColor () {
this.showColorPicker = !this.showColorPicker this.showColorPicker = !this.showColorPicker
if (this.showColorPicker) { if (this.showColorPicker) {

View File

@@ -178,7 +178,7 @@ export default {
} }
} }
pen.disableInput = pen.disableInput || true pen.disableInput = pen.disableInput || true
pen.lineAnimateType = pen.lineAnimateType || 0 pen.lineAnimateType = pen.lineAnimateType || undefined
pen.animateSpan = pen.animateSpan || 1 pen.animateSpan = pen.animateSpan || 1
pen.animateReverse = pen.animateReverse || false pen.animateReverse = pen.animateReverse || false
pen.fromArrow = pen.fromArrow || '' pen.fromArrow = pen.fromArrow || ''
@@ -295,7 +295,14 @@ export default {
if (key === 'lineName') { if (key === 'lineName') {
getTopology(this.meta2dId).updateLineType(pen, pen[key]) getTopology(this.meta2dId).updateLineType(pen, pen[key])
} }
getTopology(this.meta2dId).setValue(obj) if (key === 'lineAnimateType') {
if (!pen[key]) {
obj.autoPlay = false
} else {
obj.autoPlay = true
}
}
getTopology(this.meta2dId).setValue(obj) // 更新pen
if (key === 'lineAnimateType') { if (key === 'lineAnimateType') {
if (!pen[key]) { if (!pen[key]) {
getTopology(this.meta2dId).stopAnimate(pen.id) getTopology(this.meta2dId).stopAnimate(pen.id)