ankurk91 / vue-toast-notification

Yet another toast notification plugin for Vue.js :tulip:

Home Page:https://ankurk91.github.io/vue-toast-notification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

To push dynamic data in message attribute

at-the-vr opened this issue · comments

I'm submitting a (check one with "x")

  • (Feature request)

Tell about your platform

  • Vue.js version : 3.2.37
  • Browser name and version : Chrome
  • This package version : 3.0.4

Current behavior

I wanted to know if we can pass a data variable in the message attribute for example -

this.$toast.open({
        :message: "dynamicVariable",
        type: "success",
        duration: 3000,
        dismissible: true,
        position: "top-right",
      })

so as to make it bit dynamic in nature. Statically it works like a charm, really smooth to establish.

Yes, you can,

Please go and learn some basic JS concepts.

can i ask how to send the data variable in the message attribute, a rough idea can also help

I really don't understand what you are asking for. i am sorry but i dont have time to teach JS on GitHub.

this.$toast.info(ANY_VARIABLE_THAT_HAS_STRING_VALUE);

I can repeat myself (no issue with that), I want to use your this.$toast.open method with the message attribute set to a variable, there is an example on the top ( i know its wrong) but still Is there a way to turn the message attribute to accept Variables instead of plain strings.
I did used the $toast.info and found it less useful than the $toast.open method with the events occuring, I am not asking you for some JS concept that i managed to miss.