mirror of
https://github.com/tenrok/vue-tribute.git
synced 2026-06-16 20:50:35 +03:00
Updating readme with npmcdn link and info about using the value prop
This commit is contained in:
@@ -10,6 +10,12 @@
|
||||
$ npm install vue-input-autosize --save
|
||||
```
|
||||
|
||||
**or** include the UMD build, hosted by [npmcdn](https://npmcdn.com) in a `<script>` tag:
|
||||
|
||||
```js
|
||||
<script src="//npmcdn.com/vue-input-autosize"></script>
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
@@ -23,6 +29,9 @@ Vue.use(VueInputAutosize, { maxWidth: 500, minWidth: 20, comfortZone: 0 });
|
||||
|
||||
`<input type='text' :value='msg' v-input-autosize />`
|
||||
|
||||
### Why bind to `value` instead of using `v-model`?
|
||||
Currently, there's no easy way to track changes to a `v-model` value from a directive. However, since the `value` property of a text field controls its content, and is also a valid parameter to watch for updates from the directive, we can dynamically bind to that instead.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Collin Henderson](https://github.com/syropian)
|
||||
|
||||
Reference in New Issue
Block a user