1. 调整rateAnalysis scatterSingleChart组件 调用接口数据 2. 修复htmlToPdf 的scroll函数中 对添加image定位不正确的问题
@@ -49,15 +49,15 @@ const option = computed({
return {
tooltip: {
position: 'top',
- formatter: function (params) {
- return (
- params.value[2] +
- ' commits in ' +
- params.value[0] +
- ' of ' +
- params.value[1]
- );
- }
+ // formatter: function (params) {
+ // return (
+ // params.value[2] +
+ // ' commits in ' +
+ // params.value[0] +
+ // ' of ' +
+ // params.value[1]
+ // );
+ // }
},
title: {
text: props.title || '',
@@ -66,11 +66,10 @@ const option = computed({
left: '5%',
grid: {
- top: 40,
- left: 2,
- bottom: 10,
- right: 20,
- containLabel: true
+ top: 80,
+ left: 40,
+ right: 40,
+ bottom: 40,
xAxis: props.xAxis || [],
// {
@@ -119,7 +119,11 @@ const scrollToPDF = (ele, pdfName, call = () => {}) => {
pdf.addPage()
addPos = 0 // 填充下一页后, 设置当前元素填充位置为 新页的top为0
}else{
- addPos = pageHeight // 如果不大于页面高度 则当前元素填充位置为一个元素高度
+ if(position<pageHeight){ //如果剩余position小于一个pageHeight 则addPos等于pageHeight
+ addPos = pageHeight
+ }else{
+ addPos = position
+ }
}
pdf.addImage(pageData, 'JPEG', 0, addPos, 592.28, pageHeight)