bulk-bar
清單畫面 一般嘅清單畫面:標題、工具列同行,喺桌面同手機都用得。
揀選模式嘅頂部條,代替咗清單列:數量、一個擴大揀選嘅連結,同動作選單。
每個例子都真係用得,不過入面啲連結唔會帶你去邊度。 HTML 顯示可以複製嘅標記。
揀咗三行
破壞性嗰項擺喺最尾:第一項先係外面個表單㩒 Enter 嗰陣默默用嘅預設。
將呢段放入 <div rst-list> 入面。
<div rst-bulkbar >
<a rst-bulkbar-close href ="/posts" aria-label ="揀完喇" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="M18 6 6 18" /><path d ="m6 6 12 12" /></svg >
</a >
<span rst-bulkbar-selection ><span rst-bulkbar-count >揀咗 3 項</span ><a rst-bulkbar-escalate href ="/posts?select=all" >揀晒全部 412 項符合嘅</a ></span >
<details rst-dropdown name ="rst-menus" >
<summary >
操作
<span rst-caret aria-hidden ="true" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="m6 9 6 6 6-6" /></svg >
</span >
</summary >
<div rst-dropdown-menu >
<button type ="submit" name ="action" value ="export" >匯出</button >
<button type ="submit" name ="action" value ="unpublish" >取消發佈</button >
<button type ="submit" name ="action" value ="delete" class ="rst-danger" >刪除…</button >
</div >
</details >
</div >
喺應用程式入面,呢個會去到 /posts, /posts?select=all。喺呢度,佢嘅連結同表格都唔會去任何地方。