mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-07-27 08:40:26 +08:00
简单重构
This commit is contained in:
@@ -331,10 +331,13 @@ export default {
|
||||
this.iptvList.sort(function (x, y) { return (x.name === i.name && x.url === i.url) ? -1 : (y.name === i.name && y.url === i.url) ? 1 : 0 })
|
||||
this.updateDatabase()
|
||||
},
|
||||
updateDatabase () {
|
||||
syncTableData () {
|
||||
if (this.$refs.iptvTable.tableData && this.$refs.iptvTable.tableData.length === this.iptvList.length) {
|
||||
this.iptvList = this.$refs.iptvTable.tableData
|
||||
}
|
||||
},
|
||||
updateDatabase () {
|
||||
this.syncTableData()
|
||||
iptv.clear().then(res => {
|
||||
this.resetId(this.iptvList)
|
||||
iptv.bulkAdd(this.iptvList)
|
||||
|
||||
@@ -126,12 +126,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
view () {
|
||||
this.getFavorites()
|
||||
this.getAllsites()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE']),
|
||||
handleSortChange (column, prop, order) {
|
||||
@@ -385,10 +379,13 @@ export default {
|
||||
this.getFavorites()
|
||||
})
|
||||
},
|
||||
updateDatabase () {
|
||||
if (this.$refs.starTable.tableData.length === this.list.length) {
|
||||
syncTableData () {
|
||||
if (this.$refs.starTable.tableData && this.$refs.starTable.tableData.length === this.list.length) {
|
||||
this.list = this.$refs.starTable.tableData
|
||||
}
|
||||
},
|
||||
updateDatabase () {
|
||||
this.syncTableData()
|
||||
star.clear().then(res => {
|
||||
var id = this.list.length
|
||||
this.list.forEach(ele => {
|
||||
|
||||
Reference in New Issue
Block a user