更新代码

This commit is contained in:
feiyangqingyun
2023-06-27 11:33:58 +08:00
parent d5d4689a6f
commit 9bd183a595
4 changed files with 9 additions and 9 deletions

View File

@@ -189,7 +189,7 @@ function QtLoader(config)
removeChildren(container);
var loadingText = document.createElement("text");
loadingText.className = "QtLoading"
loadingText.innerHTML = '<p><center> ${loadingState} ...</center><p>';
loadingText.innerHTML = '<p><center> ${loadingState}...</center><p>';
return loadingText;
};
@@ -265,7 +265,7 @@ function QtLoader(config)
function fetchThenCompileWasm(response) {
return response.arrayBuffer().then(function(data) {
self.loaderSubState = "正在编译";
self.loaderSubState = "Compiling";
setStatus("Loading") // trigger loaderSubState udpate
return WebAssembly.compile(data);
});
@@ -274,7 +274,7 @@ function QtLoader(config)
function fetchCompileWasm(filePath) {
return fetchResource(filePath).then(function(response) {
if (typeof WebAssembly.compileStreaming !== "undefined") {
self.loaderSubState = "第一步: 下载 / 第二步: 编译";
self.loaderSubState = "Downloading/Compiling";
setStatus("Loading");
return WebAssembly.compileStreaming(response).catch(function(error) {
// compileStreaming may/will fail if the server does not set the correct
@@ -312,7 +312,7 @@ function QtLoader(config)
// Continue waiting if loadEmscriptenModule() is called again
if (publicAPI.status == "Loading")
return;
self.loaderSubState = "正在下载";
self.loaderSubState = "Downloading";
setStatus("Loading");
// Fetch emscripten generated javascript runtime