Fix for missing Href to Composables pass-through component

This commit is contained in:
hujambo-dunia
2023-05-08 15:12:01 +02:00
committed by davelopez
parent 65bb4e41cc
commit 63df9be693
2 changed files with 10 additions and 9 deletions
+2 -1
View File
@@ -1,9 +1,10 @@
export default {
methods: {
showToast(message, title, variant) {
showToast(message, title, variant, href) {
this.$bvToast.toast(message, {
variant,
title,
href,
toaster: "b-toaster-bottom-right",
append: true,
solid: true,
+8 -8
View File
@@ -17,20 +17,20 @@ export const setToastComponentRef = (newRef: typeof toastRef) => {
* Use 'useToast' for the Composition Api instead.
*/
export const Toast = {
success(message: string, title = "Success") {
toastRef.value?.showToast(message, title, "success");
success(message: string, title = "Success", href = "") {
toastRef.value?.showToast(message, title, "success", href);
},
info(message: string, title = "Info") {
toastRef.value?.showToast(message, title, "info");
info(message: string, title = "Info", href = "") {
toastRef.value?.showToast(message, title, "info", href);
},
warning(message: string, title = "Warning") {
toastRef.value?.showToast(message, title, "warning");
warning(message: string, title = "Warning", href = "") {
toastRef.value?.showToast(message, title, "warning", href);
},
error(message: string, title = "Error") {
toastRef.value?.showToast(message, title, "danger");
error(message: string, title = "Error", href = "") {
toastRef.value?.showToast(message, title, "danger", href);
},
};