mirror of
https://github.com/Luzifer/browserphone.git
synced 2024-09-18 22:52:57 +00:00
Use enter key to toggle call
This commit is contained in:
parent
d734ea9f3a
commit
e12b0b146a
16
src/app.vue
16
src/app.vue
@ -17,7 +17,15 @@
|
||||
<b-col cols="12" md="6">
|
||||
|
||||
<b-card>
|
||||
<b-form-input size="lg" slot="header" type="tel" class="my-2 number border-info" autofocus v-model="number"></b-form-input>
|
||||
<b-form-input
|
||||
autofocus
|
||||
class="my-2 number border-info"
|
||||
@keypress="evt => keypress(evt)"
|
||||
size="lg"
|
||||
slot="header"
|
||||
type="tel"
|
||||
v-model="number"
|
||||
></b-form-input>
|
||||
|
||||
<b-row>
|
||||
<b-col v-for="key in keys" cols="4" class="text-center mb-3" :key="key">
|
||||
@ -82,6 +90,12 @@ export default {
|
||||
this.number = `${this.number}${key}`
|
||||
},
|
||||
|
||||
keypress(evt) {
|
||||
if (evt.keyCode === 13) {
|
||||
this.toggleCall()
|
||||
}
|
||||
},
|
||||
|
||||
setupPhone() {
|
||||
if (!this.phone.device) {
|
||||
this.phone.device = new Twilio.Device()
|
||||
|
Loading…
Reference in New Issue
Block a user