2018-05-01 17:05:36 -07:00
|
|
|
{#if props}
|
|
|
|
<PseudoVirtualListItem {component}
|
|
|
|
{props}
|
|
|
|
{key}
|
|
|
|
{index}
|
|
|
|
{length}
|
|
|
|
{intersectionObserver}
|
|
|
|
{isIntersecting}
|
|
|
|
{isCached}
|
|
|
|
{height}
|
2018-01-29 19:22:28 -08:00
|
|
|
on:scrollToPosition
|
|
|
|
/>
|
2018-05-01 17:05:36 -07:00
|
|
|
{/if}
|
2018-01-29 19:22:28 -08:00
|
|
|
<script>
|
|
|
|
import PseudoVirtualListItem from './PseudoVirtualListItem.html'
|
2018-03-14 18:24:16 -07:00
|
|
|
import { mark, stop } from '../../_utils/marks'
|
|
|
|
|
2018-01-29 19:22:28 -08:00
|
|
|
export default {
|
2018-04-19 21:38:01 -07:00
|
|
|
async oncreate () {
|
2018-05-04 20:09:20 -07:00
|
|
|
let { makeProps, key } = this.get()
|
2018-03-01 09:19:45 -08:00
|
|
|
if (makeProps) {
|
2018-03-14 18:24:16 -07:00
|
|
|
let props = await makeProps(key)
|
2018-03-22 00:01:19 -07:00
|
|
|
mark('PseudoVirtualListLazyItem set props')
|
|
|
|
this.set({props: props})
|
|
|
|
stop('PseudoVirtualListLazyItem set props')
|
2018-03-01 09:19:45 -08:00
|
|
|
}
|
|
|
|
},
|
2018-04-29 22:13:41 -07:00
|
|
|
data: () => ({
|
|
|
|
props: void 0
|
|
|
|
}),
|
2018-01-29 19:22:28 -08:00
|
|
|
components: {
|
|
|
|
PseudoVirtualListItem
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|