18034727885
2026-04-14 370014cbb9ec1ef64e7e42bb4f9a12671461d8e4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.xw.common.base
 
import android.app.Application
 
abstract class BasePagingViewModel constructor(application: Application) : BaseViewModel(application) {
 
    val refreshLiveData = RefreshLiveData()
 
    protected var pageNo = 1
    protected var pageSize = 10
 
    fun loadMoreData() {
        getDataList(pageNo + 1)
    }
 
    fun refreshData() {
        getDataList(1)
    }
 
    abstract fun getDataList(index: Int)
}