phongdt:paging
This commit is contained in:
@@ -83,8 +83,8 @@ const loadPage = async (page: number) => {
|
|||||||
} else {
|
} else {
|
||||||
newDataQuery = _props.component?.settings?.dataQuery + ` Page[${page}]`;
|
newDataQuery = _props.component?.settings?.dataQuery + ` Page[${page}]`;
|
||||||
}
|
}
|
||||||
const res = await store.component.getOverviewPageComponentById(Number(_props.component?.id), newDataQuery);
|
const {item} = await store.component.getOverviewPageComponentById(Number(_props.component?.id), newDataQuery);
|
||||||
const data = getInputValue(res?.settings?.dataResult, "OBJECT");
|
const data = getInputValue(item?.settings?.dataResult, "OBJECT");
|
||||||
|
|
||||||
if (Object.keys(data).length > 0) {
|
if (Object.keys(data).length > 0) {
|
||||||
totals.value = data.Total;
|
totals.value = data.Total;
|
||||||
@@ -161,7 +161,6 @@ const mapActivesToItems = (index: number) => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
/* gap: 10px; */
|
/* gap: 10px; */
|
||||||
overflow-x: scroll;
|
|
||||||
&.border-custom {
|
&.border-custom {
|
||||||
border-color: #e5e5e5 !important;
|
border-color: #e5e5e5 !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,9 +68,8 @@ export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
|
|||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
body: dataQuery,
|
body: JSON.stringify(dataQuery),
|
||||||
});
|
});
|
||||||
console.log("res",res)
|
|
||||||
return res
|
return res
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw err;
|
throw err;
|
||||||
|
|||||||
Reference in New Issue
Block a user