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