我正在尝试学习nativescript并找到2个单独的项目并试图将它们组合起来,但是当我这样做时,滚动不起作用你能解释为什么或我做错了什么 .
Here is my code
<ActionBar title="myApp" class="action-bar">
</ActionBar>
<GridLayout class="page" orientation="vertical">
<ListView [items]="items" class="list-group">
<ng-template let-item="item">
<Label [nsRouterLink]="['/item', item.id]" [text]="item.name"
class="list-group-item"></Label>
</ng-template>
</ListView>
</GridLayout>
<TabView #tabview [selectedIndex]="tabindex" class="tab-view"
selectedColor="#4099FF" >
<StackLayout align="top" *tabItem="{title:'Home',iconSource:'res://home'}">
<home-tab></home-tab>
</StackLayout>
<StackLayout *tabItem="{title: 'Explore', iconSource:'res://explore'}">
<Label class="border" borderWidth="5" borderColor="black" text="hey">
</Label>
</StackLayout>
<StackLayout *tabItem="{title: 'Notifications',
iconSource:'res://notifications'}">
</StackLayout>
</TabView>
在顶部我有标签,在我之下我有项目列表但不能向下滚动它不起作用
1 回答
在要滚动的内容周围使用
<ScrollView> </ScrollView>
. https://docs.nativescript.org/angular/code-samples/ui/scroll-view