File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
composeApp/src/wasmJsMain/kotlin/love/forte/simbot/codegen/gen/view Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import androidx.compose.ui.draw.shadow
1414import androidx.compose.ui.text.font.FontWeight
1515import androidx.compose.ui.unit.dp
1616import androidx.compose.ui.unit.sp
17+ import js.errors.toJsErrorLike
1718import js.objects.unsafeJso
1819import js.promise.await
1920import jszip.JSZipGeneratorOptions
@@ -25,6 +26,7 @@ import love.forte.simbot.codegen.filesaver.saveAs
2526import love.forte.simbot.codegen.gen.GradleProjectViewModel
2627import love.forte.simbot.codegen.gen.doGenerate
2728import web.blob.Blob
29+ import web.console.console
2830
2931/* *
3032 * 下载按钮组件,用于生成并下载项目
@@ -47,7 +49,7 @@ fun DoDownload(
4749 kotlin.runCatching {
4850 doDownload(project)
4951 }.onFailure { err ->
50- println (" 生成失败: $ err" )
52+ console.error (" 生成失败" .toJsString(), err.toJsErrorLike() )
5153 window.alert(" 生成失败QAQ" )
5254 }
5355 }.invokeOnCompletion { loadingCounter.dec() }
You can’t perform that action at this time.
0 commit comments