forked from integrated_whb/integrated_whb_vue
修改useListData函数签名
parent
c57edc5b22
commit
3171a705a0
|
@ -40,17 +40,13 @@ export default function useListData(api, options = {}) {
|
|||
getDataType(options.clearSelection) !== "Boolean"
|
||||
)
|
||||
throw new Error("options.clearSelection必须是一个布尔值");
|
||||
if (options.otherParams && getDataType(options.otherParams) !== "Object")
|
||||
throw new Error("options.otherParams必须是一个对象");
|
||||
const immediate = options.immediate ?? true;
|
||||
const usePagination = options.usePagination ?? true;
|
||||
const key = options.key ?? "varList";
|
||||
const defaultSearchForm = options.defaultSearchForm ?? {};
|
||||
const clearSelection = options.clearSelection ?? true;
|
||||
if (
|
||||
immediate &&
|
||||
options.otherParams &&
|
||||
getDataType(options.otherParams) !== "Object"
|
||||
)
|
||||
throw new Error("options.otherParams必须是一个对象");
|
||||
const list = ref([]);
|
||||
const pagination = ref({
|
||||
currentPage: 1,
|
||||
|
|
Loading…
Reference in New Issue