[Update] 重命名tab page

This commit is contained in:
ibuler
2020-04-22 17:43:30 +08:00
parent cefa54c9db
commit 7975c0d098
4 changed files with 14 additions and 6 deletions

View File

@@ -124,16 +124,24 @@ export default {
this.initialSelect()
},
methods: {
loadMore(load) {
async loadMore(load) {
if (this.loading) {
return
}
if (!this.params.hasMore) {
return
}
this.loading = true
this.params.page = this.params.page ? this.params.page + 1 : 1
const defaultLoad = this.getOptions
if (!load) {
load = defaultLoad
}
load()
try {
await load()
} finally {
this.loading = false
}
},
resetParams() {
this.params = _.cloneDeep(this.defaultParams)
@@ -166,7 +174,7 @@ export default {
this.params.hasMore = false
this.resetParams()
} else {
this.loadMore(this.getInitialOptions)
await this.loadMore(this.getInitialOptions)
}
},
async getOptions() {

View File

@@ -24,7 +24,7 @@
<script>
import Page from '../Page/'
export default {
name: 'SubMenuPage',
name: 'TabPage',
components: {
Page
},

View File

@@ -4,7 +4,7 @@ export { default as AppMain } from './AppMain'
export { default as Page } from './Page'
export { default as TagsView } from './TagsView'
export { default as GenericDetailPage } from './GenericDetailPage'
export { default as SubMenuPage } from './SubMenuPage'
export { default as TabPage } from './TabPage'
export { default as Footer } from './Footer'
export { default as IBox } from './IBox'
export { default as GenericListPage } from './GenericListPage'

View File

@@ -50,7 +50,7 @@ export default {
relationConfig: {
icon: 'fa-user',
title: this.$tc('Members'),
url: '/api/v1/users/users/',
url: '/api/v1/users/users/?draw=1',
objectsId: [],
loading: true
},