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