feat: update auto render

This commit is contained in:
2025-08-07 20:03:53 +08:00
parent fd67864247
commit d7e8ca38f8
39 changed files with 5684 additions and 130 deletions

View File

@@ -0,0 +1,33 @@
{{define "content"}}
<div class="p-4">
<h1 class="text-2xl font-bold mb-4">{{.TableAlias}} - 简易视图</h1>
<div class="bg-white rounded-lg shadow overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
{{range .Columns}}
{{if .ShowInList}}
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
{{.Alias}}
</th>
{{end}}
{{end}}
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
{{range $row := .Data}}
<tr class="hover:bg-gray-50">
{{range $col := $.Columns}}
{{if $col.ShowInList}}
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
{{index $row $col.Name}}
</td>
{{end}}
{{end}}
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
{{end}}