vuejs2 - 在 nativescript-vue 应用程序的页面中滚动
问题描述
我有一个这样的模板组件(页面):
<template>
<Page class="page" v-if="showDisplay">
<ActionBar class="action-bar" title="Resultsiiii"/>
<StackLayout v-if="posts">
<Label :text="code"></Label>
<Label v-if="posts.product_name" :text="posts.product_name" />
<Image :src="posts.image_thumb_url" stretch="none" />
<Label :text="posts.ingredients_text_fr" class="list-group-item-text" textWrap="true"></Label>
<Label :text="ingredientsList[0]"></Label>
<StackLayout backgroundColor="#3c495e">
<Label v-for="(item, i) in ingredientsList" :key="i" :text="item" height="70" backgroundColor="#43b883"/>
</StackLayout>
</StackLayout>
<StackLayout v-else>
<Label text="No infos about this product"></Label>
</StackLayout>
</Page>
</template>
在我对成分列表的循环中,我遇到了一个问题,只有前十个显示,我无法向下滚动查看其他。有没有办法获得卷轴?
解决方案
Oups (rtfm) 实际上有一个滚动视图元素只是为此目的完成的:https ://nativescript-vue.org/en/docs/elements/components/scroll-view/
推荐阅读
- elasticsearch - elasticsearch更新文档很慢
- c++ - 编写一个函数,删除一个 n 字母单词的 n-1 个符号,并返回以这种方式创建的唯一字符串的数量
- java - 应用程序加载一定时间后如何加载 Facebook 广告?
- python - 如何使用 azure 函数 blob 触发器将 pandas 数据帧写入 blob
- python - 如何在输出文件中返回输入文件的每个第 k 个元素?
- python - 从 DF1 中选择行,其中列值与 DF2 中的列中的值匹配
- deployment - 将 DNS 域指向 Linode 服务器后,Sendgrid 电子邮件中的链接不起作用
- r - 基于时间戳合并数据集
- javascript - 刷新时的VueJs没有运行axios
- java - 上传到本地 WebDav - spring boot