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

相关文章:

  • 2021-07-16
  • 2022-01-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-07-29
  • 2021-12-13
  • 2021-10-25
相关资源
相似解决方案