14.03 Custom Directive - Make it Global!

This commit is contained in:
Fredrick W Warren committed 2021-02-11 09:36:16 -08:00
1 parent 3057951d6a
commit e2f0100f36
3 files changed
+20 -13

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
export const selectAll = {
inserted (el) {
const input = el.querySelector('.q-field__native')
input.addEventListener('focus', () => {
if (input.value.length) {
input.select()
}
})
}
}