update
This commit is contained in:
@@ -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];
|
||||
vo.rows = Array.from(
|
||||
vo.rows.reduce((map, item) => {
|
||||
map.set(item.id, item);
|
||||
return map;
|
||||
}, new Map()).values()
|
||||
)
|
||||
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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user