2018-01-22 01:07:11 +01:00
|
|
|
<div class="virtual-list-footer"
|
|
|
|
ref:node
|
|
|
|
style="transform: translateY({{$heightWithoutFooter}}px);" >
|
|
|
|
<:Component {component} />
|
|
|
|
</div>
|
|
|
|
<style>
|
|
|
|
.virtual-list-footer {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
2018-01-25 17:23:14 +01:00
|
|
|
import { virtualListStore } from './virtualListStore'
|
|
|
|
import { AsyncLayout } from '../../_utils/AsyncLayout'
|
2018-01-22 01:07:11 +01:00
|
|
|
|
|
|
|
export default {
|
2018-04-20 06:38:01 +02:00
|
|
|
oncreate () {
|
2018-01-22 01:07:11 +01:00
|
|
|
const asyncLayout = new AsyncLayout(() => '__footer__')
|
|
|
|
asyncLayout.observe('__footer__', this.refs.node, (rect) => {
|
|
|
|
asyncLayout.disconnect()
|
2018-01-31 17:37:59 +01:00
|
|
|
this.store.setForRealm({footerHeight: rect.height})
|
2018-01-22 01:07:11 +01:00
|
|
|
})
|
|
|
|
},
|
2018-04-20 06:38:01 +02:00
|
|
|
store: () => virtualListStore
|
2018-01-22 01:07:11 +01:00
|
|
|
}
|
|
|
|
</script>
|