Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Coffcer committed Mar 17, 2016
1 parent 77c5931 commit f9e9833
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 1 deletion.
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,97 @@ Bootstrap style modal component for vue.
doc writing...

<img src="https://github.com/Coffcer/vue-bootstrap-modal/blob/master/modal.gif">

# Usage

import Bootstrap.css
```
<link href="bootstrap.css"></link>
```

simple options:
``` html
<!--text content-->
<modal title="Modal Title" @ok="ok" @cancel="cancel" :show.sync="show">
Modal Text
</modal>

<!--custom content-->
<modal title="Modal Title" @ok="ok" @cancel="cancel" :show.sync="show">
<p>Modal Body1</p>
<div>Modal Body2</div>

<p slot="header">Modal Header</p>
<p slot="title">Modal Title</p>
<p slot="footer">Modal Footer</p>
</modal>

```

#Props
``` javascript
props: {
show: {
type: Boolean,
twoWay: true,
default: false
},
title: {
type: String,
default: 'Modal'
},
// Bootstrap small style modal
small: {
type: Boolean,
default: false
},
// Bootstrap large style modal
large: {
type: Boolean,
default: false
},
// Bootstrap full style modal
full: {
type: Boolean,
default: false
},
// if it set false, click background will close modal
force: {
type: Boolean,
default: false
},
// vue transition name
transition: {
type: String,
default: 'modal'
},
// [OK button] text
okText: {
type: String,
default: 'OK'
},
// [Cancel button] text
cancelText: {
type: String,
default: 'Cancel'
},
// [OK button] className
okClass: {
type: String,
default: 'btn blue'
},
// [Cancel button] className
cancelClass: {
type: String,
default: 'btn red btn-outline'
},
// automatically close when click [OK button]
closeWhenOK: {
type: Boolean,
default: false
}
}
```

# License
MIT
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-bootstrap-modal",
"description": "Bootstrap Style Modal for Vue",
"version": "0.1.3",
"version": "0.1.4",
"author": "coffce",
"main": "./src/modal.vue"
}

0 comments on commit f9e9833

Please sign in to comment.