<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
      	}

https://github.com/ajaxorg/ace/wiki/Configuring-Ace

Logo

前往低代码交流专区

更多推荐