Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<z-paging v-model="dataList">,如果数据量稍微大一点,比如1000条以上,dataList 变量的数据更新会很慢 #92

Open
bochs-q opened this issue Oct 13, 2023 · 5 comments

Comments

@bochs-q
Copy link

bochs-q commented Oct 13, 2023

** 请描述您在使用期间遇到的疑问 **

如果数据量稍微大一点,比如1000条以上,dataList 变量的数据更新会很慢。如此会导致一些问题,比如 tabs 切换卡住一段时间,统计已加载数量 dataList.length 等也会很慢,用户体验很不好。但奇怪的是,列表的滚动却又不受影响。

请教下大神 @SmileZXLee ,这是什么原因引起,有什么好的解决办法吗?

PS:nuve + cell 模式

@bochs-q bochs-q changed the title <z-paging v-model="dataList">,如果数据量稍微大一点,比如500条以上,dataList 变量的数据更新会很慢 <z-paging v-model="dataList">,如果数据量稍微大一点,比如1000条以上,dataList 变量的数据更新会很慢 Oct 13, 2023
@SmileZXLee
Copy link
Owner

for循环的:key是否设置, 并且是否是item的id?

@bochs-q
Copy link
Author

bochs-q commented Oct 16, 2023

<z-paging v-if="isShow" ref="paging" @query="queryList" v-model="dataList"
    preload-page="12" virtual-scroll-fps="80" cell-key-name="identifier" 
    default-page-size="25" local-paging-loading-time="800"
    :use-virtual-list="false"
    
    :auto="false"
    :auto-show-back-to-top="true"
    :auto-clean-list-when-reload="false" 
    :auto-scroll-to-top-when-reload="true"
    :show-refresher-when-reload="false"
    :show-loading-more-when-reload="false"
    :nvue-paging-enabled="false"
    :nvue-fast-scroll="false"
    
    :refresher-enabled="false"
    :safe-area-inset-bottom="true"
    >

  <!-- nuve + cell 模式 -->
  <z-paging-cell v-for="(item, index) in dataList" :key="item.identifier">
  
  </z-paging-cell>
</z-paging>

是的,都遵守了组件的文档规范。

@SmileZXLee
Copy link
Owner

image 看下nvue编译模式是否选的是uniapp

@bochs-q
Copy link
Author

bochs-q commented Oct 16, 2023

对,采用的是 "nvueStyleCompiler" : "uni-app" 模式,另外 item.identifier 的值是这种风格的: XXXXX_32323 字母_数字 这种组合

@SmileZXLee
Copy link
Owner

那应该不会有问题的,试下直接用nvue的list+cell是否有相同问题呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants