more.vue
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<style>
body{
height: 2000px !important;
}
</style>
<template>
<i-button type="primary" @click="modal1 = true">显示对话框</i-button>
<i-button @click="scrollable = !scrollable">Toggle scrollable</i-button>
scrollable:{{scrollable}}
<Modal
:visible.sync="modal1"
title="普通的Modal对话框标题"
:scrollable="scrollable"
@on-ok="ok"
@on-cancel="cancel">
<p>对话框内容</p>
<p>对话框内容</p>
<p>对话框内容</p>
<i-button @click="scrollable = !scrollable">Toggle scrollable</i-button>
</Modal>
</template>
<script>
export default {
data () {
return {
modal1: false,
scrollable: false
}
},
methods: {
ok () {
this.$nextTick(() => this.modal1 = true);
this.$Message.info('点击了确定');
},
cancel () {
this.$Message.info('点击了取消');
}
}
}
</script>