fix: use span instead of button for icon buttons

This commit is contained in:
tian 2026-05-08 12:05:36 +08:00
parent c16e9d94c4
commit 93a514b8ac
2 changed files with 3 additions and 3 deletions

View File

@ -35,10 +35,10 @@
<div style="margin-top:6px;display:flex;justify-content:space-between;align-items:center"> <div style="margin-top:6px;display:flex;justify-content:space-between;align-items:center">
<div><span style="font-weight:500;font-size:13px">{{.Name}}</span> <span class="muted small">{{.PhotoCount}}张</span></div> <div><span style="font-weight:500;font-size:13px">{{.Name}}</span> <span class="muted small">{{.PhotoCount}}张</span></div>
<div class="actions compact" style="gap:2px"> <div class="actions compact" style="gap:2px">
<button class="btn-icon ghost" type="button" title="编辑" onclick="showEdit({{.ID}},'{{.Name}}',[{{range $i,$p := .Photos}}{{if $i}},{{end}}'/ui/face-photo/{{$p}}'{{end}}])">&#9998;</button> <span class="btn-icon ghost" title="编辑" onclick="showEdit({{.ID}},'{{.Name}}',[{{range $i,$p := .Photos}}{{if $i}},{{end}}'/ui/face-photo/{{$p}}'{{end}}])">">&#9998;</button>#9998;</span>
<form method="post" action="/ui/face-gallery/delete" style="display:inline" onsubmit="return confirm('确定删除 {{.Name}}')"> <form method="post" action="/ui/face-gallery/delete" style="display:inline" onsubmit="return confirm('确定删除 {{.Name}}')">
<input type="hidden" name="id" value="{{.ID}}"> <input type="hidden" name="id" value="{{.ID}}">
<button class="btn-icon ghost" type="submit" style="color:var(--danger-soft-text)" title="删除">&#10005;</button> <span class="btn-icon ghost" style="color:var(--danger-soft-text)" title="删除" onclick="this.closest('form').submit()"><button class="btn-icon ghost" type="submit" style="color:var(--danger-soft-text)" title="删除">&#10005;</button>#10005;</span>
</form> </form>
</div> </div>
</div> </div>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{.Title}}</title> <title>{{.Title}}</title>
<link rel="stylesheet" href="/ui/assets/vendor/tabler.min.css" /> <link rel="stylesheet" href="/ui/assets/vendor/tabler.min.css" />
<link rel="stylesheet" href="/ui/assets/style.css?v=20260508-ia04" /> <link rel="stylesheet" href="/ui/assets/style.css?v=20260508-ia05" />
<link rel="stylesheet" href="/ui/assets/graph_editor.css?v=20260429-ia01" /> <link rel="stylesheet" href="/ui/assets/graph_editor.css?v=20260429-ia01" />
</head> </head>
<body data-theme="blue-dark"> <body data-theme="blue-dark">