This commit is contained in:
yison 2019-03-21 12:20:16 +08:00
parent d81146f7be
commit df6d151153

View file

@ -24,7 +24,7 @@ Modal.newInstance = properties => {
buttonLoading: false, buttonLoading: false,
scrollable: false, scrollable: false,
closable: false, closable: false,
autoClose: false autoClose: true
}), }),
render (h) { render (h) {
let footerVNodes = []; let footerVNodes = [];
@ -102,7 +102,8 @@ Modal.newInstance = properties => {
props: Object.assign({}, _props, { props: Object.assign({}, _props, {
width: this.width, width: this.width,
scrollable: this.scrollable, scrollable: this.scrollable,
closable: this.closable closable: this.closable,
autoClose: this.autoClose
}), }),
domProps: { domProps: {
value: this.visible value: this.visible
@ -246,6 +247,10 @@ Modal.newInstance = properties => {
modal.$parent.onCancel = props.onCancel; modal.$parent.onCancel = props.onCancel;
} }
if ('autoClose' in props) {
modal.$parent.autoClose = props.autoClose;
}
if ('onOk' in props) { if ('onOk' in props) {
modal.$parent.onOk = props.onOk; modal.$parent.onOk = props.onOk;
} }