From 3a858162662ccfc088c1b8369fc8bddffba473a8 Mon Sep 17 00:00:00 2001 From: mobyw Date: Mon, 30 Sep 2024 21:29:53 +0800 Subject: [PATCH] :sparkles: Return to blockly when loading default workspace --- packages/app/src/components/TutorialTab.vue | 2 +- packages/app/src/workspace.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/app/src/components/TutorialTab.vue b/packages/app/src/components/TutorialTab.vue index 2c0c7ec..789243c 100644 --- a/packages/app/src/components/TutorialTab.vue +++ b/packages/app/src/components/TutorialTab.vue @@ -11,7 +11,7 @@ import { initWorkspaceState } from "@/workspace"; - 点击此按钮加载示例 + 点击此按钮加载默认示例 diff --git a/packages/app/src/workspace.ts b/packages/app/src/workspace.ts index 2734897..3e76b32 100644 --- a/packages/app/src/workspace.ts +++ b/packages/app/src/workspace.ts @@ -110,6 +110,7 @@ export function initWorkspaceState() { let startBlocks = workspaceStore.startBlocks; let workspace = Blockly.getMainWorkspace(); Blockly.serialization.workspaces.load(startBlocks, workspace); + outputsStore.activeTab = "tab-0"; } export function generateCode() {