diff --git a/src/composables/code.ts b/src/composables/code.ts index 090ddc6..4f4489e 100644 --- a/src/composables/code.ts +++ b/src/composables/code.ts @@ -32,7 +32,6 @@ export const status = ref(Status.NotStarted) export const loading = ref(false) export const turtleRunId = ref(0) export const size = ref(0) -export const debug = ref(false) watch(size, (value: number) => { cache.fontsize.value = value diff --git a/src/desktop/AnalysisPanel.vue b/src/desktop/AnalysisPanel.vue new file mode 100644 index 0000000..632b905 --- /dev/null +++ b/src/desktop/AnalysisPanel.vue @@ -0,0 +1,172 @@ + + + + + + + + + diff --git a/src/desktop/CodeSection.vue b/src/desktop/CodeSection.vue new file mode 100644 index 0000000..db980ff --- /dev/null +++ b/src/desktop/CodeSection.vue @@ -0,0 +1,44 @@ + + + + + + + 调试 + + 复制 + 清空 + + + diff --git a/src/desktop/Content.vue b/src/desktop/Content.vue index 8e6812f..852db90 100644 --- a/src/desktop/Content.vue +++ b/src/desktop/Content.vue @@ -1,182 +1,33 @@ - - - - 调试 - - - - 调试(新) - - 复制 - 清空 - - + - - - - 清空 - - - + - - - - 运行成功 - - 运行失败 - - - - 推测原因 - - - - - - - - - + + @@ -186,163 +37,4 @@ watch(turtleRunId, () => runSkulptTurtle()) .container { height: calc(100vh - 60px); } - -.canvas { - width: 100%; - height: 100%; -} - -.analysisPanel { - width: 400px; - min-height: 60px; - max-height: calc(100vh - 200px); - overflow: auto; - padding: 16px; - border-radius: 8px; - line-height: 1.6; - color: #374151; -} - -/* 简洁 Markdown 样式 */ -.analysisPanel :deep(h1), -.analysisPanel :deep(h2), -.analysisPanel :deep(h3), -.analysisPanel :deep(h4), -.analysisPanel :deep(h5), -.analysisPanel :deep(h6) { - margin: 16px 0 8px 0; - font-weight: 600; - color: #1f2937; -} - -.analysisPanel :deep(h1) { - font-size: 1.5em; - border-bottom: 2px solid #e5e7eb; - padding-bottom: 8px; -} - -.analysisPanel :deep(h2) { - font-size: 1.3em; - color: #374151; -} - -.analysisPanel :deep(h3) { - font-size: 1.1em; - color: #4b5563; -} - -.analysisPanel :deep(p) { - margin: 12px 0; - color: #374151; - font-size: 14px; -} - -.analysisPanel :deep(ul), -.analysisPanel :deep(ol) { - margin: 12px 0; - padding-left: 20px; -} - -.analysisPanel :deep(li) { - margin: 4px 0; - color: #374151; -} - -.analysisPanel :deep(strong) { - font-weight: 600; - color: #1f2937; -} - -.analysisPanel :deep(em) { - font-style: italic; - color: #6b7280; -} - -/* 简洁代码块样式 */ -.analysisPanel :deep(pre) { - background: #f8f9fa; - color: #24292f; - padding: 16px; - border-radius: 6px; - margin: 12px 0; - overflow-x: auto; - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; - font-size: 13px; - line-height: 1.5; - border: 1px solid #d0d7de; -} - -.analysisPanel :deep(code) { - background: #f1f3f4; - color: #d63384; - padding: 2px 6px; - border-radius: 3px; - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; - font-size: 0.9em; -} - -.analysisPanel :deep(pre code) { - background: transparent; - color: inherit; - padding: 0; - border-radius: 0; -} - -/* 简洁引用块样式 */ -.analysisPanel :deep(blockquote) { - border-left: 4px solid #d0d7de; - background: #f6f8fa; - margin: 16px 0; - padding: 12px 16px; - border-radius: 0 6px 6px 0; - color: #656d76; - font-style: italic; -} - -/* 简洁表格样式 */ -.analysisPanel :deep(table) { - width: 100%; - border-collapse: collapse; - margin: 16px 0; - background: #ffffff; - border-radius: 6px; - overflow: hidden; - border: 1px solid #d0d7de; -} - -.analysisPanel :deep(th), -.analysisPanel :deep(td) { - padding: 12px; - text-align: left; - border-bottom: 1px solid #d0d7de; -} - -.analysisPanel :deep(th) { - background: #f6f8fa; - font-weight: 600; - color: #24292f; -} - -.analysisPanel :deep(td) { - color: #24292f; -} - -/* 简洁链接样式 */ -.analysisPanel :deep(a) { - color: #0969da; - text-decoration: none; -} - -.analysisPanel :deep(a:hover) { - color: #0969da; - text-decoration: underline; -} - -/* 简洁分割线 */ -.analysisPanel :deep(hr) { - border: none; - height: 1px; - background: #d0d7de; - margin: 16px 0; -} diff --git a/src/desktop/Debug.vue b/src/desktop/Debug.vue deleted file mode 100644 index 9906e3e..0000000 --- a/src/desktop/Debug.vue +++ /dev/null @@ -1,64 +0,0 @@ - - 正在加载中...(第一次打开会有点慢) - - 提醒: - 1. 点击【下一步】开始调试(也可以拖动进度条) - - 2. 点击 - 修改代码 - 完成修改后可再次调试 - - - - - - diff --git a/src/desktop/InputSection.vue b/src/desktop/InputSection.vue new file mode 100644 index 0000000..1ce0102 --- /dev/null +++ b/src/desktop/InputSection.vue @@ -0,0 +1,27 @@ + + + + + + + 清空 + + + + diff --git a/src/desktop/OutputSection.vue b/src/desktop/OutputSection.vue new file mode 100644 index 0000000..98ceacf --- /dev/null +++ b/src/desktop/OutputSection.vue @@ -0,0 +1,35 @@ + + + + + + 运行成功 + 运行失败 + + + + 推测原因 + + + + + + + diff --git a/src/desktop/TurtleSection.vue b/src/desktop/TurtleSection.vue new file mode 100644 index 0000000..f60ecdf --- /dev/null +++ b/src/desktop/TurtleSection.vue @@ -0,0 +1,56 @@ + + + + + + + diff --git a/src/desktop/index.vue b/src/desktop/index.vue index 29fb00d..702c90c 100644 --- a/src/desktop/index.vue +++ b/src/desktop/index.vue @@ -19,22 +19,12 @@ > - - -
提醒:
1. 点击【下一步】开始调试(也可以拖动进度条)
- 2. 点击 - 修改代码 - 完成修改后可再次调试 -