2018-06-10 05:55:58 +00: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 04:42:57 +00:00
|
|
|
this.set({ props: props })
|
2018-06-10 05:55:58 +00:00
|
|
|
this.fire('initialized')
|
|
|
|
stop('ListLazyItem set props')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data: () => ({
|
|
|
|
props: void 0
|
|
|
|
}),
|
|
|
|
components: {
|
|
|
|
ListItem
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|