From 41879a38842a3f27e4006d9416619e738728b2f1 Mon Sep 17 00:00:00 2001 From: gz65555 Date: Wed, 15 May 2024 16:41:33 +0800 Subject: [PATCH] feat: add benchmark --- template/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/template/index.js b/template/index.js index 9670145..f016983 100644 --- a/template/index.js +++ b/template/index.js @@ -85,7 +85,10 @@ import(`./mpa/${platform}/.demoList.json`).then(({ default: demoList }) => { return; } - iframe.src = "/mpa" + "/" + platform + "/" + labelSrc + ".html"; + const prefix = + window.location.href.indexOf("/benchmark/") > -1 ? "/benchmark" : ""; + + iframe.src = prefix + "/mpa/" + platform + "/" + labelSrc + ".html"; items.forEach(({ itemDOM }) => { const itemPath = `mpa/${platform}/${itemDOM.title}`;