zoukankan      html  css  js  c++  java
  • Vue之vue2-ace-editor代码编辑器使用方式

    1、安装

    npm install --save-dev vue2-ace-editor

    2.1、全局加载:main.js 进行组件全局加载

    import Editor from 'vue2-ace-editor'
    Vue.component('editor', Editor)

    2.2、组件单独加载

    import Editor from 'vue2-ace-editor'
    components: {
        Editor
    }

    3、组件引入editor代码编辑器

    <editor
      height="500" 
      width="500"
      ref="editor" 
      :content="content" 
      v-model="content"
      :options="{
          enableBasicAutocompletion: true,
          enableSnippets: true,
          enableLiveAutocompletion: true,
          tabSize:6,
          fontSize:14,
          showPrintMargin:false,   //去除编辑器里的竖线
       }"
       :lang="'html'"
       @init="editorInit">
    </editor>

     --仅用作学习记录

  • 相关阅读:
    实验报告2
    实验三 网络欺骗技术
    实验3
    心理魔术
    实验报告
    实验4
    实验5
    实验四恶意代码
    网络对抗技术 实验一
    实验二
  • 原文地址:https://www.cnblogs.com/emilyzz/p/14184695.html
Copyright © 2011-2022 走看看