ionic在 angular组件里clientWidth为0
环境:
"@angular/core": "11.2.7",
"@ionic/angular": "^5.4.0",
问题:
在组件里需要获取到document.body.clientWidth的值
diameter = Math.round((this.elementRef.nativeElement.clientWidth || this.elementRef.nativeElement.offsetWidth || document.body.clientWidth || doc
原创
2021-05-26 14:47:49 ·
230 阅读 ·
0 评论