forked from platypush/platypush
[UI] Listen for keyup, keydown and touch events on NameEditor.
This commit is contained in:
parent
4e5c740908
commit
44e319e7ca
1 changed files with 8 additions and 3 deletions
|
@ -1,10 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<form @submit.prevent="submit" class="name-editor">
|
<form @submit.prevent="submit" class="name-editor">
|
||||||
<input type="text" v-model="text" :disabled="disabled" ref="input">
|
<input type="text"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="text"
|
||||||
|
@keydown="proxy"
|
||||||
|
@keyup="proxy"
|
||||||
|
ref="input">
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
<i class="fas fa-circle-check" />
|
<i class="fas fa-circle-check" />
|
||||||
</button>
|
</button>
|
||||||
<button class="cancel" @click="$emit('cancel')" @touch="$emit('cancel')">
|
<button class="cancel" @click="$emit('cancel')">
|
||||||
<i class="fas fa-ban" />
|
<i class="fas fa-ban" />
|
||||||
</button>
|
</button>
|
||||||
<slot />
|
<slot />
|
||||||
|
@ -13,7 +18,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
emits: ['input', 'cancel'],
|
emits: ['input', 'cancel', 'keyup', 'keydown'],
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
Loading…
Reference in a new issue