Skip to content

Commit a072ad9

Browse files
authored
Merge pull request #1110 from ayrtonandino/fix-vite-warning
fix: vite warning in console
2 parents 61ec674 + e63676a commit a072ad9

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
],
2424
"exports": {
2525
".": {
26+
"types": "./index.d.ts",
2627
"import": "./dist/vue-datepicker.js",
27-
"require": "./dist/vue-datepicker.umd.cjs",
28-
"types": "./index.d.ts"
28+
"require": "./dist/vue-datepicker.umd.cjs"
2929
},
3030
"./dist/main.css": {
3131
"import": "./dist/main.css",

src/VueDatePicker/components/Common/ArrowBtn.vue

+8-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
tabindex="0"
88
:aria-label="ariaLabel"
99
: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)"
1212
>
1313
<span class="dp__inner_nav" :class="{ dp__inner_nav_disabled: disabled }">
1414
<slot />
@@ -17,7 +17,7 @@
1717
</template>
1818

1919
<script lang="ts" setup>
20-
import { onMounted, ref } from 'vue';
20+
import { onMounted, ref, type Ref } from 'vue';
2121
import { checkKeyDown } from '@/utils/util';
2222
2323
defineOptions({
@@ -26,7 +26,10 @@
2626
},
2727
});
2828
29-
const emit = defineEmits(['activate', 'set-ref']);
29+
const emit = defineEmits<{
30+
'activate': []
31+
'set-ref': [i: Ref<HTMLElement | null>]
32+
}>();
3033
3134
defineProps<{
3235
ariaLabel?: string;
@@ -36,5 +39,5 @@
3639
3740
const elRef = ref<HTMLElement | null>(null);
3841
39-
onMounted(() => emit('set-ref', elRef));
42+
onMounted(() => emit('set-ref', elRef)); // eslint-disable-line vue/no-ref-as-operand
4043
</script>

0 commit comments

Comments
 (0)