1.1.8 • Published 5 years ago

ls-textarea v1.1.8

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

ls-textarea

精简富文本框 支持插入dom 如(表情符),高度自适应,未聚焦插入至末尾,支持v-modal

Build Setup

npm install ls-textarea --save

全局注册

//main.js中引入
import myPlugin from 'tlp_plugin_sum'
Vue.use(myPlugin);

局部注册

import LsTextarea from 'ls-textarea'
export default {
  components: {
    LsTextarea
  }
}

使用

<ls-textarea v-model="text" ref="rich_text"></ls-textarea>

方法 ref methods

插入内容

this.$refs.rich_text.setData("爱你么么哒")

替换全部内容

this.$refs.rich_text.init("爱你么么哒")

获取内容

this.$refs.rich_text.getContent()

参数 params

v-modal 字符串

initType 字符串(text或html) 默认html、初次渲染的文本或者dom

initFocus 布尔值(true或false) 默认false,初次渲染完毕是否获取焦点

maxHeight 字符串 默认160px, 组件最大高度

主动设置内容不要直接改变v-modal的值,应该使用setData方法进行设置,编辑过程中内容会同步在v-modal

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago