vue2-ace-editor配置语法提示
<editor class="fn_edit" id="editor"v-if="editfn.hishow"@init="editorInit":options="options" lang="python"theme="chrome"v-model="editfn.content">&l...
·
<editor class="fn_edit" id="editor"
v-if="editfn.hishow"
@init="editorInit"
:options="options" lang="python"
theme="chrome"
v-model="editfn.content">
</editor>
//通过配置options的值配置语法提示
options:{/*vue2-ace-editor编辑器配置自动补全等*/
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: true/*自动补全*/
},
editorInit() {
require('brace/ext/language_tools') //language extension prerequsite...
require('brace/mode/html')
require('brace/mode/javascript') //language
require('brace/mode/python')
require('brace/mode/less')
require('brace/theme/chrome')
require('brace/snippets/javascript') //snippet
}
更多推荐
已为社区贡献27条内容
所有评论(0)