You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[See demo in CodeSandbox](https://k2910xo07r.codesandbox.io/)
28
+
[See demo in CodeSandbox](https://ppx57r3nnj.codesandbox.io/)
29
29
30
30
## Setup
31
31
@@ -46,6 +46,30 @@ Vue.use(VuetifyDialog, {
46
46
+`context` - the context of your application, such as store, axios, router etc.
47
47
+`property` - the property, which will integrate to Vue. Default is `$dialog`
48
48
49
+
## ♻️ Usage with Nuxt.js
50
+
51
+
Add `vuetify-dialog/nuxt` to modules section of `nuxt.config.js`
52
+
53
+
Module automatically add to dialog nuxt context data, such as router, route, i18n, $axios, etc
54
+
55
+
```js
56
+
{
57
+
modules: [
58
+
// Simple usage
59
+
'vuetify-dialog/nuxt'
60
+
61
+
// Optionally passing options in module configuration
62
+
['vuetify-dialog/nuxt', { property:'$dialog' }]
63
+
],
64
+
65
+
// Optionally passing options in module top level configuration
66
+
vuetifyDialog: {
67
+
property:'$dialog'
68
+
}
69
+
}
70
+
```
71
+
72
+
49
73
### Simple confirm dialog
50
74
```js
51
75
constres=awaitthis.$dialog.confirm({
@@ -78,16 +102,59 @@ let res = await this.$dialog.prompt({
78
102
})
79
103
```
80
104
81
-
### Messages
105
+
106
+
### Notifications
107
+
The notification component is used to convey important information to the user.
108
+
Notification support positioning, removal delay and callbacks. It comes in 4 variations, **success**, **info**, **warning** and **error**. These have default icons assigned which can be changed and represent different actions
- position: one of _top-left_, _top-right_, _bottom-left_, _bootom-right_
119
+
- timeoot: timer to hide message. Default 5000. If set to 0 - message will not closes automatically
120
+
- actions
82
121
```js
83
-
this.$dialog.message.warning('Warning message')
84
-
this.$dialog.message.error('Error message')
85
-
this.$dialog.message.info('Info message')
86
-
this.$dialog.message.success('Success message')
122
+
this.$dialog.notify.info('Test notification', {
123
+
position:'top-right',
124
+
timeout:5000
125
+
})
87
126
```
88
127
128
+
### Toasts
129
+
The toast component is used to display a quick message to a user. Toasts support positioning, removal delay and callbacks. It comes in 4 variations, **success**, **info**, **warning** and **error**. These have default icons assigned which can be changed and represent different actions
0 commit comments