As mentioned in the comments of the other answers:
<StackLayout ref="body" class="body" row="1">
mounted() {
let body = this.$refs.body;
}
Also you can access the nativeView
by accessing it's property: let
nativeLayout = this.$refs.body.nativeView
;
In NativeScript-Vue the nativeView
of a ViewComponent
is the wrapper element of the actual native platform (iOS/Android) element/view.
For example the nativeView
of the ref="body"
is the StackLayout
of the tns-core-modules and it has a nativeViewProtected
property which is the actual native framework element (on iOS UIView and android.view.View on Android)