diff --git a/templates/repo/modelmanage/showinfo.tmpl b/templates/repo/modelmanage/showinfo.tmpl index a4577fe20..6f342102b 100644 --- a/templates/repo/modelmanage/showinfo.tmpl +++ b/templates/repo/modelmanage/showinfo.tmpl @@ -440,9 +440,14 @@ function renderBrend(ID,version_name,parents,filename,init){ }else{ $('input[name=model]').val(parents) $('input[name=modelbac]').val(filename) - $('#file_breadcrumb a.section:contains(${filename})').nextAll().remove() - $('#file_breadcrumb a.section:contains(${filename})').replaceWith(`
${filename}
`) - $('#file_breadcrumb div.section:contains(${filename})').append("
/
") + let selectEle = $('#file_breadcrumb a.section').filter( + (index, item) => { + return item.text == filename; + } + ); + selectEle.nextAll().remove(); + selectEle.after("
/
"); + selectEle.replaceWith(`
${filename}
`); } } diff --git a/web_src/js/features/cloudbrainShow.js b/web_src/js/features/cloudbrainShow.js index 3d5362e59..b4b56bd8f 100644 --- a/web_src/js/features/cloudbrainShow.js +++ b/web_src/js/features/cloudbrainShow.js @@ -322,8 +322,8 @@ export default async function initCloudrainSow() { } ); selectEle.nextAll().remove(); + selectEle.after("
/
"); selectEle.replaceWith(`
${filename}
`); - selectEle.append("
/
"); } }