Make Ameri… erm, koel-focus great again

This commit is contained in:
An Phan 2016-06-25 22:44:39 +08:00
parent a46b278d80
commit ccf93c0890
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2

View file

@ -4,11 +4,11 @@ import Vue from 'vue';
* A simple directive to set focus into an input field when it's shown.
*/
export default {
bind (el, { value }) {
update(el, { value }) {
if (!value) {
return;
}
Vue.nextTick(() => el.focus());
}
},
};