1.2.5 • Published 2 years ago

v-ace-editor v1.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue-ace-editor

npm

一个包装 ace 灵感来自vue3-ace-editor ,目前已适配vue2.x.x版本

如何使用

  1. 安装

    npm i v-ace-editor
  2. 注册在components选项

    import AceEditor from 'v-ace-editor';
    
    export default {
        data:{
          test:''
        },
        methods,
        ...
        components: {
            AceEditor,
        },
    }
  3. Use the component in template

    <ace-editor
       v-model="test"
       lang="html"
       theme="ambiance"
       style="height: 300px"
    />

    道具v-model 是必需的。 <ace-editor> 默认没有高度。它的高度必须手动指定,或者同时设置 min-linesmax-lines 以使编辑器的高度自动增长。 prop lang,theme 具体可以参考 ace-editor的文档

详细说明

目前支持按需加载,设置lazy=false,添加自己需要的文件,具体可参考下方地址

https://github.com/ajaxorg/ace-builds/blob/a4103cb0a672a4fec9a16fc344f3116b51d6bcda/webpack-resolver.js

参数说明

AttributeDescriptionType
valueString
lang语言String
theme主题String
options扩展参数Object
placeholder提示String
readonly只读Boolean
wrap搜索到达结尾时,将搜索返回到开头Boolean
printMargin显示打印边距和设置打印边距宽度的快捷方式Boolean, Number
minLines至少行数Number
maxLines至多行数Number
lazy懒加载Boolean

更多参数

LICENSE

MIT

作者:entfrm开发团队-王翔

1.2.5

2 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.0

3 years ago

1.1.4

3 years ago

1.2.2

3 years ago

1.1.3

3 years ago

1.2.1

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago