This commit is contained in:
2025-07-02 15:34:54 +08:00
parent 392533a3b6
commit 90f815b4f9
2 changed files with 10 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ function useTableQuery({
parameter,
api,
callback,
uuid = false,
immediate = true,
watchParameter = false,
}) {
@@ -56,12 +57,14 @@ function useTableQuery({
vo.page = _vo.page;
vo.total = _vo.total;
vo.rows = [...vo.rows, ..._vo.rows];
if (uuid) {
vo.rows = Array.from(
vo.rows.reduce((map, item) => {
map.set(item.id, item);
return map;
}, new Map()).values()
)
}
callback && callback(vo);
} finally {

View File

@@ -25,6 +25,7 @@ const vo = reactive({
const {loading, pagination, initFetchData, fetchData} = useTableQuery({
api: Api.system.getExchangeLog,
uuid: true,
parameter: po,
callback: (data) => {
console.log(data);