forked from verdnatura/salix-front
perf: improve handleKeyUp method
This commit is contained in:
parent
0ad839dfc6
commit
26c7b09b8a
|
@ -21,11 +21,9 @@ const currentUser = ref(state.getUser());
|
|||
const newNote = ref('');
|
||||
const vnPaginateRef = ref();
|
||||
function handleKeyUp(event) {
|
||||
if (event.key === 'Enter' && event.shiftKey) {
|
||||
event.preventDefault();
|
||||
} else if (event.key === 'Enter') {
|
||||
insert();
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
if (!event.shiftKey) insert();
|
||||
}
|
||||
}
|
||||
async function insert() {
|
||||
|
|
Loading…
Reference in New Issue