fixed bug
All checks were successful
frontend-action / build-image (push) Successful in 2m4s

This commit is contained in:
2024-06-24 18:16:19 +07:00
parent 535aa73ad1
commit b90647d0c1

View File

@@ -322,7 +322,8 @@ export default {
group: null,
offset: 0,
count: 0,
searchGroup:null
searchGroup:null,
resultdata:[]
};
},
methods: {
@@ -378,7 +379,7 @@ export default {
const endIndex = startIndex + 10;
// ในตัวอย่างนี้ จะใช้ items ของ this.items เป็นตัวอย่าง โดยใช้ฟังก์ชัน slice หรือการดึงข้อมูลจากแหล่งข้อมูล
if(this.count>0){
this.result = [...this.result].slice(startIndex, endIndex); }
this.result = [...this.resultdata].slice(startIndex, endIndex); }
// if (offset == 0) {
// this.page = 1;
@@ -458,11 +459,13 @@ export default {
alert("ไมสามารถโหลดขอมลได");
console.error("เกดขอผดพลาดในการโหลดขอม:", error);
});
const startIndex = (this.page - 1) * 10;
const endIndex = startIndex + 10;
client.user.getAllUser
.query(data)
.then((rs) => {
this.result = rs;
this.resultdata = rs;
console.log(rs);
this.load = false;
if (rs.length == 0) {
@@ -475,6 +478,11 @@ export default {
// alert("ไมสามารถโหลดขอมลได");
console.error("เกดขอผดพลาดในการโหลดขอม:", error);
});
// ในตัวอย่างนี้ จะใช้ items ของ this.items เป็นตัวอย่าง โดยใช้ฟังก์ชัน slice หรือการดึงข้อมูลจากแหล่งข้อมูล
if(this.count>0){
this.result = [...this.resultdata].slice(startIndex, endIndex); }
},
filterData() {
// กรองข้อมูลอันที่สองโดยใช้ข้อมูลจากอันแรก