Comments (11)
Upgrade to v2.1.0 don't solves the problem. I install vue-sweetalert2
with options defined in sweetalert2
v8.x from here sweetalert2.github.io/#configuration:
Vue.use(VueSweetalert2, {
buttonsStyling: false,
customClass: {
confirmButton: 'btn btn-primary',
cancelButton: 'btn btn-warning',
}
})
from vue-sweetalert2.
Works for me now in v2.1.1 . --Thanks @avil13 !
from vue-sweetalert2.
I just setup this in my project, and it works fine, but I am also not able to alter anything by passing in the options. Not sure if it needs something else or if it is just broken right now.
from vue-sweetalert2.
@jordanboston Yes, that is the issue here. Unable to use options.
from vue-sweetalert2.
Same for me,
Vue.use(VueSweetalert2, {
cancelButtonText: "Annuler"
});
But the cancel button still is "Cancel".
Is it a bug from last version ?
from vue-sweetalert2.
I have the same problem! @avil13 any idea how to solve this bug? Here the commit that changes the behavior: ecf942c
from vue-sweetalert2.
Waiting a correction, you can do like :
window.Swal = require('sweetalert2/dist/sweetalert2.js'); // Without CSS (add it one your sass build)
Vue.use({
install(Vue, options) {
let mySwal = Swal.mixin({
cancelButtonText: "Annuler",
showCancelButton: true
});
Vue.prototype.$swal = mySwal.fire.bind(mySwal);
}
});
from vue-sweetalert2.
I'm wondering if this was a bug and if there is a solid fix for it, since I have not been able to set styles the way the documentation shows to? Any news on this?
from vue-sweetalert2.
Sorry. How do you connect styles? Today I removed this option, and now it is necessary to connect the individual import
from vue-sweetalert2.
Like this:
const alertOptions = {
confirmButtonText: 'Confirm',
confirmButtonColor: '#4BAECC',
cancelButtonColor: '#fde06e'
}
// Plugin installation
Vue.use(VueSweetalert2, alertOptions)
I just import and use the plugin, I don't have anything else that is special for style setup. Do I need to?
from vue-sweetalert2.
Need a debug sweetalert library. Now in version v2.1.0 Vue-sweetalert2 this should work. I am again far from the computer, but thanks I need reopen issue
from vue-sweetalert2.
Related Issues (20)
- Example for using Sweetalert2 In Vue3: Composition API HOT 6
- How can i use this in vue 4 at global? HOT 1
- Show Loading not working when installing with options HOT 4
- Background color change nuxtjs HOT 2
- How is the best method to updating Swal in Laravel Project? HOT 2
- [Nuxt] Support top level option HOT 2
- Module display flex instead of grid HOT 9
- No release for v5.0.0, 5.0.1 and 5.0.2 on Github HOT 4
- Wrong CSS HOT 4
- Is this compatible with Nuxt3? HOT 2
- Vue3,在 setup 中无法使用,希望可以兼容一下 Vue3 的新语法 HOT 4
- Style not applied in Nuxtjs 2 HOT 6
- Inertiajs: Cannot read properties of undefined (reading '$swal') HOT 4
- How to use in setup method? HOT 1
- Security issue on SweetAlert2 HOT 5
- When installing package its output : ERROR Cannot restart nuxt: Cannot read properties of undefined (reading 'sweetalert') HOT 10
- ERROR Cannot restart nuxt: Cannot read properties of undefined (reading 'sweetalert') HOT 2
- Emit not being triggered within sweetalert once deployed HOT 1
- Does not work on devices running iOS 15 lower
- this.$swal not work in VueJS 3 (script setup) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-sweetalert2.