fixed bug
Some checks failed
frontend-action / build-image (push) Failing after 38s

This commit is contained in:
2024-06-24 18:25:17 +07:00
parent b90647d0c1
commit 7c0628ef92

View File

@@ -373,7 +373,7 @@ export default {
},
searchUser() {
this.show = false;
this.load = true;
// this.load = true;
// ตัวอย่างการดึงข้อมูลจาก API หรือแหล่งข้อมูลอื่น ๆ ตามหน้าปัจจุบันที่เลือก
const startIndex = (this.page - 1) * 10;
const endIndex = startIndex + 10;
@@ -415,7 +415,7 @@ export default {
// console.error("เกดขอผดพลาดในการโหลดขอม:", error);
// });
},
searchUserApi(offset, checkg) {
searchUserApi(checkg) {
this.allg = checkg;
this.searchGroup = this.group
this.show = false;
@@ -425,7 +425,6 @@ export default {
}
// this.offset = (this.page - 1) * 10;
let data = {
offset: offset,
limit: 90,
};
// if (this.province) {
@@ -460,8 +459,8 @@ export default {
console.error("เกดขอผดพลาดในการโหลดขอม:", error);
});
const startIndex = (this.page - 1) * 10;
const endIndex = startIndex + 10;
const startIndex = (this.page - 1) * 10;
const endIndex = startIndex + 10;
client.user.getAllUser
.query(data)
.then((rs) => {
@@ -470,6 +469,9 @@ export default {
this.load = false;
if (rs.length == 0) {
this.show = true;
}else{
this.result = [...rs].slice(startIndex, endIndex);
}
})
@@ -480,8 +482,7 @@ export default {
});
// ในตัวอย่างนี้ จะใช้ items ของ this.items เป็นตัวอย่าง โดยใช้ฟังก์ชัน slice หรือการดึงข้อมูลจากแหล่งข้อมูล
if(this.count>0){
this.result = [...this.resultdata].slice(startIndex, endIndex); }
},
filterData() {