leafer-ui icon indicating copy to clipboard operation
leafer-ui copied to clipboard

自定义组件 继承Box box是根据子元素自适应宽高,但是通过box.getBounds() 去获取宽高 得到的不准确

Open raysonfang opened this issue 1 month ago • 1 comments

Image

raysonfang avatar Nov 18 '25 12:11 raysonfang

需要给出关键代码的截图才好分析,正常情况下直接打印 box.width, box.height 也可以得到自动的宽高信息。

getBounds()的两个参数也需要注意,看看是不是box.getBounds('box', 'inner')。

leaferjs avatar Nov 18 '25 13:11 leaferjs