File tree Expand file tree Collapse file tree 2 files changed +95
-1
lines changed Expand file tree Collapse file tree 2 files changed +95
-1
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,97 @@ Bootstrap style modal component for vue.
5
5
doc writing...
6
6
7
7
<img src =" https://github.com/Coffcer/vue-bootstrap-modal/blob/master/modal.gif " >
8
+
9
+ # Usage
10
+
11
+ import Bootstrap.css
12
+ ```
13
+ <link href="bootstrap.css"></link>
14
+ ```
15
+
16
+ simple options:
17
+ ``` html
18
+ <!-- text content-->
19
+ <modal title =" Modal Title" @ok =" ok" @cancel =" cancel" :show.sync =" show" >
20
+ Modal Text
21
+ </modal >
22
+
23
+ <!-- custom content-->
24
+ <modal title =" Modal Title" @ok =" ok" @cancel =" cancel" :show.sync =" show" >
25
+ <p >Modal Body1</p >
26
+ <div >Modal Body2</div >
27
+
28
+ <p slot =" header" >Modal Header</p >
29
+ <p slot =" title" >Modal Title</p >
30
+ <p slot =" footer" >Modal Footer</p >
31
+ </modal >
32
+
33
+ ```
34
+
35
+ #Props
36
+ ``` javascript
37
+ props: {
38
+ show: {
39
+ type: Boolean ,
40
+ twoWay: true ,
41
+ default: false
42
+ },
43
+ title: {
44
+ type: String ,
45
+ default: ' Modal'
46
+ },
47
+ // Bootstrap small style modal
48
+ small: {
49
+ type: Boolean ,
50
+ default: false
51
+ },
52
+ // Bootstrap large style modal
53
+ large: {
54
+ type: Boolean ,
55
+ default: false
56
+ },
57
+ // Bootstrap full style modal
58
+ full: {
59
+ type: Boolean ,
60
+ default: false
61
+ },
62
+ // if it set false, click background will close modal
63
+ force: {
64
+ type: Boolean ,
65
+ default: false
66
+ },
67
+ // vue transition name
68
+ transition: {
69
+ type: String ,
70
+ default: ' modal'
71
+ },
72
+ // [OK button] text
73
+ okText: {
74
+ type: String ,
75
+ default: ' OK'
76
+ },
77
+ // [Cancel button] text
78
+ cancelText: {
79
+ type: String ,
80
+ default: ' Cancel'
81
+ },
82
+ // [OK button] className
83
+ okClass: {
84
+ type: String ,
85
+ default: ' btn blue'
86
+ },
87
+ // [Cancel button] className
88
+ cancelClass: {
89
+ type: String ,
90
+ default: ' btn red btn-outline'
91
+ },
92
+ // automatically close when click [OK button]
93
+ closeWhenOK: {
94
+ type: Boolean ,
95
+ default: false
96
+ }
97
+ }
98
+ ```
99
+
100
+ # License
101
+ MIT
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-bootstrap-modal" ,
3
3
"description" : " Bootstrap Style Modal for Vue" ,
4
- "version" : " 0.1.3 " ,
4
+ "version" : " 0.1.4 " ,
5
5
"author" : " coffce" ,
6
6
"main" : " ./src/modal.vue"
7
7
}
You can’t perform that action at this time.
0 commit comments