pull/8120/merge
云荷YunHerry 2025-04-10 06:47:19 +00:00 committed by GitHub
commit 5c44bf3c47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -79,8 +79,9 @@ type APIResult = {
}[];
};
const queryData = (params: APIParams) => {
return axios.get<APIResult>('https://randomuser.me/api?noinfo', { params });
const queryData = async (params: APIParams) => {
const res = await axios.get<APIResult>('https://randomuser.me/api?noinfo', { params })
return res.data.results;
};
const {
@ -90,7 +91,6 @@ const {
current,
pageSize,
} = usePagination(queryData, {
formatResult: res => res.data.results,
pagination: {
currentKey: 'page',
pageSizeKey: 'results',

View File

@ -262,7 +262,7 @@
"vue-i18n": "^9.1.7",
"vue-infinite-scroll": "^2.0.2",
"vue-loader": "^17.0.0",
"vue-request": "^1.0.2",
"vue-request": "^2.0.4",
"vue-router": "^4.0.0",
"vue-style-loader": "^4.1.2",
"vue-tsc": "^1.0.6",