Ace 在Vue中使用方法
var Vue = require('vue/dist/vue.common.js'); document.querySelector('body').append(document.createElement('div')) new Vue({ template:'<editor v-model="content" lang="json" height="500" @init="initEditor"></editor>', data:{ content:"" }, components:{ editor:require('vue2-ace-editor') }, methods:{ initEditor:function (editor) { require('brace/mode/json'); require('brace/theme/chrome'); } } }).$mount('div');
https://www.npmjs.com/package/vue2-ace-editor