fix: 面包屑双斜杠bug (/tmp显示为//tmp)
This commit is contained in:
+3
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user