完善翻译

This commit is contained in:
lyswhut
2020-03-12 21:12:12 +08:00
parent dd41e00691
commit 3fdff4e6eb
12 changed files with 57 additions and 43 deletions
+4 -2
View File
@@ -19,7 +19,9 @@ const state = {
// getters
const getters = {
sourceInfo: () => ({ sources, sourceList }),
sourceInfo(state, getters, rootState, { sourceNames }) {
return { sources: sources.map(item => ({ id: item.id, name: sourceNames[item.id] })), sourceList }
},
list(state) {
return state.list
},
@@ -37,7 +39,7 @@ const actions = {
getList({ state, rootState, commit }, page) {
let source = rootState.setting.leaderboard.source
let tabId = rootState.setting.leaderboard.tabId
let key = `${source}${tabId}${page}}`
let key = `${source}${tabId}${page}`
if (state.list.length && state.key == key) return true
commit('clearList')
return music[source].leaderboard.getList(tabId, page).then(result => commit('setList', { result, key }))