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