|
@@ -5,6 +5,8 @@
|
|
|
v-model:loading="inSearching"
|
|
|
@confirm="onSearch" />
|
|
|
<a-table row-key="id"
|
|
|
+ :pagination="tablePageOptions"
|
|
|
+ :loading="loading"
|
|
|
:columns="columns"
|
|
|
:data-source="list"></a-table>
|
|
|
</div>
|
|
@@ -15,6 +17,7 @@ import { defineComponent, reactive, ref, toRefs } from "vue";
|
|
|
|
|
|
import ToolBar from "@/components/tool-bar/index.vue";
|
|
|
|
|
|
+import usePagination from "@/hooks/usePagination";
|
|
|
import { getDeliveryBookList } from "@/api";
|
|
|
import { TableColumnOfPutBooks } from "../_pageOptions/table-put";
|
|
|
import { IDeliveryBook } from "@/types/api";
|
|
@@ -24,6 +27,8 @@ const PutBooks = defineComponent({
|
|
|
ToolBar,
|
|
|
},
|
|
|
setup() {
|
|
|
+ let { loading, meta, tablePageOptions } = usePagination();
|
|
|
+
|
|
|
const bookData = reactive({
|
|
|
inSearching: false,
|
|
|
list: ref<IDeliveryBook[]>([]),
|
|
@@ -39,6 +44,7 @@ const PutBooks = defineComponent({
|
|
|
page: 1,
|
|
|
});
|
|
|
bookData.list = data.list;
|
|
|
+ meta = data.meta;
|
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
|
} finally {
|
|
@@ -46,7 +52,7 @@ const PutBooks = defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- return { ...toRefs(bookData), onSearch };
|
|
|
+ return { ...toRefs(bookData), onSearch, loading, tablePageOptions };
|
|
|
},
|
|
|
});
|
|
|
|