获取图像的宽度和高度?

时间:2020-02-04 19:07:05

标签: nativescript nativescript-vue

如何在NativeScript中获取图像的宽度和高度?

我尝试像这样引用:

<Image src="~/assets/images/logo.jpg" ref="img1"/>

获得宽度:

this.$refs.img1.getMeasuredWidth

但是没有运气。

0 个答案:

没有答案
相关问题