Skip to content

Commit

Permalink
This commit close #60
Browse files Browse the repository at this point in the history
  • Loading branch information
Алексей Пивкин committed Jul 1, 2019
1 parent 1837dab commit da55499
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 23 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v2.1.1 (01/07/2019)

#### Bug Fixes:

- [#60](https://github.com/avil13/vue-sweetalert2/issues/60) Custom Styles not working after update

---

## v2.1.0 (26/06/2019)

#### Bug Fixes:
Expand All @@ -10,8 +18,4 @@
- [#57](https://github.com/avil13/vue-sweetalert2/issues/57) showLoading
- [#58](https://github.com/avil13/vue-sweetalert2/issues/58) Close sweetalert

#### Enhancements:

- [#60](https://github.com/avil13/vue-sweetalert2/issues/60) Custom Styles not working after update

---
1 change: 0 additions & 1 deletion example/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default class AppComponent extends Vue {
simple() {
this.$swal('Hello world!');
debugger;
}
// /*
success() {
Expand Down
10 changes: 1 addition & 9 deletions example/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@ import App from './App.vue';

import VueSweetalert2 from './vue-sweetalert2';

Vue.use(VueSweetalert2, {
// options
buttonsStyling: false,
animation: false,
customClass: {
confirmButton: 'btn btn-primary',
cancelButton: 'btn btn-warning',
}
});
Vue.use(VueSweetalert2);

new Vue({
el: '#app',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-sweetalert2",
"version": "2.1.0",
"version": "2.1.1",
"description": "Simple Vue sweetalert2 package",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
13 changes: 5 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ interface VueSweetalert2Options extends SweetAlertOptions {

class VueSweetalert2 {
static install(vue: Vue | any, options?: VueSweetalert2Options): void {
options = {
...(options || {})
};

// const _swal = options ? Swal.mixin(options).fire.bind(Swal) : Swal.fire.bind(Swal);
const _swal = (...args: [SweetAlertOptions]) => {
return options
? Swal.mixin(options).fire.apply(Swal, args)
: Swal.fire.apply(Swal, args);
if (options) {
const mixed = Swal.mixin(options);
return mixed.fire.apply(mixed, args);
}
return Swal.fire.apply(Swal, args);
};

for (let k in Swal) {
Expand Down

0 comments on commit da55499

Please sign in to comment.