Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wish to use this in Nuxt3, typescript, composition API #61

Open
MicroDreamIT opened this issue Jun 17, 2023 · 0 comments
Open

wish to use this in Nuxt3, typescript, composition API #61

MicroDreamIT opened this issue Jun 17, 2023 · 0 comments

Comments

@MicroDreamIT
Copy link

MicroDreamIT commented Jun 17, 2023

here is code i am using

<template>
    <div class="container mx-auto">
        <div class="grid grid-cols-12 gap-1">
            <div class="col-span-4">
                <div class="flex flex-col">
                    <div class="flex">
                        <Icon name="et:alarmclock" class="mr-2" color="red" size="24px"/>
                        <p>{{$dayjs(eventDetail.event_date_start).format('dddd MMM YYYY')}}</p>
                    </div>
                </div>
            </div>
            <div class="col-span-8">
                <AddToCalendar
                        name="Title"
                        options="'Apple','Google'"
                        location="World Wide Web"
                        startDate="2023-06-09"
                        endDate="2023-06-09"
                        startTime="10:15"
                        endTime="23:30"
                        timeZone="America/Los_Angeles"
                ></AddToCalendar>
            </div>
        </div>
    </div>
</template>

<script lang="ts" setup>

    import AddToCalendar from 'vue-add-to-calendar';
    
    const route = useRoute();
    const id = (route.params.id).split('-')[0];
    const {data: eventDetail} = await useFetch('http://localhost:8000/api/events/' + id)

</script>

<style scoped>

</style>

but no luck its saying

chunk-3Q27KRJ5.js:97 [Vue warn]: Component is missing template or render function. 
  at <Anonymous name="Title" options="'Apple','Google'" location="World Wide Web"  ... > 
  at <[id] onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouteProvider key="/events/34-detail-east-pm-usually-else()" routeProps= {Component: {…}, route: {…}} pageKey="/events/34-detail-east-pm-usually-else()"  ... > 
  at <RouterView name=undefined route=undefined > 
  at <NuxtPage> 
  at <Default > 
  at <LayoutLoader key="default" name="default" hasTransition=false > 
  at <NuxtLayout> 
  at <App key=3 > 
  at <NuxtRoot>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant