【发布时间】:2019-10-18 02:27:03
【问题描述】:
我正在使用 Nativescript Vue 开发应用程序。我有一个 WrapLayout,里面有 ListView(还有其他组件)。
<ListView for="event in selectedDayNotes" class="home__notes-list">
<v-template>
<WrapLayout class="home__notes-list-item">
<Label class="home__notes-list-item-note" :text="event.title" />
<Label class="home__notes-list-item-time" :text="event.startDate.getHours() + ':' + event.startDate.getMinutes() + ' - '" />
<Label class="home__notes-list-item-time" :text="event.endDate.getHours() + ':' + event.endDate.getMinutes()" />
</WrapLayout>
</v-template>
</ListView>
selectedDayNotes 是一个返回数组的计算属性。
SCSS:
&__notes-list-item {
background: white;
}
&__notes-list-item-note {
font-size: 15px;
width: 100%;
}
&__notes-list-item-time {
font-size: 18px;
font-weight: 600;
}
然后我将项目添加到应用程序中的 ListView(selectedDayNotes 更新并且 ListView 显示新元素),但 ListView 不可滚动。我应该怎么做才能让它滚动?
【问题讨论】:
标签: android listview nativescript nativescript-vue