NativeScript-Vue 2.0: Back to the Vueture (Webinar) is now on YouTube
ScrollView

This is an overview of the most common usage of ScrollView. For more information about the available properties, methods, or events, head over to the complete API documentation for ScrollView.

<ScrollView> 是一个显示可滚动内容区域的UI组件。内容可以垂直或水平滚动。


<ScrollView orientation="horizontal">
  <StackLayout orientation="horizontal">
    <Label text="this" />
    <Label text="text" />
    <Label text="scrolls" />
    <Label text="horizontally" />
    <Label text="if necessary" />
  </StackLayout>
</ScrollView>

道具

名称类型描述
orientationString获取或设置内容可以滚动的方向: horizontalvertical.
默认值:vertical
scrollBarIndicatorVisibleBoolean指定滚动条是否可见。
默认值: true

活动

名称描述
scroll滚动事件发生时发出。

原生组件

AndroidiOS
android.viewUIScrollView
Contributors