2017-03-09 18:31:47 +08:00
|
|
|
<template>
|
|
|
|
<div>
|
2017-03-31 09:26:59 +08:00
|
|
|
<Button type="primary" @click="modal1 = true">显示对话框</Button>
|
2017-04-23 23:16:19 +08:00
|
|
|
|
2017-03-31 09:26:59 +08:00
|
|
|
<Modal
|
|
|
|
v-model="modal1"
|
2017-04-23 23:16:19 +08:00
|
|
|
:title="title"
|
2017-03-31 09:26:59 +08:00
|
|
|
@on-ok="ok"
|
2017-04-23 23:16:19 +08:00
|
|
|
:mask-closable="false"
|
2017-03-31 09:26:59 +08:00
|
|
|
@on-cancel="cancel">
|
2017-04-23 23:16:19 +08:00
|
|
|
<p><Button type="ghost" @click="title = '这是标题'">设置标题</Button> {{title}}</p>
|
2017-03-31 09:26:59 +08:00
|
|
|
<p>对话框内容</p>
|
|
|
|
<p>对话框内容</p>
|
|
|
|
</Modal>
|
2017-03-09 18:31:47 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
2017-03-31 09:26:59 +08:00
|
|
|
data () {
|
|
|
|
return {
|
2017-04-23 23:16:19 +08:00
|
|
|
modal1: true,
|
|
|
|
title:''
|
2017-03-31 09:26:59 +08:00
|
|
|
}
|
|
|
|
},
|
2017-03-09 18:31:47 +08:00
|
|
|
methods: {
|
2017-03-31 09:26:59 +08:00
|
|
|
ok () {
|
|
|
|
this.$Message.info('点击了确定');
|
2017-03-30 16:05:20 +08:00
|
|
|
},
|
2017-03-31 09:26:59 +08:00
|
|
|
cancel () {
|
|
|
|
this.$Message.info('点击了取消');
|
2017-03-09 18:31:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|