|
|
@@ -111,14 +111,11 @@ export const useBsTable = (options, tableRef) => {
|
|
|
const searchParams = getSearchParams();
|
|
|
|
|
|
if (isEmpty(tableOptions?.url)) {
|
|
|
- setTimeout(() => {
|
|
|
- setLoading(false);
|
|
|
- setPageTotal(tableOptions.gridOptions.data.length);
|
|
|
- setPagerVisible(false);
|
|
|
- resolve(tableOptions.gridOptions.data);
|
|
|
- }, 500);
|
|
|
+ setLoading(false);
|
|
|
+ setPageTotal(tableOptions.gridOptions.data.length);
|
|
|
+ setPagerVisible(false);
|
|
|
+ resolve(tableOptions.gridOptions.data);
|
|
|
} else {
|
|
|
-
|
|
|
const otherParams = !isEmpty(customParams) ? { ...customParams } : {};
|
|
|
console.log("入参为 =====>", { pageNum, pageSize, ...searchParams, ...otherParams })
|
|
|
const resData = await getTableDataApi(tableOptions?.url,{ pageNum, pageSize, ...searchParams, ...otherParams });
|
|
|
@@ -127,14 +124,6 @@ export const useBsTable = (options, tableRef) => {
|
|
|
setTableData(data.list);
|
|
|
setPageTotal(data.total);
|
|
|
resolve(data);
|
|
|
-
|
|
|
- // setTimeout(() => {
|
|
|
- // setLoading(false);
|
|
|
- // setTableData([{name: "12334"}]);
|
|
|
- // setPageTotal(1000);
|
|
|
- // resolve();
|
|
|
- // }, 1000);
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
};
|