mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
feat: allow triggering checkbox with Space
This commit is contained in:
parent
e1f05805be
commit
ec4c65130c
1 changed files with 4 additions and 1 deletions
|
@ -1,8 +1,11 @@
|
|||
<template>
|
||||
<span
|
||||
class="relative align-bottom inline-block w-[32px] h-[20px] bg-gray-300 rounded-full shadow-inner cursor-pointer transition-all duration-200 ease-in-out mr-2
|
||||
class="relative align-bottom inline-block w-[32px] h-[20px] bg-gray-500 rounded-full shadow-inner cursor-pointer transition-all duration-200 ease-in-out mr-2
|
||||
after:h-[16px] after:aspect-square after:absolute after:bg-white after:top-[2px] after:left-[2px] after:rounded-full after:transition-left after:duration-200 after:ease-in-out
|
||||
has-[:checked]:bg-k-highlight has-[:checked]:after:left-[14px]"
|
||||
tabindex="0"
|
||||
role="checkbox"
|
||||
@keydown.space="value = !value"
|
||||
>
|
||||
<input v-model="value" :checked="value" class="hidden" type="checkbox" v-bind="$attrs">
|
||||
</span>
|
||||
|
|
Loading…
Reference in a new issue