mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-10 07:52:23 +03:00
27 lines
439 B
Vue
27 lines
439 B
Vue
<template>
|
|
<v-select
|
|
taggable
|
|
multiple
|
|
no-drop
|
|
:map-keydown="handlers"
|
|
placeholder="enter an email"
|
|
/>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'CustomHandlers',
|
|
methods: {
|
|
handlers: (map, vm) => ({
|
|
...map,
|
|
50: (e) => {
|
|
e.preventDefault()
|
|
if (e.key === '@' && vm.search.length > 0) {
|
|
vm.search = `${vm.search}@gmail.com`
|
|
}
|
|
},
|
|
}),
|
|
},
|
|
}
|
|
</script>
|