diff --git a/docker/nginx.conf b/docker/nginx.conf index 85d6fe9..284e0eb 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -4,11 +4,18 @@ server { server_name _; root /var/www/public; - index index.php index.html; + index index.html index.php; client_max_body_size 20M; # 前端 SPA fallback + location = /index.html { + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + expires 0; + try_files $uri =404; + } + location / { try_files $uri $uri/ /index.html; } diff --git a/frontend/src/views/Installations.vue b/frontend/src/views/Installations.vue index bec286e..a3eeb99 100644 --- a/frontend/src/views/Installations.vue +++ b/frontend/src/views/Installations.vue @@ -165,7 +165,7 @@ :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" - @current-change="fetchList" + @current-change="handlePageChange" /> @@ -314,6 +314,13 @@ function handleSizeChange() { fetchList() } +function handlePageChange(p) { + if (p && Number(p) !== Number(page.value)) { + page.value = Number(p) + } + fetchList() +} + function showDetail(row) { detailRow.value = row detailVisible.value = true