去除多余的editSites属性

This commit is contained in:
buvta
2020-11-06 23:29:05 +08:00
parent 48d4b369a8
commit c10f7b98d9
2 changed files with 2 additions and 27 deletions

View File

@@ -159,14 +159,6 @@ export default {
this.SET_SETTING(val)
}
},
editSites: {
get () {
return this.$store.getters.getEditSites
},
set (val) {
this.SET_EDITSITES(val)
}
},
getFilters () {
const groups = [...new Set(this.sites.map(site => site.group))]
var filters = []
@@ -181,7 +173,7 @@ export default {
}
},
methods: {
...mapMutations(['SET_SETTING', 'SET_EDITSITES']),
...mapMutations(['SET_SETTING']),
excludeR18FilmsChangeEvent () {
setting.find().then(res => {
res.excludeR18Films = this.setting.excludeR18Films
@@ -209,9 +201,6 @@ export default {
getSites () {
sites.all().then(res => {
this.sites = res
this.editSites = {
sites: res
}
})
},
getSitesGroup () {

View File

@@ -174,7 +174,6 @@ export default {
data () {
return {
pkg: pkg,
sitesList: [],
shortcutList: [],
show: {
site: false,
@@ -206,18 +205,10 @@ export default {
set (val) {
this.SET_SETTING(val)
}
},
editSites: {
get () {
return this.$store.getters.getEditSites
},
set (val) {
this.SET_EDITSITES(val)
}
}
},
methods: {
...mapMutations(['SET_SETTING', 'SET_VIEW', 'SET_EDITSITES']),
...mapMutations(['SET_SETTING', 'SET_VIEW']),
linkOpen (e) {
shell.openExternal(e)
},
@@ -232,11 +223,6 @@ export default {
if (res.length <= 0) {
this.$message.warning('检测到视频源未能正常加载, 即将重置源.')
sites.clear().then(sites.bulkAdd(defaultSites).then(this.getSites()))
} else {
this.sitesList = res
this.editSites = {
sites: res
}
}
})
},