加入Waterfall元素的null check

This commit is contained in:
haiyangcui
2020-11-09 18:31:19 +01:00
parent 843a8dd1fc
commit a9011abdf0
4 changed files with 13 additions and 5 deletions

View File

@@ -485,7 +485,9 @@ export default {
if (this.view === 'Film') {
this.getAllSites()
if (this.setting.view === 'picture') {
this.$refs.filmWaterfall.refresh()
if (this.$refs.filmWaterfall) {
this.$refs.filmWaterfall.refresh()
}
this.getPage().then(() => {
this.infiniteId += 1
})
@@ -567,7 +569,7 @@ export default {
this.show.class = true
this.searchContents = []
this.show.find = false
if (this.setting.view === 'picture') {
if (this.setting.view === 'picture' && this.$refs.filmWaterfall) {
this.$refs.filmWaterfall.refresh()
}
}

View File

@@ -156,7 +156,9 @@ export default {
view () {
this.getAllhistory()
this.getAllsites()
this.$refs.historyWaterfall.refresh()
if (this.$refs.historyWaterfall) {
this.$refs.historyWaterfall.refresh()
}
}
},
methods: {

View File

@@ -197,7 +197,9 @@ export default {
view () {
if (this.view === 'Recommendation') {
this.getRecommendations()
this.$refs.recommendataionsWaterfall.refresh()
if (this.$refs.recommendataionsWaterfall) {
this.$refs.recommendataionsWaterfall.refresh()
}
}
},
sortKeyword () {

View File

@@ -192,7 +192,9 @@ export default {
if (this.view === 'Star') {
this.getAllsites()
this.getFavorites()
this.$refs.starWaterfall.refresh()
if (this.$refs.starWaterfall) {
this.$refs.starWaterfall.refresh()
}
}
},
numNoUpdate () {