opentiny / tiny-vue

TinyVue is an enterprise-class UI component library of OpenTiny community, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
https://opentiny.design/tiny-vue
MIT License
1.54k stars 253 forks source link

🐛 [Bug]: Grid组件,针对普通数据表格的大数据场景(非树表虚拟滚动),启动虚拟滚动后,偶现数据源更新后不渲染新视图,而是展示‘’暂无数据“ #2005

Open tuoqiang opened 2 weeks ago

tuoqiang commented 2 weeks ago

Version

"@opentiny/vue": "3.16.0",

Vue Version

"vue": "3.4.29",

Link to minimal reproduction

模板如下: <tiny-grid v-bind="$attrs" :height="height" :data="dataSources" :loading="firstScreenLoading" ref="tinyTableRef" ... ...

...

主要js伪代码如下:

// 虚拟滚动的配置参数为: const optimizationDataLocal = { animat: false, delayHover: 1000, scrollX: { gt: 100, oSize: 2, rSize: 10, vSize: 10, }, scrollY: { gt: 10, oSize: 2, rHeight: 40, adaptive: true, }, } const dataSources: any = ref([]); // 定义数据源 const index = 5 // 随便一个索引位置 const data = await fetch(params); // 通过接口拿到新数据 dataSource.value = [...dataSources.value.slice(0, index + 1), ...data]; // 这里给dataSource.value赋新值,但是视图不更新,直接展示‘暂无数据’ ### Step to reproduce Grid组件,针对普通数据表格的大数据场景(非树表虚拟滚动),启动虚拟滚动后,向下滚动几屏后,再给组件的:data="dataSources"数据源dataSources中添加几个新的成员数据,偶先视图不会更新渲染,直接会渲染empty插槽‘暂无数据’。 ### What is expected _No response_ ### What is actually happening _No response_ ### What is your project name Industrial Public Platform System ### Any additional comments (optional) _No response_
Issues-translate-bot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: Grid component, for big data scenarios of ordinary data tables (non-tree table virtual scrolling), after starting virtual scrolling, occasionally the new view is not rendered after the data source is updated, but is displayed ''No data yet"