2016-12-27 12:00:45 +08:00
|
|
|
<style>
|
|
|
|
body{
|
|
|
|
height: 2000px !important;
|
2016-12-26 14:50:39 +08:00
|
|
|
}
|
|
|
|
</style>
|
2016-09-09 14:29:19 +08:00
|
|
|
<template>
|
2017-01-13 15:35:38 +08:00
|
|
|
<i-button type="primary" @click="modal1 = true">显示对话框</i-button>
|
2017-01-24 13:36:13 -06:00
|
|
|
<i-button @click="scrolling = !scrolling">Toggle Scrolling</i-button>
|
|
|
|
Scrolling:{{scrolling}}
|
2017-01-13 15:35:38 +08:00
|
|
|
<Modal
|
|
|
|
:visible.sync="modal1"
|
|
|
|
title="普通的Modal对话框标题"
|
2017-01-24 13:36:13 -06:00
|
|
|
:scrolling="scrolling"
|
2017-01-13 15:35:38 +08:00
|
|
|
@on-ok="ok"
|
|
|
|
@on-cancel="cancel">
|
|
|
|
<p>对话框内容</p>
|
|
|
|
<p>对话框内容</p>
|
|
|
|
<p>对话框内容</p>
|
2017-01-24 13:36:13 -06:00
|
|
|
<i-button @click="scrolling = !scrolling">Toggle Scrolling</i-button>
|
2017-01-13 15:35:38 +08:00
|
|
|
</Modal>
|
2016-09-09 14:29:19 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
2017-01-13 15:35:38 +08:00
|
|
|
data () {
|
|
|
|
return {
|
2017-01-24 13:36:13 -06:00
|
|
|
modal1: false,
|
|
|
|
scrolling: false
|
2017-01-13 15:35:38 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
ok () {
|
|
|
|
this.$nextTick(() => this.modal1 = true);
|
|
|
|
this.$Message.info('点击了确定');
|
|
|
|
},
|
|
|
|
cancel () {
|
|
|
|
this.$Message.info('点击了取消');
|
|
|
|
}
|
|
|
|
}
|
2016-09-09 14:29:19 +08:00
|
|
|
}
|
2016-11-09 18:23:17 +08:00
|
|
|
</script>
|