小修改
This commit is contained in:
parent
c000a8c19f
commit
0a996eac08
|
|
@ -11,7 +11,9 @@ export {}
|
|||
/* prettier-ignore */
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
2: typeof import('./src/components/virtual-scroller/VirtualScroller copy 2.vue')['default']
|
||||
Canvas: typeof import('./src/components/canvas/index.vue')['default']
|
||||
copy: typeof import('./src/components/virtual-scroller/VirtualScroller copy.vue')['default']
|
||||
DialogBox: typeof import('./src/components/dialogBox/index.vue')['default']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
|
|
|
|||
|
|
@ -202,20 +202,22 @@ const visibleRange = computed(() => {
|
|||
}
|
||||
|
||||
offset = startOffset
|
||||
endIndex = startIndex
|
||||
for (let i = startIndex; i < computedData.value.length; i++) {
|
||||
const cachedHeight = itemHeights.value.get(i)
|
||||
const height = cachedHeight !== undefined ? cachedHeight : props.estimatedHeight
|
||||
|
||||
if (offset >= currentScrollTop + viewportHeight) {
|
||||
offset += height
|
||||
|
||||
if (offset > currentScrollTop + viewportHeight) {
|
||||
endIndex = Math.min(computedData.value.length - 1, i + bufferCount)
|
||||
break
|
||||
}
|
||||
|
||||
offset += height
|
||||
endIndex = i
|
||||
}
|
||||
|
||||
return { start: startIndex, end: endIndex, offset: startOffset }
|
||||
return { start: Math.min(startIndex, endIndex), end: Math.max(startIndex, endIndex), offset: startOffset }
|
||||
})
|
||||
|
||||
const visibleItems = computed(() => {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@ export async function Playload(data) {
|
|||
nodeInfoList.push(json.nodeInfoList[key.name])
|
||||
}
|
||||
}
|
||||
json.nodeInfoList.index.fieldValue = data.imgs.length - 1
|
||||
if (json.nodeInfoList.index) {
|
||||
json.nodeInfoList.index.fieldValue = data.imgs.length - 1
|
||||
}
|
||||
}
|
||||
|
||||
if (Array.isArray(data.params)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue