parent
51f9f894eb
commit
e011898cc7
2 changed files with 26 additions and 9 deletions
|
@ -197,11 +197,12 @@
|
||||||
visible (val) {
|
visible (val) {
|
||||||
if (val === false) {
|
if (val === false) {
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
setTimeout(() => {
|
this.timer = setTimeout(() => {
|
||||||
this.wrapShow = false;
|
this.wrapShow = false;
|
||||||
this.removeScrollEffect();
|
this.removeScrollEffect();
|
||||||
}, 300);
|
}, 300);
|
||||||
} else {
|
} else {
|
||||||
|
if (this.timer) clearTimeout(this.timer);
|
||||||
this.wrapShow = true;
|
this.wrapShow = true;
|
||||||
this.addScrollEffect();
|
this.addScrollEffect();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,16 +4,32 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<Tabs active-key="key1">
|
<i-button type="primary" @click="modal1 = true">显示对话框</i-button>
|
||||||
<Tab-pane label="标签一" key="key1">
|
<Modal
|
||||||
<Date-picker type="date" placeholder="选择日期" style="width: 200px"></Date-picker>
|
:visible.sync="modal1"
|
||||||
</Tab-pane>
|
title="普通的Modal对话框标题"
|
||||||
<Tab-pane label="标签二" key="key2">标签二的内容</Tab-pane>
|
@on-ok="ok"
|
||||||
<Tab-pane label="标签三" key="key3">标签三的内容</Tab-pane>
|
@on-cancel="cancel">
|
||||||
</Tabs>
|
<p>对话框内容</p>
|
||||||
|
<p>对话框内容</p>
|
||||||
|
<p>对话框内容</p>
|
||||||
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
modal1: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
ok () {
|
||||||
|
this.$nextTick(() => this.modal1 = true);
|
||||||
|
this.$Message.info('点击了确定');
|
||||||
|
},
|
||||||
|
cancel () {
|
||||||
|
this.$Message.info('点击了取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue