Skip to content

Commit f9e9833

Browse files
committed
update
1 parent 77c5931 commit f9e9833

File tree

2 files changed

+95
-1
lines changed

2 files changed

+95
-1
lines changed

README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,97 @@ Bootstrap style modal component for vue.
55
doc writing...
66

77
<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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-bootstrap-modal",
33
"description": "Bootstrap Style Modal for Vue",
4-
"version": "0.1.3",
4+
"version": "0.1.4",
55
"author": "coffce",
66
"main": "./src/modal.vue"
77
}

0 commit comments

Comments
 (0)