再次调整resize事件

This commit is contained in:
buvta
2020-12-15 20:22:01 +08:00
parent 06bd915964
commit 3c6733648b
4 changed files with 8 additions and 8 deletions

View File

@@ -870,13 +870,13 @@ export default {
this.getSearchHistory()
},
mounted () {
window.addEventListener('resize', () => {
addEventListener('resize', () => {
setTimeout(() => {
this.showTableLastColumn = window.outerWidth >= 1200
if (this.$refs.filmWaterfall) this.$refs.filmWaterfall.resize()
if (this.$refs.filmSearchWaterfall) this.$refs.filmSearchWaterfall.resize()
}, 500)
}, true)
})
}
}
</script>

View File

@@ -373,9 +373,9 @@ export default {
if (this.setting.historyViewMode === 'table') setTimeout(() => { this.rowDrop() }, 100)
addEventListener('keydown', code => { if (code.keyCode === 16) this.shiftDown = true })
addEventListener('keyup', code => { if (code.keyCode === 16) this.shiftDown = false })
window.addEventListener('resize', () => {
addEventListener('resize', () => {
setTimeout(() => { if (this.$refs.historyWaterfall) this.$refs.historyWaterfall.resize() }, 500)
}, true)
})
},
created () {
this.getAllhistory()

View File

@@ -330,9 +330,9 @@ export default {
this.getRecommendations()
},
mounted () {
window.addEventListener('resize', () => {
addEventListener('resize', () => {
setTimeout(() => { if (this.$refs.recommendataionsWaterfall) this.$refs.recommendataionsWaterfall.resize() }, 500)
}, true)
})
}
}
</script>

View File

@@ -517,9 +517,9 @@ export default {
if (this.setting.starViewMode === 'table') setTimeout(() => { this.rowDrop() }, 100)
addEventListener('keydown', code => { if (code.keyCode === 16) this.shiftDown = true })
addEventListener('keyup', code => { if (code.keyCode === 16) this.shiftDown = false })
window.addEventListener('resize', () => {
addEventListener('resize', () => {
setTimeout(() => { if (this.$refs.starWaterfall) this.$refs.starWaterfall.resize() }, 500)
}, true)
})
}
}
</script>