quasar-utils

0.1.8 • Public • Published

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
  })

Package Sidebar

Install

npm i quasar-utils

Weekly Downloads

0

Version

0.1.8

License

MIT

Last publish

Collaborators

  • vinicius-reis