2
0
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:
syropian
2016-07-24 23:27:40 -04:00
parent 510800a7af
commit 292a48a261
+9
View File
@@ -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)