添加源有效性校验
This commit is contained in:
@@ -78,7 +78,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['setting']),
|
||||
...mapGetters('leaderboard', ['sources', 'boards', 'info']),
|
||||
...mapGetters('leaderboard', ['sources', 'sourceIds', 'boards', 'info']),
|
||||
boardList() {
|
||||
return this.source && this.boards[this.source] ? this.boards[this.source] : []
|
||||
},
|
||||
@@ -129,6 +129,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.source = this.setting.leaderboard.source
|
||||
if (!this.sourceIds.includes(this.source)) this.source = this.sourceIds[0]
|
||||
this.tabId = this.setting.leaderboard.tabId
|
||||
this.page = this.listInfo.page
|
||||
},
|
||||
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
case 'tx':
|
||||
case 'mg':
|
||||
case 'kg':
|
||||
case 'xm':
|
||||
// case 'xm':
|
||||
list.push({
|
||||
name: this.$t('songlist__open_list', { name: this.sourceInfo.sources.find(s => s.id == this.source).name }),
|
||||
id: 'importSongList',
|
||||
@@ -164,6 +164,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.source = this.setting.songList.source
|
||||
if (!this.sourceInfo.sourceIds.includes(this.source)) this.source = this.sourceInfo.sourceIds[0]
|
||||
this.isToggleSource = true
|
||||
this.tagInfo = this.setting.songList.tagInfo
|
||||
this.sortId = this.setting.songList.sortId
|
||||
|
||||
Reference in New Issue
Block a user