fix: errors

This commit is contained in:
2025-08-06 14:59:39 +08:00
parent c4ad0c1dc9
commit aa20b6d7e6
10 changed files with 188 additions and 23 deletions

View File

@@ -63,7 +63,7 @@
class="nav-link {{if eq .Name $.Table}}active{{end}}"
role="menuitem"
aria-current="{{if eq .Name $.Table}}page{{end}}"
title="{{.Alias}} - {{.Description}}">
title="{{.Alias}} ({{.Name}}) - {{.Description}}">
<div class="nav-link-content">
<svg class="nav-icon" width="18" height="18" fill="none" viewBox="0 0 24 24">
<path d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2z" stroke="currentColor" stroke-width="2"/>
@@ -71,6 +71,7 @@
</svg>
<div class="nav-text-content">
<span class="nav-title">{{.Alias}}</span>
<span class="nav-subtitle">{{.Name}}</span>
<span class="nav-description">{{.RowCount}} 条记录</span>
</div>
{{if eq .Name $.Table}}
@@ -357,12 +358,14 @@
{{$start = max 1 (sub .Pages 4)}}
{{end}}
{{range $i := $start | $end}}
{{if eq $i .Page}}
<span class="pagination-button active">{{$i}}</span>
{{else}}
<a href="?table={{.Table}}&page={{$i}}&per_page={{.PerPage}}&search={{.Search}}&sort={{.SortField}}&order={{.SortOrder}}"
class="pagination-button">{{$i}}</a>
{{range $i := until $end}}
{{if ge $i $start}}
{{if eq $i $.Page}}
<span class="pagination-button active">{{$i}}</span>
{{else}}
<a href="?table={{$.Table}}&page={{$i}}&per_page={{$.PerPage}}&search={{$.Search}}&sort={{$.SortField}}&order={{$.SortOrder}}"
class="pagination-button">{{$i}}</a>
{{end}}
{{end}}
{{end}}
@@ -379,18 +382,18 @@
</div>
<!-- Detail Modal -->
<div id="detailModal" class="modal">
<div id="detailModal" class="modal hidden">
<div class="modal-content">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium">详情信息</h3>
<button onclick="closeModal()" class="text-gray-400 hover:text-gray-600">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
<div id="detailContent" class="space-y-4">
<div class="modal-header">
<h3 class="modal-title">详情信息</h3>
<button onclick="closeModal()" class="modal-close" aria-label="关闭">
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<div class="modal-body">
<div id="detailContent" class="detail-content">
<!-- Content will be loaded here -->
</div>
</div>