2018-06-10 07:55:58 +02:00
|
|
|
{#if props}
|
|
|
|
<ListItem
|
|
|
|
{component}
|
|
|
|
{props}
|
|
|
|
{key}
|
|
|
|
{index}
|
|
|
|
{length}
|
|
|
|
on:initialized
|
|
|
|
/>
|
|
|
|
{/if}
|
|
|
|
<script>
|
|
|
|
import ListItem from './ListItem.html'
|
|
|
|
import { mark, stop } from '../../_utils/marks'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
async oncreate () {
|
|
|
|
let { makeProps, key } = this.get()
|
|
|
|
if (makeProps) {
|
|
|
|
let props = await makeProps(key)
|
|
|
|
mark('ListLazyItem set props')
|
2018-08-30 06:42:57 +02:00
|
|
|
this.set({ props: props })
|
2018-06-10 07:55:58 +02:00
|
|
|
this.fire('initialized')
|
|
|
|
stop('ListLazyItem set props')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data: () => ({
|
|
|
|
props: void 0
|
|
|
|
}),
|
|
|
|
components: {
|
|
|
|
ListItem
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|