Skip to content

Using vuetify components inside a custom component "Failed to resolve component" #22

Closed
@Behave81

Description

@Behave81

In my project I have installed and configured vuetify correct and it is working everywhere.
But when I use some vuetity components inside a Toast component I get the error "Failed to resolve component: v-card"

component:

<template>
	<div>
		<v-card title="title"> </v-card>
	</div>
</template>

<script setup lang="ts">
	import { PropType } from "vue";
	import type { ToastOptions } from "vue3-toastify";
	defineProps({
		closeToast: {
			type: Function as PropType<(e?: MouseEvent) => void>,
			required: true,
		},
		toastProps: {
			type: Object as PropType<ToastOptions>,
			required: true,
		},
	});
</script>

<style scoped></style>

call of the custom compnent:

import ToastComponent from "./ToastComponent.vue";

export function failure(message: string, error: any) {
	toast(ToastComponent, {
		closeOnClick: false,
		position: toast.POSITION.BOTTOM_CENTER,
		data: error,
		type: toast.TYPE.ERROR,
		autoClose: false,
	});
}

How can I use vuetify components inside a custom toast component?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions