mirror of
https://github.com/nolanlawson/pinafore
synced 2024-12-12 18:28:03 +01:00
27 lines
685 B
HTML
27 lines
685 B
HTML
<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>
|
|
import { virtualListStore } from '../_utils/virtualListStore'
|
|
import { AsyncLayout } from '../_utils/AsyncLayout'
|
|
|
|
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> |