This commit is contained in:
zhigang.li 2017-12-05 14:59:29 +08:00
parent 54faea373a
commit 34324f28a6
2 changed files with 16 additions and 2 deletions

View file

@ -18,6 +18,7 @@
<i-option v-for="item in options" :value="item.value" :key="item.value">{{ item.label }}</i-option>
</i-select>
</Modal>
<Button @click="showModelFunc">弹出</Button>
</div>
</template>
<script>
@ -123,6 +124,13 @@
item.loading = false;
callback();
}, 1000);
},
showModelFunc () {
this.$Modal.success({
title: 'haha',
content: 'lsisdfsdfsdfs',
closable: false
});
}
}
}

View file

@ -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;
}