quasar-utils

Quasar Utils and Helpers


Keywords
vue, quasar, quasar-framework, vuejs
License
MIT
Install
npm install quasar-utils@0.1.8

Documentation

Quasar Utils

Quasar Utils and Helpers

Setup

yarn add quasar-utils # or npm install quasar-utils --save
import QuasarUtils from 'quasar-utils'


//

Vue.use(QuasarUtils)

Plugins

A collection of helpers to facilitate access to some quasar features

Dialogs

Adds this.$dialogs to components instances

/**
 * @param {String} title
 * @param {String} message
 *
 * @returns Promise<void>
 */
.confirm(title, message)

/**
 * @param {String} title
 * @param {String} message
 *
 * @returns Promise<void>
 */
.info(title, message)

/**
 * @param  {String} title
 * @param  {String} message
 * @param  {Object} options {type='textbox', model: '', label: ''}
 *
 * @return {Object}         { model: {String} }
 */
.prompt(title, message, { type = 'textbox', label, model = '' })

Exemple:

this.$dialogs.confirm('Alert', 'This action can not be undone')
  .then(() => {
    // do action
  })
  .catch (() => {
    // don't do action
  })