完善翻译
This commit is contained in:
@@ -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 }))
|
||||
|
||||
@@ -35,7 +35,9 @@ const state = {
|
||||
|
||||
// getters
|
||||
const getters = {
|
||||
sources: () => sources,
|
||||
sources(state, getters, rootState, { sourceNames }) {
|
||||
return sources.map(item => ({ id: item.id, name: sourceNames[item.id] }))
|
||||
},
|
||||
sourceList: state => state.sourceList || [],
|
||||
searchText: state => state.text,
|
||||
allList: state => ({ list: state.list, allPage: state.allPage, page: state.page, total: state.total, limit: state.limit, sourceMaxPage: state.sourceMaxPage }),
|
||||
|
||||
@@ -39,7 +39,9 @@ sources.forEach(source => {
|
||||
|
||||
// getters
|
||||
const getters = {
|
||||
sourceInfo: () => ({ sources, sortList }),
|
||||
sourceInfo(state, getters, rootState, { sourceNames }) {
|
||||
return { sources: sources.map(item => ({ id: item.id, name: sourceNames[item.id] })), sortList }
|
||||
},
|
||||
tags: state => state.tags,
|
||||
isVisibleListDetail: state => state.isVisibleListDetail,
|
||||
selectListInfo: state => state.selectListInfo,
|
||||
|
||||
Reference in New Issue
Block a user