From 6f75f4a6f1bc24f8ba8545fdd8a1438defec3abb Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 1 Jun 2022 10:41:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/modelmanage/convertIndex.tmpl | 25 ++++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) 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) + }