Skip to content

Commit 4c4c081

Browse files
committed
Update readMe
1 parent caf1c1d commit 4c4c081

File tree

1 file changed

+28
-21
lines changed

1 file changed

+28
-21
lines changed

README.md

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,16 @@
77

88
## Installation
99

10-
Todo:: publish plugin
10+
**Todo:: publish plugin**
1111

12-
## Basic Usage
1312
```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)
3316
```
3417

18+
## Basic Usage
19+
3520
```javascript
3621
// Anywhere in your Vuejs App.
3722

@@ -73,3 +58,25 @@ vm.$dialog.confirm("If you delete this record, it'll be gone forever.", {
7358
console.log('Delete aborted');
7459
});
7560
```
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

Comments
 (0)