fix load Table
This commit is contained in:
parent
1ec4a97538
commit
d39753fbde
56 changed files with 684 additions and 978 deletions
|
|
@ -10,8 +10,6 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
|
||||
import type { PortfolioRowsType } from "@/modules/13_portfolio/interface/Main";
|
||||
|
||||
import SkeletonTable from "@/components/SkeletonTable.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -115,7 +113,6 @@ function onDelete(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
/** ฟังก์ชั่นค้นหาข้อมูลในตาราง */
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
|
|
@ -125,6 +122,10 @@ function onSearch() {
|
|||
);
|
||||
}
|
||||
|
||||
function onTableRequest() {
|
||||
console.log(1111);
|
||||
}
|
||||
|
||||
/** Hook Lifecycle */
|
||||
onMounted(async () => {
|
||||
await fecthList();
|
||||
|
|
@ -199,35 +200,21 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<SkeletonTable v-if="isLoading" :columns="columns" />
|
||||
<div class="col-12" v-else>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:paging="true"
|
||||
row-key="id"
|
||||
class="custom-table2"
|
||||
style="max-height: 80vh"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:visible-columns="visibleColumns"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
v-model:pagination="pagination"
|
||||
:pagination="pagination"
|
||||
:loading="isLoading"
|
||||
@request="onTableRequest"
|
||||
>
|
||||
<template v-slot:pagination="scope">
|
||||
ทั้งหมด {{ rows.length }} รายการ
|
||||
<q-pagination
|
||||
v-model="pagination.page"
|
||||
active-color="primary"
|
||||
color="dark"
|
||||
:max="scope.pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue