This commit is contained in:
@@ -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() {
|
||||
// กรองข้อมูลอันที่สองโดยใช้ข้อมูลจากอันแรก
|
||||
|
||||
Reference in New Issue
Block a user