@gurinder/vue-flash
### Usage
Last updated 8 months ago by gurinder .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @gurinder/vue-flash 
SYNC missed versions from official npm registry.

@gurinder/vue-flash

Usage

// If you using Laravel Blade
// Add Flash level to master
@php
	
	$flashLevel = session('error') ? 'error' : 'success';
	$flashLevel = session('warning') ? 'warning' : $flashLevel;
	$flashLevel = session('info') ? 'info' : $flashLevel;

	$flashMessage = session('error') ? session('error') : session('success');
	$flashMessage = session('warning') ? session('warning') : $flashMessage;
	$flashMessage = session('info') ? session('info') : $flashMessage;

@endphp
// Dependancy
import Event from '@gurinder/vue-eventy';
window.Event = new Event();

// Register Flash
import flash from '@gurnder-vue-flash';
Vue.component('vue-flash', flash);
window.flash = (message, level = 'success', timeout = 3000) => window.Event.fire('flash', {message, level, timeout});

<vue-flash data-level="success" data-message="message"></vue-flash>

Current Tags

  • 1.0.5                                ...           latest (8 months ago)

6 Versions

  • 1.0.5                                ...           8 months ago
  • 1.0.4                                ...           8 months ago
  • 1.0.3                                ...           8 months ago
  • 1.0.2                                ...           8 months ago
  • 1.0.1                                ...           8 months ago
  • 1.0.0                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 6
This Month 6
Last Day 0
Last Week 0
Last Month 19
Dependencies (1)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |