2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-16 09:10:33 +03:00

- new dedicated development template

- separate environment for developing docs
- clear out discarded couscous files
- start converting docs markdown
This commit is contained in:
Jeff Sagal
2017-02-01 22:32:06 -08:00
parent a8388aa755
commit 201e135964
59 changed files with 2371 additions and 1145 deletions
+45
View File
@@ -0,0 +1,45 @@
## NPM Based WorkFlows
``` bash
$ npm install vue-select
```
```html
<template>
<div id="myApp">
<v-select v-model="selected" :options="options"></v-select>
</div>
</template>
<script>
import vSelect from 'vue-select'
export default {
components: {vSelect},
data() {
return {
selected: null,
options: ['foo','bar','baz']
}
}
}
</script>
```
## Browser Globals
`v1.3.0+` no longer requires any toolchain to use the component:
Just include `vue` & `vue-select.js` - I recommend using [unpkg.com](https://unpkg.com/#/).
```html
<!-- use the latest release -->
<script src="https://unpkg.com/vue-select@latest"></script>
<!-- or point to a specific release -->
<script src="https://unpkg.com/vue-select@1.30"></script>
```
Then register the component in your javascript:
```js
Vue.component('v-select', VueSelect.VueSelect);
```
From there you can use as normal. Here's an [example on JSBin](http://jsbin.com/saxaru/5/edit?html,js,output).