forked from p81075629/datagear
SQL工作台:解决打开多个SQL工作台时,自动提示信息被最后一个覆盖的BUG
This commit is contained in:
parent
109f5f7e4b
commit
1921f7d7ea
|
@ -141,8 +141,7 @@ Schema schema 数据库,不允许为null
|
|||
po.element("#sqlCommitModeSet").buttonset();
|
||||
po.element("#sqlExceptionHandleModeSet").buttonset();
|
||||
|
||||
var languageTools = ace.require("ace/ext/language_tools");
|
||||
languageTools.setCompleters(
|
||||
po.sqlEditorCompleters =
|
||||
[
|
||||
{
|
||||
identifierRegexps : [/[a-zA-Z_0-9\.\$]/],
|
||||
|
@ -151,15 +150,16 @@ Schema schema 数据库,不允许为null
|
|||
po.getSqlAutocompleteCompletions(editor, session, pos, prefix, callback);
|
||||
}
|
||||
}
|
||||
]);
|
||||
];
|
||||
var languageTools = ace.require("ace/ext/language_tools");
|
||||
var SqlMode = ace.require("ace/mode/sql").Mode;
|
||||
po.sqlEditor = ace.edit("${pageId}-sql-editor");
|
||||
po.sqlEditor.session.setMode(new SqlMode());
|
||||
po.sqlEditor.setShowPrintMargin(false);
|
||||
po.sqlEditor.setOptions(
|
||||
{
|
||||
enableBasicAutocompletion: true,
|
||||
enableLiveAutocompletion: true
|
||||
enableBasicAutocompletion: po.sqlEditorCompleters,
|
||||
enableLiveAutocompletion: po.sqlEditorCompleters
|
||||
});
|
||||
po.sqlEditor.focus();
|
||||
po.sqlEditor.navigateFileEnd();
|
||||
|
|
Loading…
Reference in New Issue