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