Commit 1a45526a9dae77a439a7742d0e0d0a8c0af9576f
1 parent
efb4cf0c
fix: page loading
Showing
2 changed files
with
3 additions
and
1 deletions
yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
| ... | ... | @@ -61,9 +61,11 @@ export const useVxeGrid = (allSchemas, getPageApi) => { |
| 61 | 61 | props: { result: 'list', total: 'total' }, |
| 62 | 62 | ajax: { |
| 63 | 63 | query: ({ page, form }) => { |
| 64 | + gridOptions.loading = true | |
| 64 | 65 | const queryParams = Object.assign({}, form) |
| 65 | 66 | queryParams.pageSize = page.pageSize |
| 66 | 67 | queryParams.pageNo = page.currentPage |
| 68 | + gridOptions.loading = false | |
| 67 | 69 | return new Promise(async (resolve) => { |
| 68 | 70 | resolve(await getPageApi(queryParams)) |
| 69 | 71 | }) | ... | ... |
yudao-ui-admin-vue3/src/views/system/menu/index.vue
| ... | ... | @@ -318,8 +318,8 @@ const queryParams = reactive({ |
| 318 | 318 | status: null |
| 319 | 319 | }) |
| 320 | 320 | const getList = async () => { |
| 321 | - statusOption.value = getIntDictOptions(DICT_TYPE.COMMON_STATUS) | |
| 322 | 321 | tableLoading.value = true |
| 322 | + statusOption.value = getIntDictOptions(DICT_TYPE.COMMON_STATUS) | |
| 323 | 323 | const res = await MenuApi.getMenuListApi(queryParams) |
| 324 | 324 | tableData.value = res |
| 325 | 325 | tableLoading.value = false | ... | ... |