diff --git a/nuxt.config.ts b/nuxt.config.ts index 2a6c938..b9d7ee9 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -26,7 +26,6 @@ export default defineNuxtConfig({ manifest: true, ssrManifest: true, sourcemap: true, - rollupOptions: { output: { sourcemap: true } }, }, css: { devSourcemap: true }, diff --git a/src/components/Accordion.vue b/src/components/Accordion.vue index 5c9dec4..c01b9cf 100644 --- a/src/components/Accordion.vue +++ b/src/components/Accordion.vue @@ -12,27 +12,38 @@ const { color = '', size = 'lg', title, - modelValue = false, + modelValue: initialOpen = false, } = defineProps() + +// eslint-disable-next-line func-call-spacing +const emit = defineEmits<{ + (e: 'update:modelValue', value: boolean): void +}>() + +const open = ref(initialOpen) + +watch(open, (val) => { + emit('update:modelValue', val) +})