จัดโค้ด

This commit is contained in:
setthawutttty 2023-12-08 14:26:16 +07:00
parent a5335df0b6
commit a42d7b91ba
12 changed files with 216 additions and 413 deletions

View file

@ -120,12 +120,6 @@ const visibleColumns = ref<string[]>([
"status",
]);
/** เริ่มโหลดหน้า page เอาข้อมูลไปเก็บ ใน store*/
onMounted(() => {
complainstStore.columns = columns.value;
complainstStore.visibleColumns = visibleColumns.value;
});
/** แสดงจำนวนในตาราง */
const pagination = ref({
descending: true,
@ -141,7 +135,7 @@ function OpenEdit(id: string) {
router.push(`/discipline/complaints/${id}`);
}
const updateProp = (newPagination: any, page: number) => {
function updateProp(newPagination: any, page: number){
// event parent component props
emit("update:pagination", newPagination, page);
};
@ -160,6 +154,12 @@ watch(
updateProp(pagination.value.rowsPerPage, currentPage.value);
}
);
/** เริ่มโหลดหน้า page เอาข้อมูลไปเก็บ ใน store*/
onMounted(() => {
complainstStore.columns = columns.value;
complainstStore.visibleColumns = visibleColumns.value;
});
</script>
<template>