|
7 | 7 |
|
8 | 8 | ## Installation
|
9 | 9 |
|
10 |
| -Todo:: publish plugin |
| 10 | +**Todo:: publish plugin** |
11 | 11 |
|
12 |
| -## Basic Usage |
13 | 12 | ```javascript
|
14 |
| -// Parameters |
15 |
| - |
16 |
| -let message = "Are you sure?"; |
17 |
| - |
18 |
| -let options = { |
19 |
| - html: false, // set to true if your message contains HTML tags. eg: "Delete <b>Foo</b> ?" |
20 |
| - loader: false, // set to true if you want the dailog to show a loader after click on "proceed" |
21 |
| - type: 'simple', // coming soon: 'soft', 'hard' |
22 |
| - verification: 'continue', // for hard confirm, user will be prompted to type this to enable the proceed button |
23 |
| - clicks: 3, // for soft confirm, user will be asked to click on "proceed" btn 3 times before actually proceeding |
24 |
| -}; |
25 |
| - |
26 |
| -vm.$dialog.confirm(message, options) |
27 |
| - .then(function () { |
28 |
| - // This will be triggered when user clicks on proceed |
29 |
| - }) |
30 |
| - .catch(function () { |
31 |
| - // This will be triggered when user clicks on cancel |
32 |
| - }); |
| 13 | +import Vue from "vue" |
| 14 | +import VuejsDialog from "fill in this space after publishing" // Todo:: Publish plugin |
| 15 | +Vue.use(VuejsDialog) |
33 | 16 | ```
|
34 | 17 |
|
| 18 | +## Basic Usage |
| 19 | + |
35 | 20 | ```javascript
|
36 | 21 | // Anywhere in your Vuejs App.
|
37 | 22 |
|
@@ -73,3 +58,25 @@ vm.$dialog.confirm("If you delete this record, it'll be gone forever.", {
|
73 | 58 | console.log('Delete aborted');
|
74 | 59 | });
|
75 | 60 | ```
|
| 61 | + |
| 62 | +```javascript |
| 63 | +// Parameters and options |
| 64 | + |
| 65 | +let message = "Are you sure?"; |
| 66 | + |
| 67 | +let options = { |
| 68 | + html: false, // set to true if your message contains HTML tags. eg: "Delete <b>Foo</b> ?" |
| 69 | + loader: false, // set to true if you want the dailog to show a loader after click on "proceed" |
| 70 | + type: 'simple', // coming soon: 'soft', 'hard' |
| 71 | + verification: 'continue', // for hard confirm, user will be prompted to type this to enable the proceed button |
| 72 | + clicks: 3, // for soft confirm, user will be asked to click on "proceed" btn 3 times before actually proceeding |
| 73 | +}; |
| 74 | + |
| 75 | +vm.$dialog.confirm(message, options) |
| 76 | + .then(function () { |
| 77 | + // This will be triggered when user clicks on proceed |
| 78 | + }) |
| 79 | + .catch(function () { |
| 80 | + // This will be triggered when user clicks on cancel |
| 81 | + }); |
| 82 | +``` |
0 commit comments