All Projects → lishengzxc → vue-sweetalert

lishengzxc / vue-sweetalert

Licence: MIT License
SweetAlert - The demo of how to make a Vue plugin

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

vue-sweetalert

The demo of how to make a Vue plugin -- sweetalert

npm npm npm

if you want to learn more about sweetalert2's api, please goto its homepage https://github.com/limonte/sweetalert2

Why to depend on sweetalert2

The original SweetAlert plugin is currently unsupported, there's SweetAlert2. Consider to base your plugin on it.
Migration guide: https://github.com/limonte/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2

Install

npm install vue-sweetalert --save

API

this.$swal(...)

Usage

html

<body>
  <button v-on:click="clickHandler">swal</button>
  ...
</body>

js

import Vue from 'vue'
import VueSweetAlert from 'vue-sweetalert'

Vue.use(VueSweetAlert)

new Vue({
  el: 'body',
  methods: {
    clickHandler() {
      this.$swal('hello')
    }
  }
})

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].