From 9044f9e1ff36bc623667bdb1b6ca20e715671f5b Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Thu, 7 Jan 2021 23:58:04 +0100 Subject: [PATCH] testing with vue mixings and components --- cookbook/static/vue/components/Toast.js | 12 ++++++++++++ cookbook/templates/meal_plan.html | 21 ++++++++++----------- 2 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 cookbook/static/vue/components/Toast.js diff --git a/cookbook/static/vue/components/Toast.js b/cookbook/static/vue/components/Toast.js new file mode 100644 index 00000000..449ae652 --- /dev/null +++ b/cookbook/static/vue/components/Toast.js @@ -0,0 +1,12 @@ +let toast_mixin = Vue.mixin({ + methods: { + makeToast: function (title, message, variant = null) { + this.$bvToast.toast(message, { + title: title, + variant: variant, + toaster: 'b-toaster-top-center', + solid: true + }) + } + } +}) \ No newline at end of file diff --git a/cookbook/templates/meal_plan.html b/cookbook/templates/meal_plan.html index 42a18f0f..925fc736 100644 --- a/cookbook/templates/meal_plan.html +++ b/cookbook/templates/meal_plan.html @@ -122,7 +122,8 @@ -
+
[[element.name]] @@ -369,8 +370,11 @@
- + + + +