Last active
May 13, 2018 02:32
-
-
Save wataruoguchi/a6faa41ab971584c50216db9e8853807 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| <vue-multiselect | |
| v-model="selected" | |
| :multiple="true" | |
| :options="options" | |
| track-by="name" | |
| :custom-label="title"> | |
| </vue-multiselect> | |
| </div> | |
| </template> | |
| <script> | |
| import VueMultiselect from 'vue-multiselect' | |
| export default { | |
| components: { | |
| VueMultiselect: VueMultiselect | |
| }, | |
| data: function() { | |
| return { | |
| selected: [] | |
| }; | |
| }, | |
| props: { | |
| labels: { | |
| type: Object | |
| } | |
| }, | |
| methods: { | |
| title: function(option) { | |
| return option.title; | |
| } | |
| } | |
| } | |
| </script> | |
| <style src="vue-multiselect/dist/vue-multiselect.min.css"></style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment