Merge branch 'virtual-scrolling-2.0' into shigusegubu-themes3
This commit is contained in:
commit
397d6cdabb
3 changed files with 14 additions and 2 deletions
|
|
@ -153,6 +153,9 @@
|
||||||
:focused="focused === element.id || focused === element.item.retweeted_status?.id"
|
:focused="focused === element.id || focused === element.item.retweeted_status?.id"
|
||||||
|
|
||||||
:data-status-id="element.id"
|
:data-status-id="element.id"
|
||||||
|
:data-vs-height="element.height"
|
||||||
|
:data-vs-top="element.top"
|
||||||
|
|
||||||
@goto="setFocused"
|
@goto="setFocused"
|
||||||
@toggle-expanded="toggleExpanded"
|
@toggle-expanded="toggleExpanded"
|
||||||
@suspendable-state-change="changeSuspendStateLinearLocal"
|
@suspendable-state-change="changeSuspendStateLinearLocal"
|
||||||
|
|
|
||||||
|
|
@ -597,12 +597,17 @@ const Status = {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.$refs.root) {
|
||||||
|
this.resizeObserver.observe(this.$refs.root)
|
||||||
|
}
|
||||||
|
},
|
||||||
unmounted() {
|
unmounted() {
|
||||||
this.resizeObserver.disconnect()
|
this.resizeObserver.disconnect()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$refs.root': function (element) {
|
hideStatus: function (element) {
|
||||||
if (element) {
|
if (this.$refs.root) {
|
||||||
this.resizeObserver.observe(this.$refs.root)
|
this.resizeObserver.observe(this.$refs.root)
|
||||||
} else {
|
} else {
|
||||||
this.resizeObserver.disconnect()
|
this.resizeObserver.disconnect()
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,10 @@
|
||||||
v-if="element.type === 'item'"
|
v-if="element.type === 'item'"
|
||||||
:status-id="element.item.id"
|
:status-id="element.item.id"
|
||||||
role="listitem"
|
role="listitem"
|
||||||
|
|
||||||
|
:data-vs-height="element.height"
|
||||||
|
:data-vs-top="element.top"
|
||||||
|
|
||||||
@suspendable-state-change="changeSuspendState"
|
@suspendable-state-change="changeSuspendState"
|
||||||
@height-change="updateVirtualHeight"
|
@height-change="updateVirtualHeight"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue