fix: 面包屑双斜杠bug (/tmp显示为//tmp)

This commit is contained in:
Your Name
2026-05-31 00:11:47 +08:00
parent 557c8d28c1
commit 40d672fdbb
+3 -2
View File
@@ -283,10 +283,11 @@
let accumulated='';
segments.forEach((seg,i)=>{
accumulated+='/'+seg;const p=accumulated;
const sep=i===0?'':'<span class="text-slate-600">/</span>';
if(i<segments.length-1){
html+=`<span class="text-slate-600">/</span><span class="cursor-pointer text-brand-light hover:underline" data-action="browse" data-path="${esc(p)}">${esc(seg)}</span>`;
html+=`${sep}<span class="cursor-pointer text-brand-light hover:underline" data-action="browse" data-path="${esc(p)}">${esc(seg)}</span>`;
}else{
html+=`<span class="text-slate-600">/</span><span class="text-white font-medium">${esc(seg)}</span>`;
html+=`${sep}<span class="text-white font-medium">${esc(seg)}</span>`;
}
});
bcPath.innerHTML=html;