mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +08:00
fix: page loading
This commit is contained in:
parent
efb4cf0c66
commit
1a45526a9d
@ -61,9 +61,11 @@ export const useVxeGrid = (allSchemas, getPageApi) => {
|
|||||||
props: { result: 'list', total: 'total' },
|
props: { result: 'list', total: 'total' },
|
||||||
ajax: {
|
ajax: {
|
||||||
query: ({ page, form }) => {
|
query: ({ page, form }) => {
|
||||||
|
gridOptions.loading = true
|
||||||
const queryParams = Object.assign({}, form)
|
const queryParams = Object.assign({}, form)
|
||||||
queryParams.pageSize = page.pageSize
|
queryParams.pageSize = page.pageSize
|
||||||
queryParams.pageNo = page.currentPage
|
queryParams.pageNo = page.currentPage
|
||||||
|
gridOptions.loading = false
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
resolve(await getPageApi(queryParams))
|
resolve(await getPageApi(queryParams))
|
||||||
})
|
})
|
||||||
|
@ -318,8 +318,8 @@ const queryParams = reactive({
|
|||||||
status: null
|
status: null
|
||||||
})
|
})
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
statusOption.value = getIntDictOptions(DICT_TYPE.COMMON_STATUS)
|
|
||||||
tableLoading.value = true
|
tableLoading.value = true
|
||||||
|
statusOption.value = getIntDictOptions(DICT_TYPE.COMMON_STATUS)
|
||||||
const res = await MenuApi.getMenuListApi(queryParams)
|
const res = await MenuApi.getMenuListApi(queryParams)
|
||||||
tableData.value = res
|
tableData.value = res
|
||||||
tableLoading.value = false
|
tableLoading.value = false
|
||||||
|
Loading…
Reference in New Issue
Block a user