mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-07 06:03:28 +08:00
监听EditSites页面sites数据变化
This commit is contained in:
@@ -83,7 +83,7 @@ export default {
|
||||
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_EDITSITES']),
|
||||
changeView (e) {
|
||||
this.view = e
|
||||
// ChangeView 的时候关闭Detail和EditSites页面
|
||||
// ChangeView 的时候关闭Detail页面
|
||||
this.detail = {
|
||||
show: false
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ export default {
|
||||
sites.all().then(res => {
|
||||
this.sites = res
|
||||
})
|
||||
this.editSites = {
|
||||
sites: this.sites
|
||||
}
|
||||
},
|
||||
addSite () {
|
||||
this.dialogType = 'new'
|
||||
@@ -247,7 +250,7 @@ export default {
|
||||
ele.id = id
|
||||
id += 1
|
||||
})
|
||||
sites.bulkAdd(data)
|
||||
sites.bulkAdd(data).then(this.getSites())
|
||||
})
|
||||
},
|
||||
removeAllSites () {
|
||||
|
||||
@@ -180,6 +180,9 @@ export default {
|
||||
},
|
||||
setting () {
|
||||
return this.$store.getters.getSetting
|
||||
},
|
||||
sitesList () {
|
||||
return this.$store.getters.getEditSites.sites // 需要监听的数据
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -189,7 +192,7 @@ export default {
|
||||
searchTxt () {
|
||||
this.searchChangeEvent()
|
||||
},
|
||||
'$store.state.editSites.sites': function () {
|
||||
sitesList () {
|
||||
this.getAllsites()
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user