@dargmuesli/nuxt-vio 1.9.0 → 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- package/nuxt.config.ts +3 -0
- package/package.json +2 -1
- package/utils/modal.ts +16 -0
package/nuxt.config.ts
CHANGED
@@ -44,6 +44,9 @@ export default defineNuxtConfig({
|
|
44
44
|
shim: false,
|
45
45
|
strict: true,
|
46
46
|
tsConfig: {
|
47
|
+
compilerOptions: {
|
48
|
+
esModuleInterop: true,
|
49
|
+
},
|
47
50
|
vueCompilerOptions: {
|
48
51
|
htmlAttributes: [], // https://github.com/johnsoncodehk/volar/issues/1970#issuecomment-1276994634
|
49
52
|
},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.10.1",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -44,6 +44,7 @@
|
|
44
44
|
"@nuxtjs/tailwindcss": "6.6.6",
|
45
45
|
"@tailwindcss/typography": "0.5.9",
|
46
46
|
"nuxt-seo-kit": "1.3.7",
|
47
|
+
"sweetalert2": "11.7.3",
|
47
48
|
"vue-gtag": "2.0.1"
|
48
49
|
},
|
49
50
|
"devDependencies": {
|
package/utils/modal.ts
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
import Swal from 'sweetalert2'
|
2
|
+
|
3
|
+
export const showToast = ({ title }: { title: string }) =>
|
4
|
+
Swal.fire({
|
5
|
+
didOpen: (toast) => {
|
6
|
+
toast.addEventListener('mouseenter', Swal.stopTimer)
|
7
|
+
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
8
|
+
},
|
9
|
+
icon: 'success',
|
10
|
+
position: 'bottom',
|
11
|
+
showConfirmButton: false,
|
12
|
+
timer: 3000,
|
13
|
+
timerProgressBar: true,
|
14
|
+
title,
|
15
|
+
toast: true,
|
16
|
+
})
|