vue多行文本框加组件
Vue代码镜像 (Vue-Codemirror)
codemirror component for vuejs.
vuejs的codemirror组件。
CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with a number of language modes and addons that implement more advanced editing functionality.
CodeMirror是使用JavaScript为浏览器实现的多功能文本编辑器。 它专门用于编辑代码,并带有实现更高级编辑功能的多种语言模式和附加组件。
大事记 (Events)
To make it easier to handle events, the component converts some codemirror built-in native events into a single vue component event, where you can listen for events from both the component itself and from codemirror. If you need to listen for more and more complex events, you can pass in the event names (Array) you need for the global Vue.use(, { events: [] })
and the component parameters :events
, respectively, or by the this.codemirror.on(evennt, hanger)
method of the codemirror instance. Here's a list of events:
为了使处理事件更容易,该组件将一些Codemirror内置本机事件转换为单个vue组件事件,您可以在其中侦听来自组件本身和Codemirror的事件。 如果您需要侦听越来越复杂的事件,则可以分别传递全局Vue.use(, { events: [] })
和组件参数:events
所需的事件名称(数组),或者通过codemirror实