revert: 代码回退

This commit is contained in:
wangjiahao 2022-08-19 15:02:04 +08:00
parent 0c9b00c7b1
commit 3875d7b5bf
2 changed files with 16 additions and 13 deletions

View File

@ -131,7 +131,7 @@ export default {
}
},
svgInnerEnable() {
return this.config.commonBackground.enable && this.config.commonBackground.backgroundType === 'innerImage' && typeof this.config.commonBackground.innerImage === 'string'
return !this.screenShot&&this.config.commonBackground.enable && this.config.commonBackground.backgroundType === 'innerImage' && typeof this.config.commonBackground.innerImage === 'string'
},
mainSlotSvgInner() {
if (this.svgInnerEnable) {
@ -153,7 +153,10 @@ export default {
colorRGBA = hexColorToRGBA(this.config.commonBackground.color, this.config.commonBackground.alpha)
}
if (this.config.commonBackground.enable) {
if (this.config.commonBackground.backgroundType === 'outerImage' && typeof this.config.commonBackground.outerImage === 'string') {
if (this.screenShot && this.config.commonBackground.backgroundType === 'innerImage' && typeof this.config.commonBackground.innerImage === 'string') {
let innerImage = this.config.commonBackground.innerImage.replace('svg', 'png')
style['background'] = `url(${innerImage}) no-repeat ${colorRGBA}`
} else if (this.config.commonBackground.backgroundType === 'outerImage' && typeof this.config.commonBackground.outerImage === 'string') {
style['background'] = `url(${this.config.commonBackground.outerImage}) no-repeat ${colorRGBA}`
} else {
style['background-color'] = colorRGBA

View File

@ -4,7 +4,7 @@
style="height: 100%;width: 100%;"
:element-loading-text="$t('panel.data_loading')"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(220,220,220, 0.1)"
element-loading-background="rgba(220,220,220,1)"
>
<el-col v-if="panelInfo.name.length>0" class="panel-design">
@ -200,9 +200,16 @@ export default {
},
computed: {
imageWrapperStyle() {
return {
width: '100%',
height: '100%'
if (this.exporting) {
return {
width: '2560px',
height: '1440px'
}
} else {
return {
width: '100%',
height: '100%'
}
}
},
showMainFlag() {
@ -350,13 +357,6 @@ export default {
downloadAsImage() {
this.dataLoading = true
setTimeout(() => {
let svgElements = document.body.querySelectorAll('svg');
svgElements.forEach(function(item) {
item.setAttribute("width", 100);
item.setAttribute("height", 100);
item.style.width = null;
item.style.height= null;
});
this.exporting = true
setTimeout(() => {
const canvasID = document.getElementById('canvasInfoTemp')