Skip to content

⬅️ Back to Table of Contents

📄 useVirtualList/demo

📊 Analysis Summary

Metric Count
🔧 Functions 2
📦 Imports 3
📊 Variables & Constants 3
🟢 Vue Composition API 1

📚 Table of Contents

🛠️ File Location:

📂 packages/core/useVirtualList/demo.vue

📦 Imports

Name Source
useVirtualList @vueuse/core
computed vue
shallowRef vue

Variables & Constants

Name Type Kind Value Exported
index boolean let/var shallowRef<number>()
search number let/var shallowRef<'' \| 'small' \| 'large'>('')
block boolean let/var shallowRef<ScrollLogicalPosition>('start')

Vue Composition API

Name Type Reactive Variables Composables
computed computed none none

Functions

itemHeight(i: any): any

Parameters:

  • i any

Returns: any

Code
i => (filteredItems.value[i].height + 8)

handleScrollTo(): void

Returns: void

Calls:

  • scrollTo
Code
function handleScrollTo() {
  if (typeof index.value === 'number')
    scrollTo(index.value, { behavior: smoothScroll.value ? 'smooth' : 'auto', block: block.value })
}

Generated by Syntax Scribe