mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-17 02:29:37 +03:00
201e135964
- separate environment for developing docs - clear out discarded couscous files - start converting docs markdown
42 lines
1.2 KiB
Vue
42 lines
1.2 KiB
Vue
<template>
|
|
<div>
|
|
<p>Install from GitHub via NPM</p>
|
|
<pre><v-code lang="bash">npm install sagalbot/vue-select</v-code></pre>
|
|
|
|
<p>To use the vue-select component in your templates, simply import it, and register it with your component.</p>
|
|
<pre><v-code lang="markup"><template>
|
|
<div id="myApp">
|
|
<v-select :value.sync="selected" :options="options"></v-select>
|
|
</div>
|
|
</template>
|
|
<script></v-code>
|
|
<v-code lang="javascript">import vSelect from "vue-select"
|
|
export default {
|
|
components: {vSelect},
|
|
|
|
data() {
|
|
return {
|
|
selected: null,
|
|
options: ['foo','bar','baz']
|
|
}
|
|
}
|
|
}
|
|
</script></v-code>
|
|
</pre>
|
|
</div>
|
|
</template>
|
|
<script type="text/babel">
|
|
/**
|
|
* Note that this file (and anything other than src/components/Select.vue)
|
|
* has nothing to do with how you use vue-select. These files are used
|
|
* for the demo site at http://sagalbot.github.io/vue-select/. They'll
|
|
* be moved out of this repo in the very near future to avoid confusion.
|
|
*/
|
|
import vCode from '../Code.vue'
|
|
export default {
|
|
components: {
|
|
vCode
|
|
}
|
|
}
|
|
</script>
|