This commit is contained in:
zhangsir
2023-10-10 23:38:55 +08:00

View File

@@ -28,7 +28,7 @@ const useTotalPage = (_url, params, config = {}) => {
function fetch() {
state.loading = true;
return http[methods](unref(url), !s[1] ? unref(params) : { params: unref(params) }, { ...config }).then(r => {
state.data = r.data?.records || 0;
state.data = r.data?.records || [];
state.total = r.data?.total || 0;
state.loading = false;
})