update
This commit is contained in:
@@ -12,6 +12,7 @@ function useTableQuery({
|
|||||||
parameter,
|
parameter,
|
||||||
api,
|
api,
|
||||||
callback,
|
callback,
|
||||||
|
uuid = false,
|
||||||
immediate = true,
|
immediate = true,
|
||||||
watchParameter = false,
|
watchParameter = false,
|
||||||
}) {
|
}) {
|
||||||
@@ -56,12 +57,14 @@ function useTableQuery({
|
|||||||
vo.page = _vo.page;
|
vo.page = _vo.page;
|
||||||
vo.total = _vo.total;
|
vo.total = _vo.total;
|
||||||
vo.rows = [...vo.rows, ..._vo.rows];
|
vo.rows = [...vo.rows, ..._vo.rows];
|
||||||
vo.rows = Array.from(
|
if (uuid) {
|
||||||
vo.rows.reduce((map, item) => {
|
vo.rows = Array.from(
|
||||||
map.set(item.id, item);
|
vo.rows.reduce((map, item) => {
|
||||||
return map;
|
map.set(item.id, item);
|
||||||
}, new Map()).values()
|
return map;
|
||||||
)
|
}, new Map()).values()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
callback && callback(vo);
|
callback && callback(vo);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ const vo = reactive({
|
|||||||
|
|
||||||
const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
||||||
api: Api.system.getExchangeLog,
|
api: Api.system.getExchangeLog,
|
||||||
|
uuid: true,
|
||||||
parameter: po,
|
parameter: po,
|
||||||
callback: (data) => {
|
callback: (data) => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|||||||
Reference in New Issue
Block a user