From db2fd734eec8e81cc5cdad8be5f00620caa14096 Mon Sep 17 00:00:00 2001 From: sky121113 Date: Thu, 14 May 2026 16:56:26 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=20=E4=BF=AE=E5=BE=A9=E6=A9=9F=E5=8F=B0?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=97=A5=E8=AA=8C=E9=9D=A2=E6=9D=BF=E4=B8=AD?= =?UTF-8?q?=20Alpine.js=20=E8=AE=8A=E6=95=B8=E6=9C=AA=E5=AE=9A=E7=BE=A9?= =?UTF-8?q?=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 在 machineApp 初始化時新增 totalLogs 變數。 2. 在 fetchLogs 成功取得資料後同步更新 totalLogs。 --- resources/views/admin/machines/index.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/admin/machines/index.blade.php b/resources/views/admin/machines/index.blade.php index 311cf32..0032e21 100644 --- a/resources/views/admin/machines/index.blade.php +++ b/resources/views/admin/machines/index.blade.php @@ -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; }