fix: 修改 chart-list-group里面的图表 resize时的问题
This commit is contained in:
@@ -1414,11 +1414,12 @@ export default {
|
||||
|
||||
// 设置图表的尺寸
|
||||
setChartSize (item, index) {
|
||||
console.log(item)
|
||||
this.$nextTick(() => {
|
||||
const chartBox = document.getElementById('chart-' + item.id)
|
||||
if (chartBox) {
|
||||
chartBox.style.width = `${(item.span / 12) * 100}%`
|
||||
chartBox.style.height = `${document.getElementById('listContainer').offsetWidth / 12 * item.height}px`
|
||||
chartBox.style.height = `${document.getElementById('listContainer' + item.groupId).offsetWidth / 12 * item.height}px`
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -399,8 +399,9 @@ export const chartResizeTool = {
|
||||
const chartBlankWidth = this.chartBlankWidth
|
||||
const chartBlankHeight = this.chartBlankHeight
|
||||
const titleHeight = this.titleHeight
|
||||
const containerWidth = data.groupId ? document.getElementById('listContainer' + data.groupId).offsetWidth - 20 : document.getElementById('listContainer').offsetWidth
|
||||
const containerWidth = data.groupId ? document.getElementById('listContainer' + data.groupId).offsetWidth + 40 : document.getElementById('listContainer').offsetWidth
|
||||
const step = this.stepWidth(containerWidth)
|
||||
console.log(originalData,containerWidth)
|
||||
const mouseOriginalX = event.clientX // 鼠标初始坐标
|
||||
const mouseOriginalY = event.clientY
|
||||
const originalWidth = step * data.span // 图表、阴影初始宽高
|
||||
|
||||
@@ -388,6 +388,7 @@ export default {
|
||||
.endpoint-cell-left{
|
||||
/*display: inline-block;*/
|
||||
/*width: 70px;*/
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user