基于ace editor封装的vue组件,开箱即用。
npm i --S vue-ace-editor
<template>
<ace></ace>
</template>
<script>
import ace from 'vue-ace-editor'
export default {
}
</script>
- 主题
| theme |
|---|
| ambiance |
| eclipse |
| github |
| chrome |
| xcode |
更多请查看:https://github.com/ajaxorg/ace/tree/master/lib/ace/theme
eg:
<ace :theme="github"></ace>
- 语言
| mode |
|---|
| javascript |
| java |
| c_cpp |
| php |
| python |
更多配置请看:https://github.com/ajaxorg/ace/tree/master/lib/ace/mode
<ace :mode="c_cpp"></ace>
- 字体大小
<ace :font-size="14"></ace>
- 代码补全
<ace :auto-completion="true"></ace>
- 只读模式
- 编辑内容
- 宽高
- 开启实时修改配置面板
- 键位绑定
- 断点设置
- 标记


