fix: echart图表不显示

This commit is contained in:
AnAngle 2021-10-28 01:00:51 +08:00 committed by jianxing
parent 4a18fee706
commit 61fc1bca8f
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ export default {
}, },
computed: { computed: {
chartHeight() { chartHeight() {
if (this.height.indexOf('px') > -1 || this.height.indexOf('calc') > -1) { if (this.height.indexOf) {
return this.height; return this.height;
} else { } else {
return this.height + 'px'; return this.height + 'px';
@ -56,7 +56,7 @@ export default {
if (!this.width) { if (!this.width) {
return this.width; return this.width;
} }
if (this.width.indexOf('px') > -1 || this.width.indexOf('calc') > -1) { if (this.width.indexOf) {
return this.width; return this.width;
} else { } else {
return this.width + 'px'; return this.width + 'px';