Merge pull request #2568 from lison16/modal
add closable props for $Modal https://github.com/iview/iview/issues/2362
This commit is contained in:
commit
abb2cae6da
2 changed files with 16 additions and 2 deletions
|
@ -22,7 +22,8 @@ Modal.newInstance = properties => {
|
|||
showCancel: false,
|
||||
loading: false,
|
||||
buttonLoading: false,
|
||||
scrollable: false
|
||||
scrollable: false,
|
||||
closable: true
|
||||
}),
|
||||
render (h) {
|
||||
let footerVNodes = [];
|
||||
|
@ -80,7 +81,8 @@ Modal.newInstance = properties => {
|
|||
return h(Modal, {
|
||||
props: Object.assign({}, _props, {
|
||||
width: this.width,
|
||||
scrollable: this.scrollable
|
||||
scrollable: this.scrollable,
|
||||
closable: this.closable
|
||||
}),
|
||||
domProps: {
|
||||
value: this.visible
|
||||
|
@ -210,6 +212,10 @@ Modal.newInstance = properties => {
|
|||
modal.$parent.width = props.width;
|
||||
}
|
||||
|
||||
if ('closable' in props) {
|
||||
modal.$parent.closable = props.closable;
|
||||
}
|
||||
|
||||
if ('title' in props) {
|
||||
modal.$parent.title = props.title;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue