diff --git a/templates/repo/modelmanage/convertIndex.tmpl b/templates/repo/modelmanage/convertIndex.tmpl index eb57f660a..243819d09 100644 --- a/templates/repo/modelmanage/convertIndex.tmpl +++ b/templates/repo/modelmanage/convertIndex.tmpl @@ -258,17 +258,22 @@ } function loadModelVersion(value){ console.log("value=" + value); - let nameMap = modelData.nameMap - let versionList = nameMap[value] - n_length = versionList.length - let train_html='' - for (let i=0;i${versionList[i].Version}` - train_html += '' + if(value ==null && value ==""){ + $(".ui.dropdown.selection.search.width70").removeClass("loading") + }else{ + let nameMap = modelData.nameMap + let versionList = nameMap[value] + n_length = versionList.length + let train_html='' + for (let i=0;i${versionList[i].Version}` + train_html += '' + } + $("#model-version").append(train_html) + $(".ui.dropdown.selection.search.width70").removeClass("loading") + $('#choice_version .default.text').text(versionList[0].Version) } - $("#model-version").append(train_html) - $(".ui.dropdown.selection.search.width70").removeClass("loading") - $('#choice_version .default.text').text(versionList[0].Version) + }