Skip to content

saitoChen/vue-awesome-textarea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-awesome-textarea

🐱Auto resize textarea component for Vue2.x

Support

  • Vue2.x
  • Vue3.x
  • Typescript

Install

npm install vue-awesome-textarea --save

// or

yarn add vue-awesome-textarea

Usage

// main.js

import VueAwesomeTextarea from 'vue-awesome-textarea'

Vue.use(VueAwesomeTextarea)

// xxx.vue

<template>
  <vue-awesome-textarea />
</template>

Option Props

  • autoResize (Boolean, default: false)
    Auto resize the textarea, autoResize is effective after set v-model of textarea
  • minHeight (Number)
    Textarea's minHeight, minHeight is effective after set autoResize: true
  • maxHeight (Number)
    Textarea's maxHeight, maxHeight is effective after set autoResize: true

Events

  • getRows (Params: row)
    Emmited when autoResize is true and textarea rows has been changed

LICENSE

MIT

Releases

No releases published

Packages

No packages published