1.0.1 • Published 6 years ago

contenteditableplugin v1.0.1

Weekly downloads
2
License
ISC
Repository
-
Last release
6 years ago

介绍

这是内容可编辑vue插件。支持v-model

属性

isEditable: 是否可编辑。

tagName: 可编辑内容的标签元素。

方法

blur: 参数e

keydown: 参数e

使用方法

main.js导入

import editable from './contentEditablePlugin'
Vue.use(editable)

组件中使用

<editable
  tagName="h1"
  :isEditable='true'
  @blur="editBlur"
  v-model="textContent"
  @keydown="editKeydown"
>
</editable>