From 1eab391b5bb25b1b1ee4083028303d7d7779d1b3 Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Fri, 16 Mar 2018 19:07:52 +0800 Subject: [PATCH] =?UTF-8?q?type:function=E7=9A=84lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/editor_blockly.js | 2 +- _server/editor_multi.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_server/editor_blockly.js b/_server/editor_blockly.js index 716c7a28..bbd2be2d 100644 --- a/_server/editor_blockly.js +++ b/_server/editor_blockly.js @@ -438,7 +438,7 @@ editor_blockly.doubleClickBlock = function (blockId){ if(f){ var value = b.getFieldValue(f); //多行编辑 - editor_multi.multiLineEdit(value,b,f,function(newvalue,b,f){ + editor_multi.multiLineEdit(value,b,f,{'lint':f==='RawEvalString_0'},function(newvalue,b,f){ if(textStringDict[b.type]!=='RawEvalString_0'){} b.setFieldValue(newvalue.split('\n').join('\\n'),f); }); diff --git a/_server/editor_multi.js b/_server/editor_multi.js index 4a735402..12bb75e1 100644 --- a/_server/editor_multi.js +++ b/_server/editor_multi.js @@ -109,13 +109,13 @@ editor_multi.confirm = function (){ } var multiLineArgs=[null,null,null]; -editor_multi.multiLineEdit = function(value,b,f,callback){ +editor_multi.multiLineEdit = function(value,b,f,args,callback){ editor_multi.id='callFromBlockly'; codeEditor.setValue(value.split('\\n').join('\n')||''); multiLineArgs[0]=b; multiLineArgs[1]=f; multiLineArgs[2]=callback; - editor_multi.lintAutocomplete=false; + editor_multi.lintAutocomplete=Boolean(args.lint); editor_multi.show(); } editor_multi.multiLineDone = function(){