Nativescript 在本机脚本中使用侧抽屉和滚动视图时会出现间距问题
我正在使用本机脚本开发android和ios应用程序。我使用UISidedrawer插件显示菜单的,我在使用UISidedrawer和ScrollView的同时遇到了一个问题,在我的组件中,空间被自动占用。这是我的代码和截图 我正在创建一个侧边抽屉,菜单如下:Nativescript 在本机脚本中使用侧抽屉和滚动视图时会出现间距问题,nativescript,nativescript-angular,Nativescript,Nativescript Angular,我正在使用本机脚本开发android和ios应用程序。我使用UISidedrawer插件显示菜单的,我在使用UISidedrawer和ScrollView的同时遇到了一个问题,在我的组件中,空间被自动占用。这是我的代码和截图 我正在创建一个侧边抽屉,菜单如下: <RadSideDrawer [transition]="drawerTransition"> <GridLayout rows="auto,*,110" column="auto" tkDrawerConten
<RadSideDrawer [transition]="drawerTransition">
<GridLayout rows="auto,*,110" column="auto" tkDrawerContent height="100%">
<StackLayout row="0" column="0" orientation="vertical" class="sidedrawer-header">
<Label class="italic" text="Welcome "></Label>
</StackLayout>
<ListView row="1" column="0" [items] = "navMenu" rowHeight="40" class="sidedrawer-content" separatorColor="#40053e" (itemLoading)="onItemLoading($event)">
<ng-template>
<StackLayout
//code
</StackLayout>
</ng-template>
</ListView>
<StackLayout row="2" column="0" class="sidedrawer-footer" orientation="vertical">
<Button text="Logout" (tap)="logout()" pageTransition="slideright"></Button>
</StackLayout>
</GridLayout>
<StackLayout tkMainContent>
<StackLayout>
<ng-content></ng-content>
</StackLayout>
</StackLayout>
</RadSideDrawer>
我的菜单内容html
<side-drawer>
<GridLayout rows="*,100">
<StackLayout row="0" orientation="vertical">
<StackLayout orienatation="vertical">
<ScrollView>
<Label text="Hello World> </Label>
</ScrollView>
</StackLayout>
</StackLayout>
<StackLayout row="1">
</StackLayout>
</GridLayout>
</side-drawer>
我不知道你为什么要用这么多堆栈布局来包装ScrollView。尝试将垂直对齐设置为滚动视图顶部,如果问题仍然存在,请共享可复制问题的最小游乐场示例。好的,manoj我将尝试。不,manoj它不起作用。您能告诉我如何共享游乐场示例吗?我不知道。结帐/
<side-drawer>
<GridLayout rows="*,100">
<StackLayout row="0" orientation="vertical">
<StackLayout orienatation="vertical">
<ScrollView>
<Label text="Hello World> </Label>
</ScrollView>
</StackLayout>
</StackLayout>
<StackLayout row="1">
</StackLayout>
</GridLayout>
</side-drawer>