2018-05-02 02:05:36 +02:00
|
|
|
{#if props}
|
|
|
|
<VirtualListItem {component}
|
|
|
|
{offset}
|
|
|
|
{props}
|
|
|
|
{key}
|
|
|
|
{index}
|
2018-03-01 18:19:45 +01:00
|
|
|
/>
|
2018-05-02 02:05:36 +02:00
|
|
|
{/if}
|
2018-01-24 03:15:14 +01:00
|
|
|
<script>
|
|
|
|
import VirtualListItem from './VirtualListItem'
|
2018-03-15 02:24:16 +01:00
|
|
|
import { mark, stop } from '../../_utils/marks'
|
|
|
|
|
2018-01-24 03:15:14 +01:00
|
|
|
export default {
|
2018-04-20 06:38:01 +02:00
|
|
|
async oncreate () {
|
2018-05-05 05:09:20 +02:00
|
|
|
let { makeProps, key } = this.get()
|
2018-03-01 18:19:45 +01:00
|
|
|
if (makeProps) {
|
2018-03-15 02:24:16 +01:00
|
|
|
let props = await makeProps(key)
|
2018-03-22 08:01:19 +01:00
|
|
|
mark('VirtualListLazyItem set props')
|
|
|
|
this.set({props: props})
|
|
|
|
stop('VirtualListLazyItem set props')
|
2018-03-01 18:19:45 +01:00
|
|
|
}
|
|
|
|
},
|
2018-04-30 07:13:41 +02:00
|
|
|
data: () => ({
|
|
|
|
props: void 0
|
|
|
|
}),
|
2018-01-24 03:15:14 +01:00
|
|
|
components: {
|
|
|
|
VirtualListItem
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|