提交 a601ddc9 编写于 作者: W wanganxp

完善措辞

上级 9e31c08f
...@@ -87,13 +87,6 @@ ...@@ -87,13 +87,6 @@
open: false, open: false,
pages: [] as Page[], pages: [] as Page[],
}, },
{
id: 'scroll-fold-nav',
url: 'scroll-fold-nav',
name: '随滚动折叠的导航栏',
open: false,
pages: [] as Page[],
},
{ {
id: 'swiper-list', id: 'swiper-list',
url: 'swiper-list', url: 'swiper-list',
...@@ -113,9 +106,16 @@ ...@@ -113,9 +106,16 @@
{ {
id: 'custom-long-list', id: 'custom-long-list',
url: 'custom-long-list', url: 'custom-long-list',
name: '自定义虚拟长列表', name: '自定义虚拟长列表uni-recycle-view',
open: false, open: false,
pages: [] as Page[], pages: [] as Page[],
},
{
id: 'scroll-fold-nav',
url: 'scroll-fold-nav',
name: '随滚动折叠的导航栏',
open: false,
pages: [] as Page[],
}, },
// #ifdef APP // #ifdef APP
{ {
...@@ -131,6 +131,13 @@ ...@@ -131,6 +131,13 @@
name: '下拉缩放顶部封面图', name: '下拉缩放顶部封面图',
open: false, open: false,
pages: [] as Page[], pages: [] as Page[],
},
{
id: 'scroll-sticky',
url: 'scroll-sticky',
name: 'scroll-view自定义滚动吸顶',
open: false,
pages: [] as Page[],
}, },
// #endif // #endif
{ {
...@@ -140,15 +147,6 @@ ...@@ -140,15 +147,6 @@
open: false, open: false,
pages: [] as Page[], pages: [] as Page[],
}, },
// #ifdef APP
{
id: 'scroll-sticky',
url: 'scroll-sticky',
name: 'scroll-view自定义滚动吸顶',
open: false,
pages: [] as Page[],
},
// #endif
{ {
id: 'half-screen', id: 'half-screen',
url: 'half-screen', url: 'half-screen',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view style="flex: 1;background-color: aliceblue;"> <view style="flex: 1;background-color: aliceblue;">
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<view class="tips">list-view组件虽然在UI层有recycle机制,但长列表的vnode太多也会造成初始化卡顿。本组件仅创建部分vnode,而未使用list-view,也就是UI层其实是短列表。 <view class="tips">list-view组件虽然在UI层有recycle机制,但长列表的vnode太多也会造成初始化卡顿。本组件仅创建部分vnode,而未使用list-view,也就是UI层其实是短列表。
此示例中仅渲染滚动容器上下5屏的内容。适用于仅使用一个for循环创建所有列表项的场景。</view> 此示例中仅渲染滚动容器上下5屏的内容。适用于仅使用一个for循环创建所有列表项的场景。文档详见插件市场:https://ext.dcloud.net.cn/plugin?id=17385</view>
<uni-recycle-view style="flex: 1;" :list="list" @scrolltoupper="scrolltoupper" @scroll="scroll"> <uni-recycle-view style="flex: 1;" :list="list" @scrolltoupper="scrolltoupper" @scroll="scroll">
<template v-slot:default="{items}"> <template v-slot:default="{items}">
<uni-recycle-item class="item" v-for="item in (items as Item[])" :item="item" :key="item.id"> <uni-recycle-item class="item" v-for="item in (items as Item[])" :item="item" :key="item.id">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
export default { export default {
data() { data() {
return { return {
title: '自行实现长列表组件', title: '自定义虚拟列表组件uni-recycle-view',
list: [] as Item[] list: [] as Item[]
} }
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册