File tree 1 file changed +8
-5
lines changed
src/VueDatePicker/components/Common
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 7
7
tabindex =" 0"
8
8
:aria-label =" ariaLabel"
9
9
:aria-disabled =" disabled || undefined"
10
- @click =" $ emit('activate')"
11
- @keydown =" checkKeyDown($event, () => $ emit('activate'), true)"
10
+ @click =" emit('activate')"
11
+ @keydown =" checkKeyDown($event, () => emit('activate'), true)"
12
12
>
13
13
<span class =" dp__inner_nav" :class =" { dp__inner_nav_disabled: disabled }" >
14
14
<slot />
17
17
</template >
18
18
19
19
<script lang="ts" setup>
20
- import { onMounted , ref } from ' vue' ;
20
+ import { onMounted , ref , type Ref } from ' vue' ;
21
21
import { checkKeyDown } from ' @/utils/util' ;
22
22
23
23
defineOptions ({
26
26
},
27
27
});
28
28
29
- const emit = defineEmits ([' activate' , ' set-ref' ]);
29
+ const emit = defineEmits <{
30
+ ' activate' : []
31
+ ' set-ref' : [i : Ref <HTMLElement | null >]
32
+ }>();
30
33
31
34
defineProps <{
32
35
ariaLabel? : string ;
36
39
37
40
const elRef = ref <HTMLElement | null >(null );
38
41
39
- onMounted (() => emit (' set-ref' , elRef . value ));
42
+ onMounted (() => emit (' set-ref' , elRef )); // eslint-disable-line vue/no-ref-as-operand
40
43
</script >
You can’t perform that action at this time.
0 commit comments