[FIX] 修復機台列表日誌面板中 Alpine.js 變數未定義錯誤

1. 在 machineApp 初始化時新增 totalLogs 變數。
2. 在 fetchLogs 成功取得資料後同步更新 totalLogs。
This commit is contained in:
sky121113 2026-05-14 16:56:26 +08:00
parent a684628dad
commit db2fd734ee

View File

@ -52,6 +52,7 @@
inventorySlots: [],
currentPage: 1,
lastPage: 1,
totalLogs: 0,
init() {
const now = new Date();
@ -94,6 +95,7 @@
this.logs = data.data || [];
this.currentPage = data.pagination.current_page;
this.lastPage = data.pagination.last_page;
this.totalLogs = data.pagination.total;
}
} catch (e) { console.error('fetchLogs error:', e); }
finally { this.loading = false; }