npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@jumamiller/vue2-toastr

v1.0.2

Published

vue2 toastr component

Downloads

1

Readme

cxlt-vue2-toastr (中文文档)

cxlt-vue2-toastr is a non-blocking notifications for Vue2 ,Based on toastr stylings and design together with animate.css animation effects

Demo: https://chengxulvtu.github.io/toastr/index.html

Setup

Using npm

npm install cxlt-vue2-toastr --save

Or using yarn

yarn add cxlt-vue2-toastr

Usage

Import Component

import CxltToastr from 'cxlt-vue2-toastr'

Vue.use(CxltToastr)

Optional Global configuration options

var toastrConfigs = {
    position: 'top right',
    showDuration: 2000
}
Vue.use(CxltToastr, toastrConfigs)

You can use All options mentioned in below options table except color option, instead, you should use below additional four color options in global configuration.

| Option | Type | Description | | ------------- |:--------------: | --------------------------:| | successColor | String | background color for success notificatoin | | infoColor | String | background color for info notificatoin | | warningColor | String | background color for warning notificatoin | | errorColor | String | background color for error notificatoin |

Please note: if you pass color option in your notification instance, it will override above global color options.

Import styling files

import 'cxlt-vue2-toastr/dist/css/cxlt-vue2-toastr.css'

Or use it in .vue with style tag

<style src="cxlt-vue2-toastr/dist/css/cxlt-vue2-toastr.css"></style>

Call Notification Instance

this.$toast.success({
    title:'',
    message:''
})

cxlt-vue2-toastr support below functions

| functions | | ------------- | | success | | info | | warn | | error | | removeAll |

You need to pass an option object which can have below values, used for controlling title, content, position etc.

options

| Option | Type | Description | | ------------- |:--------------: | --------------------------:| | title | String | Title for notification | | message | String | Content for notification | | useHtml | Boolean | Allow html-markup in content, default as false | | closeButton | Boolean | Need close button or not, default as false | | progressBar | Boolean | default as false | | type | String | Type for notification,default as success | | position | String | Position for notification,default as top right | | icon | String | Custom Icon | | showMethod | String | Animation class name for shown,default as fadeIn | | hideMethod | String | Animation class name for hide,default as fadeOut | | showDuration | Number | Duration of show animation,unit as ms,default as 1000 | | hideDuration | Number | Duration of hide animation,unit as ms,default as 1000 | | delay | Number | Delay of animation,unit as ms,default as 0, means no delay | | timeOut | Number | Duration of notification displaying,Unit as ms,default as 1500 | | color | String | background color of notification |

type

  • success
  • info
  • warning
  • error

position

  • top right
  • bottom right
  • bottom left
  • top left
  • top center
  • bottom center
  • top full width
  • bottom full width

icon

Any valid image url.

showMethod

  • bounce
  • flash
  • pulse
  • rubberBand
  • shake
  • headShake
  • swing
  • tada
  • wobble
  • jello
  • bounceIn
  • bounceInDown
  • bounceInLeft
  • bounceInRight
  • bounceInUp
  • fadeIn
  • fadeInDown
  • fadeInDownBig
  • fadeInLeft
  • fadeInLeftBig
  • fadeInRight
  • fadeInRightBig
  • fadeInUp
  • fadeInUpBig
  • flipInX
  • flipInY
  • lightSpeedIn
  • lightSpeedOut
  • rotateIn
  • rotateInDownLeft
  • rotateInDownRight
  • rotateInUpLeft
  • rotateInUpRight
  • hinge
  • rollIn
  • zoomIn
  • zoomInDown
  • zoomInLeft
  • zoomInRight
  • zoomInUp
  • slideInDown
  • slideInLeft
  • slideInRight
  • slideInUp

hideMethod

  • bounce
  • flash
  • pulse
  • rubberBand
  • shake
  • headShake
  • swing
  • tada
  • wobble
  • jello
  • bounceOut
  • bounceOutDown
  • bounceOutLeft
  • bounceOutRight
  • bounceOutUp
  • fadeOut
  • fadeOutDown
  • fadeOutDownBig
  • fadeOutLeft
  • fadeOutLeftBig
  • fadeOutRight
  • fadeOutRightBig
  • fadeOutUp
  • fadeOutUpBig
  • flipOutX
  • flipOutY
  • rotateOut
  • rotateOutDownLeft
  • rotateOutDownRight
  • rotateOutUpLeft
  • rotateOutUpRight
  • rollOut
  • zoomOut
  • zoomOutDown
  • zoomOutLeft
  • zoomOutRight
  • zoomOutUp
  • slideOutDown
  • slideOutLeft
  • slideOutRight
  • slideOutUp

Demo

https://chengxulvtu.github.io/toastr/index.html

Demo截图

Run this project

fork the repository,then follow below commands

git clone xxx
cd cxlt-vue2-toastr
yarn
npm run dev

Update History

2017-11-09 Custom Icon.

Welcome to follow my wechat

Please note, you will need wechat app to follow. for oversea users, you may just follow my github.

Donate

BTC: 31wAperpMdHeiy4G8ygoREFDM8hyodabfr

ETH: 0x5d127646887be9adb74efa1e472fa47ce50a50cb

EOS: bobtian31223