1.0.4-patch.12 • Published 7 years ago
@bitsler/vue-area-autosize v1.0.4-patch.12
vue-area-autosize
A Fork of vue-textarea-autoresize with fixes and optimizations. This is a Vue component that provides textarea with automatically adjustable height and without any wrappers and dependencies
Finctionality
v-modelbinding in parent- min/max height limitation
- enable/disable auto resizing dynamically
- with
@input.nativeand@change.nativeevents
Note
- You are able to handle all native events via
@eventname.nativeread more - There is no CSS from box, so you are free to style it as you wish
Install
Install with npm
npm install @bitsler/vue-area-autosize --saveor with yarn
yarn add @bitsler/vue-area-autosizeAdding into app
In your main.js
import Vue from 'vue'
import VueAreaAutosize from '@bitslervue-area-autosize'
Vue.use(VueAreaAutosize)Usage
In components
<textarea-autosize
placeholder="Type something here..."
ref="someName"
v-model="someValue"
:min-height="30"
:max-height="350"
@blur.native="onBlurTextarea"
></textarea-autosize>Focus/blur or select content in components
this.$refs.someName.$el.focus()
this.$refs.someName.$el.blur()
this.$refs.someName.$el.select()Interface
Props
| Props | Required | Type | Default | Description |
|---|---|---|---|---|
| autosize | false | Boolean | true | allow to enable/disable auto resizing dynamically |
| minHeight | false | Number | null | min textarea height |
| maxHeight | false | Number | null | max textarea height |
Events
| Name | Params | Description |
|---|---|---|
| input | value | fires on textarea content changed. part of a v-model binding. read more |
Slots
There are no slots available
License
1.0.4-patch.12
7 years ago
1.0.4-patch.11
7 years ago
1.0.4-patch.10
7 years ago
1.0.4-patch.9
7 years ago
1.0.4-patch.8
7 years ago
1.0.4-patch.7
7 years ago
1.0.4-patch.6
7 years ago
1.0.4-patch.5
7 years ago
1.0.4-patch.4
7 years ago
1.0.4-patch.3
7 years ago
1.0.4-patch.2
7 years ago
1.0.4-patch.1
7 years ago