[英]TS2339: Property 'width' does not exist on type 'HTMLDivElement'
您可以使用offsetWidth
: offsetWidth和offsetHeight
this.containerWidth =this.container.offsetWidth;
this.containerHeight = this.container.offsetHeight
您看到此错误是因为HTMLElement没有属性宽度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.