2018-01-22 00:07:11 +00: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 16:23:14 +00:00
|
|
|
import { virtualListStore } from './virtualListStore'
|
|
|
|
import { AsyncLayout } from '../../_utils/AsyncLayout'
|
2018-01-22 00:07:11 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
oncreate() {
|
|
|
|
const asyncLayout = new AsyncLayout(() => '__footer__')
|
|
|
|
asyncLayout.observe('__footer__', this.refs.node, (rect) => {
|
|
|
|
asyncLayout.disconnect()
|
|
|
|
this.store.set({footerHeight: rect.height})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
store: () => virtualListStore,
|
|
|
|
}
|
|
|
|
</script>
|