row-menu
列表页 通用列表页:标题、工具栏和行,桌面和移动端都适用。
该行的其他操作,收在 ⋮ 按钮后面。破坏性的操作链接到它的确认页面。
每个示例都能真实操作,但其中的链接不会跳转到任何地方。 HTML 显示可复制的标记。
链接、表单和一个破坏性项目
把破坏性项目放在最后,标签以 … 结尾。它会打开一个页面,在删除任何内容之前先询问。
<details rst-row-menu name ="rst-menus" >
<summary aria-label ="Grace Hopper 的操作" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><circle cx ="12" cy ="12" r ="1" /><circle cx ="12" cy ="5" r ="1" /><circle cx ="12" cy ="19" r ="1" /></svg >
</summary >
<div rst-row-menu-panel >
<a href ="/orders/AB3PX/edit" >编辑</a >
<form method ="post" action ="/orders/AB3PX/archive" >
<input type ="hidden" name ="state" value ="archived" >
<button type ="submit" >归档</button >
</form >
<hr >
<a class ="rst-danger" href ="/orders/AB3PX/delete" >删除订单…</a >
</div >
</details >
在应用里,这会到达 /orders/AB3PX/archive, /orders/AB3PX/delete, /orders/AB3PX/edit。在这里,它的链接和表单哪儿也不去。
仅链接,用于选择表单中的列表
在表单内,每个项目都必须是链接。需要提交的操作要经过它自己的页面。
<details rst-row-menu name ="rst-menus" >
<summary aria-label ="Alan Turing 的操作" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><circle cx ="12" cy ="12" r ="1" /><circle cx ="12" cy ="5" r ="1" /><circle cx ="12" cy ="19" r ="1" /></svg >
</summary >
<div rst-row-menu-panel >
<a href ="/orders/CD4QY/edit" >编辑</a >
<hr >
<a class ="rst-danger" href ="/orders/CD4QY/delete" >删除订单…</a >
</div >
</details >
在应用里,这会到达 /orders/CD4QY/delete, /orders/CD4QY/edit。在这里,它的链接和表单哪儿也不去。