mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-20 03:09:36 +03:00
26 lines
465 B
Vue
26 lines
465 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>
|