2018-03-01 17:19:45 +00:00
|
|
|
{{#if props}}
|
2018-01-30 03:22:28 +00:00
|
|
|
<PseudoVirtualListItem :component
|
|
|
|
:props
|
|
|
|
:key
|
|
|
|
:index
|
2018-02-04 18:05:01 +00:00
|
|
|
:length
|
2018-01-30 17:38:14 +00:00
|
|
|
:intersectionObserver
|
2018-01-31 05:17:01 +00:00
|
|
|
:isIntersecting
|
|
|
|
:isCached
|
2018-01-30 17:38:14 +00:00
|
|
|
:height
|
2018-01-30 03:22:28 +00:00
|
|
|
on:scrollToPosition
|
|
|
|
/>
|
2018-03-01 17:19:45 +00:00
|
|
|
{{/if}}
|
2018-01-30 03:22:28 +00:00
|
|
|
<script>
|
|
|
|
import PseudoVirtualListItem from './PseudoVirtualListItem.html'
|
2018-03-15 01:24:16 +00:00
|
|
|
import { mark, stop } from '../../_utils/marks'
|
|
|
|
|
2018-01-30 03:22:28 +00:00
|
|
|
export default {
|
2018-04-20 04:38:01 +00:00
|
|
|
async oncreate () {
|
2018-04-30 00:33:58 +00:00
|
|
|
let { makeProps, key } = this.get() || {} // https://github.com/sveltejs/svelte/issues/1354
|
2018-03-01 17:19:45 +00:00
|
|
|
if (makeProps) {
|
2018-03-15 01:24:16 +00:00
|
|
|
let props = await makeProps(key)
|
2018-03-22 07:01:19 +00:00
|
|
|
mark('PseudoVirtualListLazyItem set props')
|
|
|
|
this.set({props: props})
|
|
|
|
stop('PseudoVirtualListLazyItem set props')
|
2018-03-01 17:19:45 +00:00
|
|
|
}
|
|
|
|
},
|
2018-01-30 03:22:28 +00:00
|
|
|
components: {
|
|
|
|
PseudoVirtualListItem
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|