2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

refactor, bit cleaner API

This commit is contained in:
Jeff
2019-10-25 18:07:45 -07:00
parent 7c66f75579
commit 74917d2a5a
2 changed files with 57 additions and 28 deletions
+18 -1
View File
@@ -1,7 +1,7 @@
<template>
<div id="app">
<sandbox hide-help v-slot="config">
<v-select v-bind="config" />
<v-select taggable multiple no-drop :map-keydown="handlers"/>
</sandbox>
</div>
</template>
@@ -14,6 +14,23 @@ import Sandbox from '../docs/.vuepress/components/Sandbox';
export default {
components: {Sandbox, vSelect},
methods: {
handlers (map, vm) {
const createTag = e => {
e.preventDefault();
vm.typeAheadSelect();
vm.searchEl.focus();
};
return {
...map,
9: createTag,
13: createTag,
32: createTag,
188: createTag,
};
},
},
};
</script>