|
@@ -110,11 +110,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="json-section">
|
|
<div class="json-section">
|
|
|
- <h3>JSON 数据</h3>
|
|
|
|
|
- <textarea v-model="jsonData" placeholder="在此输入JSON格式的积木块数据..."></textarea>
|
|
|
|
|
|
|
+ <h3> 数据</h3>
|
|
|
|
|
+ <textarea v-model="jsonData" rows="10" placeholder="在此输入JSON格式的积木块数据..."></textarea>
|
|
|
<div class="controls">
|
|
<div class="controls">
|
|
|
<button @click="loadWorkspaceFromJson">加载JSON到工作区</button>
|
|
<button @click="loadWorkspaceFromJson">加载JSON到工作区</button>
|
|
|
<button @click="exportWorkspaceToJson">导出工作区为JSON</button>
|
|
<button @click="exportWorkspaceToJson">导出工作区为JSON</button>
|
|
|
|
|
+ <button id="generateCode" @click="generateCode('javascript')">生成JavaScript代码</button>
|
|
|
|
|
+ <button id="generateCode" @click="generateCode('python')">生成Python代码</button>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="statusMessage" :class="['status', statusType]">
|
|
<div v-if="statusMessage" :class="['status', statusType]">
|
|
|
{{ statusMessage }}
|
|
{{ statusMessage }}
|
|
@@ -153,8 +155,6 @@
|
|
|
<h2>工作区</h2>
|
|
<h2>工作区</h2>
|
|
|
<div id="blocklyDiv"></div>
|
|
<div id="blocklyDiv"></div>
|
|
|
<div class="controls">
|
|
<div class="controls">
|
|
|
- <button id="generateCode" @click="generateCode('javascript')">生成JavaScript代码</button>
|
|
|
|
|
- <button id="generateCode" @click="generateCode('python')">生成Python代码</button>
|
|
|
|
|
<button id="runCode" @click="runCode">运行代码</button>
|
|
<button id="runCode" @click="runCode">运行代码</button>
|
|
|
<button @click="clearWorkspace">清空工作区</button>
|
|
<button @click="clearWorkspace">清空工作区</button>
|
|
|
</div>
|
|
</div>
|
|
@@ -1997,7 +1997,7 @@ textarea {
|
|
|
.title-box {
|
|
.title-box {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
top: 10px;
|
|
top: 10px;
|
|
|
- left: 20px;
|
|
|
|
|
|
|
+ padding-left: 15px;
|
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
|
z-index: 10;
|
|
z-index: 10;
|
|
|
}
|
|
}
|