Updatinguserstatus',html:'< h5style="color:#0c5460">Wait... The rewritten title is: SweetAlert2: "onBeforeOpen" parameters are unknown-PHP Chinese Network Q&A
The rewritten title is: SweetAlert2: "onBeforeOpen" parameters are unknown
P粉709644700
P粉709644700 2023-11-10 09:39:01
0
1
663

I'm using Laravel 5.8 and Sweetalert v2 and I'm trying to trigger this alert on Blade with it:

Swal.fire({ title: '

Updating user status

', html: '
Wait...
', width: 400, padding: '1em', background: '#fff url(/images/cream_pixels.png)', timer: 1000, onBeforeOpen: () => { Swal.showLoading() }, });

It pops up correctly but doesn't show the loader and shows me this error on the console:

SweetAlert2: Unknown parameter "onBeforeOpen"

So what’s the problem here?

P粉709644700
P粉709644700

reply all (1)
P粉676821490

UsingdidOpen: Runs asynchronously after the popup is shown on the screen. Provide popup DOM element as parameter

Swal.fire({ didOpen: () => { Swal.showLoading(); } })
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!