优化单据扫码时候明细滚动条的下滑逻辑

This commit is contained in:
jishenghua
2024-03-18 23:29:21 +08:00
parent d24d7a5981
commit 3dd5573c80
2 changed files with 9 additions and 4 deletions

View File

@@ -90,12 +90,12 @@
<!-- 动态生成tr -->
<template v-for="(row,rowIndex) in rows">
<!-- tr 只加载可见的和预加载的总共十条数据 -->
<!-- tr 如果超出200条只加载可见的和预加载的总共十条数据 -->
<div
v-if="
v-if="rows.length<=200 ||
(rows.length>200 &&
rowIndex >= parseInt(`${(scrollTop-rowHeight) / rowHeight}`) &&
(parseInt(`${scrollTop / rowHeight}`) + 9) > rowIndex
"
(parseInt(`${scrollTop / rowHeight}`) + 9) > rowIndex)"
:id="`${caseId}tbody-tr-${rowIndex}`"
:data-idx="rowIndex"
class="tr"