mirror of
https://github.com/koel/koel
synced 2024-12-23 02:53:20 +00:00
14 lines
250 B
JavaScript
14 lines
250 B
JavaScript
import Vue from 'vue';
|
|
|
|
/**
|
|
* A simple directive to set focus into an input field when it's shown.
|
|
*/
|
|
export default {
|
|
bind (el, { value }) {
|
|
if (!value) {
|
|
return;
|
|
}
|
|
|
|
Vue.nextTick(() => el.focus());
|
|
}
|
|
};
|