No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. GastroGeek
    G
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Best 0
    • Groups 0

    GastroGeek

    @GastroGeek

    0
    Reputation
    129
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    GastroGeek Follow

    Latest posts made by GastroGeek

    • RE: Global config for quasar plugin like notify

      @trongdong

      I have a custom plugin which basically wraps the Notify plugin with some custom config…

      import {
        Notify
      } from 'quasar'
      
      let defaults = {
        color: 'white',
        textColor: 'black',
        timeout: 2000,
        position: 'top'
      }
      
      let notifyInstance = (options) => {
        if (typeof options !== 'object') {
          options = Object.assign({}, defaults, { message: options })
        }
      
        let optionsToUse = Object.assign({}, defaults, options)
      
        return Notify.create(optionsToUse)
      }
      
      export default ({ Vue }) => {
        Vue.prototype.$notify = notifyInstance
      }
      
      export {
        // for use outside components
        notifyInstance as Notify
      }
      
      posted in Framework
      G
      GastroGeek