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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM