[Client] Improve usability

Resolve #4094
This commit is contained in:
syuilo 2019-02-02 22:59:11 +09:00
parent 2a50997a75
commit 4ea7e711ce
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 7 additions and 1 deletions

View File

@ -3,7 +3,7 @@
<ui-card>
<div slot="title"><fa :icon="faTerminal"/> {{ $t('operation') }}</div>
<section class="fit-top">
<ui-input class="target" v-model="target" type="text">
<ui-input class="target" v-model="target" type="text" @enter="showUser">
<span>{{ $t('username-or-userid') }}</span>
</ui-input>
<ui-button @click="showUser"><fa :icon="faSearch"/> {{ $t('lookup') }}</ui-button>

View File

@ -184,6 +184,12 @@ export default Vue.extend({
}
}
});
this.$on('keydown', (e: KeyboardEvent) => {
if (e.code == 'Enter') {
this.$emit('enter');
}
});
},
methods: {
focus() {