From 1354d619d01b600a61fc890a7d54a0fac8043452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=A6=E5=BD=92=E4=BA=91=E5=B8=86?= <1138663075@qq.com> Date: Fri, 9 May 2025 17:23:53 +0000 Subject: [PATCH] =?UTF-8?q?!7=20feat(=E5=B8=AE=E5=8A=A9):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=B8=AE=E5=8A=A9=E9=A1=B5=E9=9D=A2=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E9=94=AE=20*=20Revert=20"feat(common):=20=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=B7=BB=E5=8A=A0=E9=BC=A0=E6=A0=87=E6=BB=9A=E8=BD=AE?= =?UTF-8?q?=E7=BF=BB=E9=A1=B5=E5=8A=9F=E8=83=BD"=20*=20feat(=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9):=20=E4=BF=AE=E5=A4=8D=E5=B8=AE=E5=8A=A9=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=BF=AB=E6=8D=B7=E9=94=AE=20*=20Merge=20branch=20'ma?= =?UTF-8?q?ster'=20of=20https://gitee.com/dream-to-cloud-sail/mixly3=20*?= =?UTF-8?q?=20feat(common):=20=E4=B8=BB=E9=A1=B5=E9=9D=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=BC=A0=E6=A0=87=E6=BB=9A=E8=BD=AE=E7=BF=BB=E9=A1=B5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boards/default_src/arduino_avr/blocks/logic.js | 5 +++-- main.js | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/boards/default_src/arduino_avr/blocks/logic.js b/boards/default_src/arduino_avr/blocks/logic.js index 0c7f4c70..4e508342 100644 --- a/boards/default_src/arduino_avr/blocks/logic.js +++ b/boards/default_src/arduino_avr/blocks/logic.js @@ -23,7 +23,7 @@ export const logic_compare = { ['>', 'GT'], ['\u2265', 'GTE'] ]; - //this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL); + this.setHelpUrl("https://mixly.readthedocs.io/zh-cn/latest/Arduino/AVR/04Logic.html#id2"); this.setColour(LOGIC_HUE); this.setOutput(true, Boolean); this.appendValueInput('A'); @@ -58,7 +58,7 @@ export const logic_operation = { [Blockly.Msg.LOGIC_OPERATION_AND, 'AND'], [Blockly.Msg.LOGIC_OPERATION_OR, 'OR'] ]; - //this.setHelpUrl(Blockly.Msg.LOGIC_OPERATION_HELPURL); + this.setHelpUrl("https://mixly.readthedocs.io/zh-cn/latest/Arduino/AVR/04Logic.html#id12"); this.setColour(LOGIC_HUE); this.setOutput(true, Boolean); this.appendValueInput('A') @@ -144,5 +144,6 @@ export const logic_true_or_false = { this.setOutput(true); this.setInputsInline(true); this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE); + this.setHelpUrl("https://mixly.readthedocs.io/zh-cn/latest/Arduino/AVR/04Logic.html#id17"); } }; \ No newline at end of file diff --git a/main.js b/main.js index 9cfadb30..8a326e88 100644 --- a/main.js +++ b/main.js @@ -167,11 +167,11 @@ function createWindow(filePath = null, indexUrl = null) { //打开帮助页面 electronLocalshortcut.register(win, 'CmdOrCtrl+H', () => { - var sendObj = {}; - sendObj.type = "help"; - var sendStr = JSON.stringify(sendObj); - win.webContents.send('ping', sendStr); - //win.webContents.executeJavaScript('alert("this is a test!");'); + const winHelp = new BrowserWindow({ parent: win }); + //打开子窗口 + winHelp.loadURL("https://mixly.readthedocs.io/zh-cn/latest/contents.html"); + //直接调用系统默认浏览器打开 + //shell.openExternal("https://mixly.readthedocs.io/zh-cn/latest/contents.html") }); //创建一个新页面