forked from github/dataease
refactor:优化仪表板元素拖动,大小变动延迟渲染,移动使用原始dom
This commit is contained in:
parent
76bdbd7170
commit
4e69aa6e1d
@ -1155,7 +1155,9 @@ export default {
|
|||||||
this.resizing = false
|
this.resizing = false
|
||||||
await this.conflictCheck()
|
await this.conflictCheck()
|
||||||
this.$emit('refLineParams', refLine)
|
this.$emit('refLineParams', refLine)
|
||||||
this.$emit('resizestop', this.left, this.top, this.width, this.height)
|
// this.$emit('resizestop', this.left, this.top, this.width, this.height)
|
||||||
|
// private
|
||||||
|
// this.$emit('resizestop')
|
||||||
}
|
}
|
||||||
if (this.dragging) {
|
if (this.dragging) {
|
||||||
this.dragging = false
|
this.dragging = false
|
||||||
@ -1484,6 +1486,12 @@ export default {
|
|||||||
style.rotate = this.rotate
|
style.rotate = this.rotate
|
||||||
// this.hasMove = true
|
// this.hasMove = true
|
||||||
this.$store.commit('setShapeStyle', style)
|
this.$store.commit('setShapeStyle', style)
|
||||||
|
|
||||||
|
// resize
|
||||||
|
const self = this
|
||||||
|
setTimeout(function() {
|
||||||
|
self.$emit('resizestop')
|
||||||
|
}, 200)
|
||||||
},
|
},
|
||||||
mountedFunction() {
|
mountedFunction() {
|
||||||
// private 冲突检测 和水平设计值保持一致
|
// private 冲突检测 和水平设计值保持一致
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
:linkage-active="linkageSettingStatus&&item===curLinkageView"
|
:linkage-active="linkageSettingStatus&&item===curLinkageView"
|
||||||
@refLineParams="getRefLineParams"
|
@refLineParams="getRefLineParams"
|
||||||
@showViewDetails="showViewDetails(index)"
|
@showViewDetails="showViewDetails(index)"
|
||||||
|
@resizestop="resizestop(index,item)"
|
||||||
>
|
>
|
||||||
<component
|
<component
|
||||||
:is="item.component"
|
:is="item.component"
|
||||||
@ -620,6 +621,11 @@ export default {
|
|||||||
},
|
},
|
||||||
showViewDetails(index) {
|
showViewDetails(index) {
|
||||||
this.$refs.wrapperChild[index].openChartDetailsDialog()
|
this.$refs.wrapperChild[index].openChartDetailsDialog()
|
||||||
|
},
|
||||||
|
resizestop(index, item) {
|
||||||
|
if (item.type === 'view') {
|
||||||
|
this.$refs.wrapperChild[index].chartResize()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,12 +159,13 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
// 监听外部的样式变化
|
// 监听外部的样式变化 (非实时性要求)
|
||||||
outStyle: {
|
outStyle: {
|
||||||
handler(newVal, oldVla) {
|
handler(newVal, oldVla) {
|
||||||
if (this.$refs[this.element.propValue.id]) {
|
//
|
||||||
this.$refs[this.element.propValue.id].chartResize()
|
// if (this.$refs[this.element.propValue.id]) {
|
||||||
}
|
// this.$refs[this.element.propValue.id].chartResize()
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
@ -381,6 +382,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// chart
|
||||||
|
chartResize() {
|
||||||
|
if (this.$refs[this.element.propValue.id]) {
|
||||||
|
this.$refs[this.element.propValue.id].chartResize()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user